Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1187503 > unrolled thread
| Started by | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| First post | 2015-07-18 23:30 +0200 |
| Last post | 2015-07-18 23:30 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 08/24] proc: pick out a function to iterate task children Oleg Nesterov <oleg@redhat.com> - 2015-07-18 23:30 +0200
| From | Oleg Nesterov <oleg@redhat.com> |
|---|---|
| Date | 2015-07-18 23:30 +0200 |
| Subject | Re: [PATCH 08/24] proc: pick out a function to iterate task children |
| Message-ID | <pNHQe-7DW-1@gated-at.bofh.it> |
On 07/17, Andrew Vagin wrote:
>
> On Tue, Jul 14, 2015 at 08:02:35PM +0200, Oleg Nesterov wrote:
> > On 07/06, Andrey Vagin wrote:
> > >
> > > -static struct pid *
> > > -get_children_pid(struct inode *inode, struct pid *pid_prev, loff_t pos)
> > > +static struct task_struct *
> > > +task_next_child(struct task_struct *parent, struct task_struct *prev, unsigned int pos)
> > > {
> >
> > I won't really argue, just a question...
> >
> > So this patch changes it to accept/return task_struct rather pid. Why?
> > it is better to get/put "struct pid" only, not the whole task_struct.
> >
> > If another caller want task_struct, the necessary conversion is simple.
>
> Another caller wants task_struct.
>
> Currently this function receives pid and converts it into task_struct, then
> gets the next child and returns its pid.
Exactly because we try to avoid get_task_struct() if possible.
> So I try to avoid extra
> conversion in task_diag code.
Which is simple. And perhaps even iter->task can actually be iter->pid.
But as I said I won't really argue. And just in case, I personally think
this series makes sense, although I can't review the netlink interface.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web