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] [day] [month] [year] [list]
Message-ID: <ZuDziT9eOyltK6qp@casper.infradead.org>
Date: Wed, 11 Sep 2024 02:34:01 +0100
From: Matthew Wilcox <willy@...radead.org>
To: zhiguojiang <justinjiang@...o.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
	linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, opensource.kernel@...o.com
Subject: Re: [PATCH] mm: remove redundant if overhead

On Wed, Sep 11, 2024 at 09:14:10AM +0800, zhiguojiang wrote:
> 在 2024/9/11 0:03, Matthew Wilcox 写道:
> > On Tue, Sep 10, 2024 at 10:39:45PM +0800, Zhiguo Jiang wrote:
> > > Remove redundant if judgment overhead.
> > It's not redundant; it avoids dirtying the cacheline if the folio
> > is already marked as dirty.

> Ok, Is it necessary to add comments here to explain and avoid readers'
> misunderstandings? E.g. 'Avoid dirtying the cacheline if the folio is
> already marked as dirty.'

No, it's a fairly common pattern to test-and-test-and-set(or clear)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ