Re: [PATCH 03/13] filemap: align the index to mapping_min_order in the page cache

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

 



> > > 
> > > you guys are both wrong, just use rounddown()
> > 
> > Umm, what do you mean just use rounddown? rounddown to ...?
> > 
> > We need to get index that are in PAGE units but aligned to min_order
> > pages.
> > 
> > The original patch did this:
> > 
> > index = mapping_align_start_index(mapping, iocb->ki_pos >> PAGE_SHIFT);
> > 
> > Which is essentially a rounddown operation (probably this is what you
> > are suggesting?).
> > 
> > So what willy is proposing will do the same. To me, what I proposed is
> > less complicated but to willy it is the other way around.
> 
> Ok, I just found the code for mapping_align_start_index() - it is just a
> round_down().
> 
> Never mind; patch looks fine (aside from perhaps some quibbling over
> whether the round_down()) should be done before calling readahead or
> within readahead; I think that might have been more what willy was
> keying in on)

Yeah, exactly.

I have one question while I have you here. 

When we have this support in the page cache, do you think bcachefs can make
use of this support to enable bs > ps in bcachefs as it already makes use 
of large folios? 
Do you think it is just a simple mapping_set_large_folios ->
mapping_set_folio_min_order(.., block_size order) or it requires more
effort?




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux