From: Paul Jackson <pj@sgi.com>
To: Herbert Rosmanith <kernel@wildsau.enemy.org>
Cc: linux-kernel@vger.kernel.org, kernel@wildsau.enemy.org
Subject: Re: procfs uglyness caused by "cat"
Date: Tue, 14 Mar 2006 07:57:47 -0800 [thread overview]
Message-ID: <20060314075747.64928d00.pj@sgi.com> (raw)
In-Reply-To: <200603141043.k2EAhlTV016354@wildsau.enemy.org>
Robert Hancock explained what's wrong with your proposal of:
+ if (off)
+ return 0;
For an alternative that seems to work better, see the processing
behind the /proc/<pid>/cpuset file, by grep'ing for seq_file in
kernel/cpuset.c.
Essentially, it composes the result string on the open, and then
lets user code read and seek over that string at will.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.925.600.0401
next prev parent reply other threads:[~2006-03-14 15:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-14 10:43 Herbert Rosmanith
2006-03-14 15:57 ` Paul Jackson [this message]
[not found] <5Qfgo-3At-15@gated-at.bofh.it>
2006-03-14 14:35 ` Robert Hancock
2006-03-14 15:33 ` Paul Rolland
2006-03-14 17:59 ` Paul Jackson
2006-03-14 18:45 ` Paul Rolland
2006-03-15 8:06 ` Herbert Rosmanith
2006-03-15 8:23 ` Herbert Rosmanith
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=20060314075747.64928d00.pj@sgi.com \
--to=pj@sgi.com \
--cc=kernel@wildsau.enemy.org \
--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
Powered by JetHome