[lkml]   [2000]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Proc fs limit workaround?
On Thu, Sep 14, 2000 at 12:01:49PM -0700, Nick Pollitt wrote:
> I have a machine with many partitions, and /proc/partitions, being
> limited to 4K output, doesn't display all the information I need.
> My first question/request is has anyone else already written a patch to
> get around the 4K limit?
> And second, why is the 4K limit there in the first place?

Replies in reverse. The limit is because the kernel needs to compose
the reply into some buffer, and that buffer is kmalloc()ed in kernel
space with __get_free_page(GFP_KERNEL).
See fs/proc/generic.c: proc_file_read() function.

... and nobody has needed more than PAGE_SIZE worth of partitions;
until now, that is ...

If you compare how fs/proc/proc_misc.c implements functions
partitions_read_proc() and ksyms_read_proc(), you see that
the latter does have method to go over that PAGE_SIZE limit.
(I should know, I fixed that ksyms_read_proc() ages ago, when
my machine had "too much" symbols ...)

So, are these sufficient tips on how to make the patch ?

> Thanks,
> Nick

/Matti Aarnio
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.035 / U:1.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site