lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 27 Feb 2024 12:02:45 -0500
From: Kent Overstreet <kent.overstreet@...ux.dev>
To: "Pankaj Raghav (Samsung)" <kernel@...kajraghav.com>
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

On Tue, Feb 27, 2024 at 05:55:35PM +0100, Pankaj Raghav (Samsung) wrote:
> > > > 
> > > > 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? 

Yes, of course.

> 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?

I think that's all that would be required. There's very little in the
way of references to PAGE_SIZE in bcachefs.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ