Re: [tip:x86/urgent] VM, x86, PAT: Change is_linear_pfn_mapping to not use vm_pgoff

From: Nick Piggin
Date: Fri Mar 13 2009 - 22:53:01 EST


On Fri, Mar 13, 2009 at 10:00:07AM -0700, Pallipadi, Venkatesh wrote:
> On Fri, 2009-03-13 at 09:25 -0700, Nick Piggin wrote:
> > Why not just use another vm_flag for 2.6.29 and earlier (we have 2 left),
> > then do some flag rationalisation in 2.6.30?
> >
> > But I do like just avoiding these games entirely and encoding it
> > explicitly.
> >
>
> Totally agree that this is ugly. But, I didn't like taking away one bit
> for such a light usage. VM_INSERTPAGE is hardly ever used in the kernel
> (wherever it is used, it is checked along with VM_PFNMAP).

That is a concern, but I think it makes the patch more intrusive
than a simple fix that might possibly introduce a bug. So for 2.6.29
we have spare flags so can use one of those for the fix.


> OK. I will resend the patch with taking away one of the available bits.
> But, I feel we need to do some multiplexing here, in a clean manner, for
> future.

That would always be appreciated. There are probably several flags that
can go away (eg. VM_RESERVED, VM_INSERTPAGE), others that can be merged
(eg nommu flags with mmu flags), others that can be one scalar value
rather than several binary values etc.

Also, if worst comes to worst, I think we could probably make vm_flags
64-bit on 32-bit compiles to get another 32 bits. Of course I'd rather
not until no other options left for reducing flags ;)
--
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/