Re: [PATCH] x86: create array based interface to change pageattribute

From: Dave Airlie
Date: Tue Apr 01 2008 - 21:36:10 EST



On Mon, 2008-03-31 at 13:46 +0200, Andi Kleen wrote:
> On Mon, Mar 31, 2008 at 09:21:19PM +1000, Dave Airlie wrote:
> > On Mon, Mar 31, 2008 at 5:25 PM, Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:
> > > Dave Airlie <airlied@xxxxxxxxxx> writes:
> > > >
> > > > +#define CPA_FLUSHTLB 1
> > > > +#define CPA_ARRAY 2
> > >
> > > I don't think CPA_ARRAY should be a separate case. Rather single
> > > page flushing should be an array with only a single entry. pageattr
> > > is already very complex, no need to make add more special cases.
> >
> > I thought about this but the current interface takes a start address
> > and number of pages from that point to cpa,
> > the array interface takes an array of page sized pages.
> >
> > I don't really think we need to generate an array in the first case
> > with all the pages in it..
>
> Just put the length into the array members too.

I can only think to do this by maybe stealing some bits, and having the
caller provide a pfn + length in one 64-bit dword.

As otherwise I'm going to end up with the largest use case for this
having to allocate a large array of 64-bit dwords all containing 1.

This isn't worth it IMHO and the array doesn't add that much more
complexity.

Dave.

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