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: <20120702154222.GA26953@phenom.dumpdata.com>
Date:	Mon, 2 Jul 2012 11:42:22 -0400
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	Konrad Rzeszutek Wilk <konrad@...nok.org>
Cc:	Andrea Arcangeli <aarcange@...hat.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	Hillf Danton <dhillf@...il.com>, Dan Smith <danms@...ibm.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>, Paul Turner <pjt@...gle.com>,
	Suresh Siddha <suresh.b.siddha@...el.com>,
	Mike Galbraith <efault@....de>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Bharata B Rao <bharata.rao@...il.com>,
	Lee Schermerhorn <Lee.Schermerhorn@...com>,
	Rik van Riel <riel@...hat.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>,
	Christoph Lameter <cl@...ux.com>,
	Alex Shi <alex.shi@...el.com>,
	Mauricio Faria de Oliveira <mauricfo@...ux.vnet.ibm.com>,
	Don Morris <don.morris@...com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>
Subject: Re: [PATCH 11/40] autonuma: define the autonuma flags

On Sat, Jun 30, 2012 at 12:58:25AM -0400, Konrad Rzeszutek Wilk wrote:
> On Thu, Jun 28, 2012 at 02:55:51PM +0200, Andrea Arcangeli wrote:
> > These flags are the ones tweaked through sysfs, they control the
> > behavior of autonuma, from enabling disabling it, to selecting various
> > runtime options.
> > 
> > Signed-off-by: Andrea Arcangeli <aarcange@...hat.com>
> > ---
> >  include/linux/autonuma_flags.h |   62 ++++++++++++++++++++++++++++++++++++++++
> >  1 files changed, 62 insertions(+), 0 deletions(-)
> >  create mode 100644 include/linux/autonuma_flags.h
> > 
> > diff --git a/include/linux/autonuma_flags.h b/include/linux/autonuma_flags.h
> > new file mode 100644
> > index 0000000..5e29a75
> > --- /dev/null
> > +++ b/include/linux/autonuma_flags.h
> > @@ -0,0 +1,62 @@
> > +#ifndef _LINUX_AUTONUMA_FLAGS_H
> > +#define _LINUX_AUTONUMA_FLAGS_H
> > +
> > +enum autonuma_flag {
> 
> These aren't really flags. They are bit-fields.
> A
> > +	AUTONUMA_FLAG,
> 
> Looking at the code, this is to turn it on. Perhaps a better name such
> as: AUTONUMA_ACTIVE_FLAG ?
> 
> 
> > +	AUTONUMA_IMPOSSIBLE_FLAG,
> > +	AUTONUMA_DEBUG_FLAG,
> > +	AUTONUMA_SCHED_LOAD_BALANCE_STRICT_FLAG,
> 
> I might have gotten my math wrong, but if you have
> AUTONUMA_SCHED_LOAD_BALACE.. set (so 3), that also means
> that bit 0 and 1 are on. In other words AUTONUMA_FLAG
> and AUTONUMA_IMPOSSIBLE_FLAG are turned on.
> 
> > +	AUTONUMA_SCHED_CLONE_RESET_FLAG,
> > +	AUTONUMA_SCHED_FORK_RESET_FLAG,
> > +	AUTONUMA_SCAN_PMD_FLAG,
> 
> So this is 6, which means 110 bits. So AUTONUMA_FLAG
> gets turned off.

Ignore that pls. I had in my mind that test_bit was doing boolean logic (anding and masking,
and such), but that is not the case.
--
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