From: ebiederm@xmission.com (Eric W. Biederman)
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Pavel Emelyanov <xemul@parallels.com>,
Serge Hallyn <serge.hallyn@canonical.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Tejun Heo <tj@kernel.org>, Andrew Vagin <avagin@openvz.org>,
Vasiliy Kulikov <segoon@openwall.com>
Subject: Re: [PATCH] fs, proc: Introduce /proc/<pid>/task/<tid>/children entry v7
Date: Thu, 19 Jan 2012 15:14:05 -0800 [thread overview]
Message-ID: <m1ty3r1e0y.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <20120119180951.GI31379@moon> (Cyrill Gorcunov's message of "Thu, 19 Jan 2012 22:09:51 +0400")
Cyrill Gorcunov <gorcunov@gmail.com> writes:
> On Thu, Jan 19, 2012 at 06:57:00PM +0100, Oleg Nesterov wrote:
>> On 01/19, Cyrill Gorcunov wrote:
>> >
>> > On Thu, Jan 19, 2012 at 07:51:12PM +0400, Cyrill Gorcunov wrote:
>> > > If it's needed I can wrap all this with CONFIG_CHECKPOINT_RESTORE, should I?
>> > >
>> > > ---
>> >
>> > Oleg, if only I'm not missing something obvious you meant handling like below?
>>
>> Yes, but...
>>
>> > +struct proc_pid_children_iter {
>> > + struct pid_namespace *pid_ns;
>> > + struct pid *parent_pid;
>> > +};
>>
>> you forgot to remove this definition.
>>
>
> No, I rather forgot to quilt refresh :)
>
>> > +static int children_seq_show(struct seq_file *seq, void *v)
>> > +{
>> > + struct inode *inode = seq->private;
>> > + unsigned long pid;
>> > +
>> > + pid = (unsigned long)pid_nr_ns(v, inode->i_sb->s_fs_info);
>> > + return seq_printf(seq, " %lu", pid);
>> > +}
>>
>> just noticed... why unsigned long and %lu? afaics pid_t/%d should work
>> without any typecasts.
>>
>
> I'm not sure how important it is, but Andrew mentioned in one of email
> that we might be moving from pid_t from int to long one day (which of
> course will require extreme huge work on checking code where int->long
> transition might cause problems). So I thought why should I wait then?
>
> [ Andrew, am I correct? ]
It is going to take a lot to get to a > 32bit pid value. I would not
worry about it today unless there is some 64bit arch somewhere that defines
pid_t as long.
Eric
next prev parent reply other threads:[~2012-01-19 23:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-19 15:51 Cyrill Gorcunov
2012-01-19 17:47 ` Cyrill Gorcunov
2012-01-19 17:57 ` Oleg Nesterov
2012-01-19 18:09 ` Cyrill Gorcunov
2012-01-19 18:13 ` Cyrill Gorcunov
2012-01-20 15:01 ` Oleg Nesterov
2012-01-19 23:14 ` Eric W. Biederman [this message]
2012-01-20 6:31 ` Cyrill Gorcunov
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=m1ty3r1e0y.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@openvz.org \
--cc=gorcunov@gmail.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=segoon@openwall.com \
--cc=serge.hallyn@canonical.com \
--cc=tj@kernel.org \
--cc=xemul@parallels.com \
/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