On Tue, 9 Sep 2008 13:58:27 +1000 Nick Piggin <nickpiggin@yahoo.com.au> wrote:Hmm..kicking out 4bytes per 4096bytes if disabled ? maybe a routine like SPARSEMEM is a choice. Following is pointer pre-allocation. (just pointer, not page_cgroup itself) == #define PCG_SECTION_SHIFT (10) #define PCG_SECTION_SIZE (1 << PCG_SECTION_SHIFT) struct pcg_section { struct page_cgroup **map[PCG_SECTION_SHIFT]; //array of pointer. }; struct page_cgroup *get_page_cgroup(unsigned long pfn) { struct pcg_section *sec; sec = pcg_section[(pfn >> PCG_SECTION_SHIFT)]; return *sec->page_cgroup[(pfn & ((1 << PCG_SECTTION_SHIFT) - 1]; } == If we go extreme, we can use kmap_atomic() for pointer array. Overhead of pointer-walk is not so bad, maybe. For 64bit systems, we can find a way like SPARSEMEM_VMEMMAP. Thanks, -Kame Thanks, -Kame --
| Faik Uygur | Re: Linux 2.6.21-rc1 |
| pageexec | Re: [stable] Linux 2.6.25.10 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
git: | |
| Mark Lord | Re: 2.6.25-rc8: FTP transfer errors |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
