Re: [PATCH v4 7/9] filemap: Allow __filemap_get_folio to allocate large folios

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

 



On Thu, Jul 13, 2023 at 01:04:39AM -0400, Kent Overstreet wrote:
> On Mon, Jul 10, 2023 at 02:02:51PM +0100, Matthew Wilcox (Oracle) wrote:
> > Allow callers of __filemap_get_folio() to specify a preferred folio
> > order in the FGP flags.  This is only honoured in the FGP_CREATE path;
> > if there is already a folio in the page cache that covers the index,
> > we will return it, no matter what its order is.  No create-around is
> > attempted; we will only create folios which start at the specified index.
> > Unmodified callers will continue to allocate order 0 folios.
> 
> Why not just add an end_index parameter to filemap_get_folio()?

I'm reluctant to add more parameters.  Aside from the churn, every extra
parameter makes the function that little bit harder to use.  I like this
encoding; users who don't know/care about it get the current default
behaviour, and it's a simple addition to the users who do want to care.
end_index is particularly tricky ... what if it's lower than index?




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux