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:	Mon, 30 Mar 2015 09:37:20 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Christoph Lameter <cl@...ux.com>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	stable@...r.kernel.org,
	Uwe Kleine-Koenig <u.kleine-koenig@...gutronix.de>
Subject: Re: [for-next][PATCH 1/4] ring-buffer: Replace this_cpu_*() with
 __this_cpu_*()

On Mon, 30 Mar 2015 07:44:30 -0500 (CDT)
Christoph Lameter <cl@...ux.com> wrote:


> > >
> > > or more compact
> > >
> > > 	unsigned int val = __this_cpu_read(current_context);
> > >
> > > 	__this_cpu_write(current_context, val & (val - 1));
> >
> > Maybe I'll just use your compact version.
> 
> Hmmm... It could even be more compact
> 
> __this_cpu_and(current_context, __this_cpu_read(current_context) - 1);

Hmm,  I didn't realize there was an "and" version. I'm guessing this
would bring down the instruction count even more?

/me tries it.

I just finished testing my previous version. If this does prove to be
more compact, I'll have to replace that one with this one.

-- Steve

--
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