[lkml]   [2003]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject2.4.21: proc-fs and allocating many new files (PROC_NDYNAMIC)
I am working on a mac-vlan module, and would like to have a proc entry for each
vlan device. My code fails after creating 124 vlans (which will create ~240
proc entries).

What is worse, after doing this, the 802.1q module will not even load because
it can't allocate it's small number of proc entries. (I will fix this shortly
and have it ignore the error and continue, since it uses ioctls as well.)

After poking around in the proc-fs code (please, next time someone re-writes this,
give us an int* err_code return value so that we can know why things fail!!!)
I believe I must be hitting the failure due to not being able to find a free entry
in the proc_alloc_map. It seems that a max of PROC_NDYNAMIC proc entries can be
created. This value is #defined to 4096 in 2.4.21....

So, several questions:

Can I arbitrarily make this bigger...say (4096*4)? Any trade-offs other than memory?

Is there a better way to have many proc file entries? I can even live
with read-only, as I can do the config through ioctls.


Ben Greear <>
Candela Technologies Inc

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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