Re: [PATCH v3 05/14] mm: Move 'private' union within struct page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 20, 2018 at 10:25:14AM -0500, Christopher Lameter wrote:
> On Wed, 18 Apr 2018, Matthew Wilcox wrote:
> > +	union {
> > +		unsigned long private;
> > +#if USE_SPLIT_PTE_PTLOCKS
> > +#if ALLOC_SPLIT_PTLOCKS
> > +		spinlock_t *ptl;
> > +#else
> > +		spinlock_t ptl;
> 
> ^^^^ This used to be defined at the end of the struct so that you could
> have larger structs for spinlocks here (debugging and some such thing).
> 
> Could this not misalign the rest?

Nope:

include/linux/mm_types_task.h:#define ALLOC_SPLIT_PTLOCKS       (SPINLOCK_SIZE > BITS_PER_LONG/8)

So we'll only store a spinlock here if it's <= sizeof(long); otherwise
we'll store a pointer here.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux