Re: [PATCH 1/2] Report the pagesize backing a VMA in /proc/pid/smaps

From: KOSAKI Motohiro
Date: Thu Sep 25 2008 - 08:23:20 EST


Hi!

> > 1) in normal page, show PAZE_SIZE
> >
> > because, any userland application woks as pagesize==PAZE_SIZE
> > on current powerpc architecture.
> >
> > because
> >
> > fs/binfmt_elf.c
> > ------------------------------
> > static int
> > create_elf_tables(struct linux_binprm *bprm, struct elfhdr *exec,
> > unsigned long load_addr, unsigned long interp_load_addr)
> > {
> > (snip)
> > NEW_AUX_ENT(AT_HWCAP, ELF_HWCAP);
> > NEW_AUX_ENT(AT_PAGESZ, ELF_EXEC_PAGESIZE); /* pass ELF_EXEC_PAGESIZE to libc */
> >
> > include/asm-powerpc/elf.h
> > -----------------------------
> > #define ELF_EXEC_PAGESIZE PAGE_SIZE
> >
>
> I'm ok with this option and dropping the MMUPageSize patch as the user
> should already be able to identify that the hardware does not support 64K
> base pagesizes. I will leave the name as KernelPageSize so that it is still
> difficult to confuse it with MMU page size.
>
> >
> > 2) in normal page, no display any page size.
> > only hugepage case, display page size.
> >
> > because, An administrator want to hugepage size only. (AFAICS)
> >
>
> I prefer option 1 as it's easier to parse the presense of information
> than infer from the absense of it.

OK.

I'll review and test your latest patch without MMUPageSize part.
(maybe today's midnight or tommorow)

Thanks!



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