Messages in this thread | | | Date | Tue, 25 Jan 2005 08:46:42 -0800 | From | Chris Wedgwood <> | Subject | Re: [PATCH] Use MM_VM_SIZE in exit_mmap |
| |
On Wed, Jan 26, 2005 at 01:22:10AM +1100, Anton Blanchard wrote:
> The 4 level pagetable code changed the exit_mmap code to rely on > TASK_SIZE. On some architectures (eg ppc64 and ia64), this is a per > task property and bad things can happen in certain circumstances > when using it.
I don't really like it in general when we do
#define MAYBE_CONST_LOOKING_THING (some_func())
I would almost rather see something like task_size(current) used.
> MM_VM_SIZE() was created for this purpose (and is used in the next > line for tlb_finish_mmu), so use it. I moved the PGD round up of > TASK_SIZE into the default MM_VM_SIZE.
> ===== include/linux/mm.h 1.212 vs edited ===== > +++ edited/include/linux/mm.h 2005-01-26 01:20:12 +11:00 > @@ -38,7 +38,7 @@ > #include <asm/atomic.h> > > #ifndef MM_VM_SIZE > -#define MM_VM_SIZE(mm) TASK_SIZE > +#define MM_VM_SIZE(mm) ((TASK_SIZE + PGDIR_SIZE - 1) & PGDIR_MASK) > #endif > > #define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n)) ia64 asm/processor.h already has:
#define DEFAULT_TASK_SIZE __IA64_UL_CONST(0xa000000000000000) [...] #define MM_VM_SIZE(mm) DEFAULT_TASK_SIZE
So I think this will generate a warning there? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |