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]
Message-ID: <alpine.DEB.1.00.0802252248400.9390@chino.kir.corp.google.com>
Date:	Mon, 25 Feb 2008 22:53:41 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Paul Jackson <pj@....com>
cc:	akpm@...ux-foundation.org, clameter@....com,
	Lee.Schermerhorn@...com, ak@...e.de, linux-kernel@...r.kernel.org
Subject: Re: [patch 3/6] mempolicy: add MPOL_F_STATIC_NODES flag

On Mon, 25 Feb 2008, Paul Jackson wrote:

>     $ grep mpol_store_user_nodemask mm/mempolicy.c
>     static inline int mpol_store_user_nodemask(const struct mempolicy *pol)
>         if (mpol_store_user_nodemask(policy))
>         if (!mpol_store_user_nodemask(a))
>         if (!mpol_store_user_nodemask(pol) &&
> 
> So I see no need to waste the instructions needed (in the three copies
> of this code, since it's static inline) to convert a non-zero value to
> exactly the value 1.
> 

Done, thanks.

> Hmmm ... speaking of static inline ... I can knock 600 bytes (that's
> IA64 bytes, so equivalent to about 300 x86 bytes) off the kernel text
> size by not inlining the mm/mempolicy.c routines check_pgd_range() and
> interleave_nid().  I wonder if that would be worth doing.  Perhaps
> those two routines are in sufficiently tight corners that the duplicate
> copies of them is needed.
> 

It seems like a worthwhile change to me even though gcc will pass the 
actuals to check_pgd_range() on the stack.  The callers to check_range() 
shouldn't be in any fast paths: migrate_to_node() can take a long time 
depending on the length of the page list and do_mbind() sleeps on 
mmap_sem.

   text	   data	    bss	    dec	    hex	filename
  11695	     24	     24	  11743	   2ddf	mm/mempolicy.o.before
  11215	     24	     24	  11263	   2bff	mm/mempolicy.o.after
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ