Re: Proc fs limit workaround?

From: Matti Aarnio (matti.aarnio@zmailer.org)
Date: Thu Sep 14 2000 - 14:49:22 EST


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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:24 EST