Re: Reduce struct page by 8 bytes on 64bit

Matthew Wilcox (willy@debian.org)
Wed, 16 Apr 2003 22:26:51 +0100


On Wed, Apr 16, 2003 at 01:35:39PM -0700, Andrew Morton wrote:
> Matthew Wilcox <willy@debian.org> wrote:
> >
> > Jacob's would break if we hashed to different spinlocks. But we don't, we
> > shift right by 8, so we get the same spinlock for atomic things that are on
> > the same "cacheline" (i think PA cachelines are actually 64 or 128 bytes,
> > depending on model).
> >
>
> Are you prepared to cast this in stone?

I think so. It makes sense to me that we lock an entire cacheline for
this kind of thing. Indeed, locking a smaller amount would probably break
other stuff. Remember set_bit() et al take a pointer to an unsigned long...
but can take a bit number > number of bits in an unsigned long. If anything,
we should maybe expand the range covered by a single lock to a larger amount
than 256 bytes. How big are ext2 bitmaps, for example?

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/