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, 18 Oct 2016 16:09:59 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     David Rientjes <rientjes@...gle.com>
Cc:     "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Vlastimil Babka <vbabka@...e.cz>, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org
Subject: Re: [patch] mm, thp: avoid unlikely branches for split_huge_pmd

On Tue, 18 Oct 2016 16:04:06 -0700 (PDT) David Rientjes <rientjes@...gle.com> wrote:

> While doing MADV_DONTNEED on a large area of thp memory, I noticed we 
> encountered many unlikely() branches in profiles for each backing 
> hugepage.  This is because zap_pmd_range() would call split_huge_pmd(), 
> which rechecked the conditions that were already validated, but as part of 
> an unlikely() branch.
> 
> Avoid the unlikely() branch when in a context where pmd is known to be 
> good for __split_huge_pmd() directly.

Before:

   text    data     bss     dec     hex filename
  38442      75      48   38565    96a5 mm/memory.o
  21755    2369   18464   42588    a65c mm/mempolicy.o
   4557    1816       0    6373    18e5 mm/mprotect.o

After:

  38362      75      48   38485    9655 mm/memory.o
  21714    2369   18464   42547    a633 mm/mempolicy.o
   4541    1816       0    6357    18d5 mm/mprotect.o


So there's a size improvment too.  gcc-4.4.4.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ