From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: PATCH udev-106 /proc/stat buffer to small
Date: Tue, 06 Mar 2007 15:30:23 +0000 [thread overview]
Message-ID: <1173195023.23441.31.camel@pim.off.vrfy.org> (raw)
In-Reply-To: <45EC7EE4.5000903@sgi.com>
On Tue, 2007-03-06 at 10:15 -0500, George Beshers wrote:
> First, I will post an improved patch as I completely forgot udev
> was threaded (duh..).
Threaded?
> Kay Sievers wrote:
> > On 3/5/07, George Beshers <gbeshers@sgi.com> wrote:
> >>
> >> I am assuming that this is the correct place to post udev patches for
> >> consideration, feel free to inform me otherwise :-).
> >
> >> This came up on a system with 1024cores (well 768cpus and 256
> >> hyper-threads) where the buffer size for reading /proc/stat was
> >> not large enough causing udev to fail during the boot process.
> >
> > "fail"? What fails? How? It should still find hundreds of your CPU's,
> > right?
> Yes and no as it turns out because udev also looks at procs_running
> which is at
> the end of the list. If the buffer isn't big enough it returns an
> error, does a lame
> boot, and puts FAILED rather than OK in the syslog.
> >
> >> The read_proc_stat(void) eliminates this problem.
> >
> > Just curious, what size is the content of /proc/stat on this box?
> Aprox 48000 is my memory -- well above the 32768 that the buffer size was.
> Really want this to scale to 4k or so without doing anything terrible to the
> 1p 128meg systems that still exist.
Well, I rather switch to fgets(), that should leave all that buffered IO
crap to glibc. As we are reading a seq proc-file here, it doesn't really make
sense to put the whole file into a local buffer before reading it, right?
Thanks,
Kay
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
prev parent reply other threads:[~2007-03-06 15:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-05 20:34 PATCH udev-106 /proc/stat buffer to small George Beshers
2007-03-05 20:42 ` George Beshers
2007-03-06 9:26 ` Kay Sievers
2007-03-06 15:15 ` George Beshers
2007-03-06 15:30 ` Kay Sievers [this message]
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=1173195023.23441.31.camel@pim.off.vrfy.org \
--to=kay.sievers@vrfy.org \
--cc=linux-hotplug@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;
as well as URLs for NNTP newsgroup(s).