[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1boplkgzk.fsf@fess.ebiederm.org>
Date: Sun, 29 Jan 2012 19:26:55 -0800
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Anton Vorontsov <anton.vorontsov@...aro.org>
Cc: Arve Hjønnevåg <arve@...roid.com>,
KOSAKI Motohiro <kosaki.motohiro@...il.com>,
Greg Kroah-Hartman <gregkh@...e.de>,
San Mehat <san@...gle.com>, Colin Cross <ccross@...roid.com>,
Oleg Nesterov <oleg@...hat.com>, linux-kernel@...r.kernel.org,
kernel-team@...roid.com, linaro-kernel@...ts.linaro.org
Subject: Re: [PATCH 1/3] procfs: Export next_tgid(), move it to kernel/pid.c
Anton Vorontsov <anton.vorontsov@...aro.org> writes:
> We'd like to use this function in the android low memory killer driver, so
> let's export it.
>
> Also, move next_tgid() to kernel/pid.c, so now it lives with the rest of
> pid library functions and does not depend on procfs. Plus, we may now hide
> find_ge_pid() from the global namespace.
>
> While at it, also turn next_tgid()'s comments into kerneldoc format.
>
> There should be no functional changes.
Ouch no.
There is find_ge_pid that is general purpose, and there are a lot of
things with the task list. But this iterator is specific to the
implementation of proc especially in how it grabs and drops locks.
Using this code outside of /proc will make /proc harder to maintain than
it already is.
Why in the world would you want to traverse processes by pids when
there are well defined iterators for looping over tasks already.
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists