Re: [PATCH v6 04/16] iomap: Add flags parameter to iomap_page_create()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2022-05-26 at 11:25 -0700, Darrick J. Wong wrote:
> On Thu, May 26, 2022 at 10:38:28AM -0700, Stefan Roesch wrote:
> > 
> >  static struct iomap_page *
> > -iomap_page_create(struct inode *inode, struct folio *folio)
> > +iomap_page_create(struct inode *inode, struct folio *folio,
> > unsigned int flags)
> >  {
> >         struct iomap_page *iop = to_iomap_page(folio);
> >         unsigned int nr_blocks = i_blocks_per_folio(inode, folio);
> > +       gfp_t gfp = GFP_NOFS | __GFP_NOFAIL;
> >  
> >         if (iop || nr_blocks <= 1)
> >                 return iop;
> >  
> > +       if (flags & IOMAP_NOWAIT)
> > +               gfp = GFP_NOWAIT;
> 
> Hmm.  GFP_NOWAIT means we don't wait for reclaim or IO or filesystem
> callbacks, and NOFAIL means we retry indefinitely.  What happens in
> the
> NOWAIT|NOFAIL case?  Does that imply that the kzalloc loops without
> triggering direct reclaim until someone else frees enough memory?
> 
> --D

I have a question that is a bit offtopic but since it is concerning GFP
flags and this is what is discussed here maybe a participant will
kindly give me some hints about this mystery that has burned me for so
long...

Why does out_of_memory() requires GFP_FS to kill a process? AFAIK, no
filesystem-dependent operations are needed to kill a process...




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux