[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4zpsfvy3e4hkc4avvjjr34rgo7ggpd6hpflptmiauvxwm3dpvk@5wulihwpwbyp>
Date: Tue, 27 Feb 2024 17:55:35 +0100
From: "Pankaj Raghav (Samsung)" <kernel@...kajraghav.com>
To: Kent Overstreet <kent.overstreet@...ux.dev>
Cc: Matthew Wilcox <willy@...radead.org>, linux-xfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org, david@...morbit.com,
chandan.babu@...cle.com, akpm@...ux-foundation.org, mcgrof@...nel.org, ziy@...dia.com,
hare@...e.de, djwong@...nel.org, gost.dev@...sung.com, linux-mm@...ck.org,
Pankaj Raghav <p.raghav@...sung.com>
Subject: Re: [PATCH 03/13] filemap: align the index to mapping_min_order in
the page cache
> > >
> > > 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?
Powered by blists - more mailing lists