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:   Wed, 11 Aug 2021 04:12:22 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     David Howells <dhowells@...hat.com>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v14 061/138] mm/migrate: Add folio_migrate_flags()

On Tue, Aug 10, 2021 at 10:09:25PM +0100, David Howells wrote:
> Matthew Wilcox (Oracle) <willy@...radead.org> wrote:
> 
> > +	if (folio_test_error(folio))
> > +		folio_set_error(newfolio);
> > +	if (folio_test_referenced(folio))
> > +		folio_set_referenced(newfolio);
> > +	if (folio_test_uptodate(folio))
> > +		folio_mark_uptodate(newfolio);
> > +	if (folio_test_clear_active(folio)) {
> > +		VM_BUG_ON_FOLIO(folio_test_unevictable(folio), folio);
> > +		folio_set_active(newfolio);
> > +	} else if (folio_test_clear_unevictable(folio))
> > +		folio_set_unevictable(newfolio);
> > +	if (folio_test_workingset(folio))
> > +		folio_set_workingset(newfolio);
> > +	if (folio_test_checked(folio))
> > +		folio_set_checked(newfolio);
> > +	if (folio_test_mappedtodisk(folio))
> > +		folio_set_mappedtodisk(newfolio);
> 
> Since a bunch of these are bits in folio->flags and newfolio->flags, I wonder
> if it's better to do use a cmpxchg() loop or LL/SC construct to transfer all
> the relevant flags in one go.

I have plans for that, but they're on hold until the folio work is a bit
further progressed.  It also helps code that does something like:

	if (folio_test_dirty(folio) || folio_test_writeback(folio))

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ