From: Ben Greear <greearb@candelatech.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: 2.4.21: proc-fs and allocating many new files (PROC_NDYNAMIC)
Date: Wed, 13 Aug 2003 16:18:33 -0700 [thread overview]
Message-ID: <3F3AC749.7010803@candelatech.com> (raw)
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.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
reply other threads:[~2003-08-13 23:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F3AC749.7010803@candelatech.com \
--to=greearb@candelatech.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox