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.2.00.1106212325400.14693@chino.kir.corp.google.com>
Date:	Tue, 21 Jun 2011 23:32:34 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Cong Wang <amwang@...hat.com>
cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	dave@...ux.vnet.ibm.com, Andrea Arcangeli <aarcange@...hat.com>,
	Mel Gorman <mel@....ul.ie>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Rik van Riel <riel@...hat.com>,
	Johannes Weiner <hannes@...xchg.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	linux-mm@...ck.org
Subject: Re: [PATCH v2 2/4] mm: make the threshold of enabling THP
 configurable

On Wed, 22 Jun 2011, Cong Wang wrote:

> > Either way, this patch isn't needed since it has no benefit over doing it
> > through an init script.
> 
> If you were right, CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS is not needed,
> you can do it through an init script.
> 

They are really two different things: config options like 
CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS and CONFIG_SLUB_DEBUG_ON are shortcuts 
for command line options when you want the _default_ behavior to be 
specified.  They could easily be done on the command line just as they can 
be done in the config.  They typically have far reaching consequences 
depending on whether they are enabled or disabled and warrant the entry in 
the config file.

This patch, however, is not making the heuristic any easier to work with; 
in fact, if the default were ever changed or the value is changed on your 
kernel, then certain kernels will have THP enabled by default and others 
will not.  That's why I suggested an override command line option like 
transparent_hugepage=force to ignore any disabling heursitics either 
present or future.

> If you were right, the 512M limit is not needed neither, you have
> transparent_hugepage=never boot parameter and do the check of
> 512M later in an init script. (Actually, moving the 512M check to
> user-space is really more sane to me.)
> 

It's quite obvious that the default behavior intended by the author is 
that it is defaulted off for systems with less than 512M of memory.  
Obfuscating that probably isn't a very good idea, but I'm always in favor 
of command lines that allow users to override settings when they really do 
know better.
--
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