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: <4CBFE3AA.10608@zytor.com>
Date:	Wed, 20 Oct 2010 23:54:34 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	Shaohua Li <shaohua.li@...el.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mingo@...hat.com" <mingo@...hat.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"hpa@...ux.intel.com" <hpa@...ux.intel.com>
Subject: Re: [tip:x86/mm] percpu: Introduce a read-mostly percpu API

On 10/20/2010 11:48 PM, Eric Dumazet wrote:
> Le jeudi 21 octobre 2010 à 14:17 +0800, Shaohua Li a écrit :
>> This isn't a previous bug. see
>> #define DECLARE_PER_CPU_PAGE_ALIGNED(type, name)			\
>> 	DECLARE_PER_CPU_SECTION(type, name, "..page_aligned")		\
>> 	__aligned(PAGE_SIZE)
>> the ..page_aligned is already page aligned. I add it is because it can make
>> the .readmostly section guarantee to have no cache false sharing, because
>> I add the . = ALIGN(PAGE_SIZE); before .readmostly section, and .page_aligned
>> follows, but for sure this wates some memory.
> 
> A small note:
> 
> The __aligned(XXX) makes sure object _starts_ at XXX boundary, not that
> following one will also use same alignment. Of course, we can argue that
> we dont try to put in PAGE_ALIGNED section small objects, but still...
> 
> Explicit .ALIGN() uses in .lds are more readable IMHO...
> 

There is.  However, see again my previous note about SORT_BY_ALIGNMENT.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

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