Re: RFC: CONFIG_PAGE_SHIFT (aka software PAGE_SIZE)

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

 



On Sat, 2007-07-07 at 00:26 +0200, Andrea Arcangeli wrote:
> for the hack week at opensuse (see http://idea.opensuse.org/) I've
> been working on a new feature called CONFIG_PAGE_SHIFT.
...
> If you want to help/look here the patch:
> 
> 	http://www.kernel.org/pub/linux/kernel/people/andrea/patches/v2.6/2.6.22-rc7/hard-page-size
> 
> I'm tracking it with hg mq extension so far, but I can change if it
> helps.

The patch looks really interesting, it's just a little hard to parse
with all of the s/4096/PAGE_SIZE/ bits around.  Those cleanups, along
with the s/PAGE_SIZE/HARD_PAGE_SIZE/ parts would be great in a
separated-out patch so that the really juicy bits (like the pte
handling) where the new logic is stand out better.  

I think it would help readability to have something like:

#define PAGES_PER_HARD_PAGE (1<<(PAGE_SHIFT-HARD_PAGE_SHIFT))

which would look like this:

-	if (unlikely(!pfn_valid(pfn))) {
+	if (unlikely(!pfn_valid(pfn * PAGES_PER_HARD_PAGE))) {

Instead of having hardpfn_t, would it be more useful to tag the types
with sparse?  That's probably something that other interested parties
could work on.

-- Dave

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux