Re: [Patch] x86,pat Update the page flags for memtype atomicallyinstead of using memtype_lock.

From: Thomas Gleixner
Date: Fri Mar 12 2010 - 20:53:29 EST


On Fri, 12 Mar 2010, Suresh Siddha wrote:

> On Fri, 2010-03-12 at 17:08 -0800, Thomas Gleixner wrote:
> > On Fri, 12 Mar 2010, Suresh Siddha wrote:
> > > On Thu, 2010-03-11 at 08:17 -0800, Robin Holt wrote:
> > > > Changes since -V1:
> > > > 1) Introduce atomically setting and clearing the page flags and not
> > > > using the global memtype_lock to protect page->flags.
> > > >
> > > > 2) This allowed me the opportunity to convert the rwlock back into a
> > > > spinlock and not affect _MY_ tests performance as all the pages my test
> > > > was utilizing are tracked by struct pages.
> > >
> > > Can you also include this spinlock to rwlock conversion, which can be
> > > used for non RAM pages as a second patch?
> >
> > spinlock -> rwlock conversion ? I hope you meant it the other way
> > round as Robin said in #2 :)
>
> Thomas, No. I meant converting the existing memtype_lock which is a
> spinlock into rwlock. Robin has this in the first version of the patch
> but he dropped it in a later version as he avoided this lock for RAM
> pages.
>
> Just wanted to make sure that we address the perf aspect even for non
> RAM pages by converting the memtype_lock into rwlock before some one
> else reports a similar issue for non RAM pages.

Care to explain why a rwlock is a good solution and which problem is
solved by the conversion of a spinlock to a rwlock ?

Thanks,

tglx


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/