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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zl06P-qdpca2V9aJ@casper.infradead.org>
Date: Mon, 3 Jun 2024 04:36:31 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Lance Yang <ioworker0@...il.com>
Cc: akpm@...ux-foundation.org, ryan.roberts@....com, david@...hat.com,
	21cnbao@...il.com, baolin.wang@...ux.alibaba.com, ziy@...dia.com,
	fengwei.yin@...el.com, ying.huang@...el.com, libang.li@...group.com,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] mm/mlock: implement folio_mlock_step() using
 folio_pte_batch()

On Mon, Jun 03, 2024 at 11:31:17AM +0800, Lance Yang wrote:
>  {
> -	unsigned int count, i, nr = folio_nr_pages(folio);
> -	unsigned long pfn = folio_pfn(folio);
> -	pte_t ptent = ptep_get(pte);

Please don't move type declarations later in the function.  Just because
you can doesn't mean you should.

> -	if (!folio_test_large(folio))
> +	if (likely(!folio_test_large(folio)))
>  		return 1;

How likely is this now?  How likely will it be in two years time?
Does this actually make any difference in either code generation or
performance?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ