Eric W. Biederman wrote:
> Pavel Emelyanov <[EMAIL PROTECTED]> writes:
>>> ...
>>> +asmlinkage long sys_thread_getrusage(int tid, struct rusage __user *ru)
>>> +{
>>> + struct task_struct *tsk;
>>> + tsk = find_task_by_pid(tid);
>>> + return getrusage(tsk, RUSAGE_THREAD, ru);
>>> +}
>> Well,
Andrew Morton wrote:
> On Mon, 28 Jan 2008 13:43:02 -0700
> [EMAIL PROTECTED] (Eric W. Biederman) wrote:
>
>> Pavel Emelyanov <[EMAIL PROTECTED]> writes:
...
+asmlinkage long sys_thread_getrusage(int tid, struct rusage __user *ru)
+{
+ struct task_struct *tsk;
+ tsk = fi
On Mon, 28 Jan 2008 13:43:02 -0700
[EMAIL PROTECTED] (Eric W. Biederman) wrote:
> Pavel Emelyanov <[EMAIL PROTECTED]> writes:
> >> ...
> >> +asmlinkage long sys_thread_getrusage(int tid, struct rusage __user *ru)
> >> +{
> >> + struct task_struct *tsk;
> >> + tsk = find_task_by_pid(tid);
> >> +
Pavel Emelyanov <[EMAIL PROTECTED]> writes:
>> ...
>> +asmlinkage long sys_thread_getrusage(int tid, struct rusage __user *ru)
>> +{
>> +struct task_struct *tsk;
>> +tsk = find_task_by_pid(tid);
>> +return getrusage(tsk, RUSAGE_THREAD, ru);
>> +}
>
> Well, the find_task_by_pid() is real
Andrew Morton wrote:
> On Mon, 28 Jan 2008 12:38:17 +0300 Pavel Emelyanov <[EMAIL PROTECTED]> wrote:
>
>>> If the code was using find_task_by_vpid() then OK (I guess). But it is
>> Yup, find_task_by_vpid() will find the proper (i.e. in your namespace) task.
>>
>>> looking the tids up in the init_
On Mon, 28 Jan 2008 12:38:17 +0300 Pavel Emelyanov <[EMAIL PROTECTED]> wrote:
> > If the code was using find_task_by_vpid() then OK (I guess). But it is
>
> Yup, find_task_by_vpid() will find the proper (i.e. in your namespace) task.
>
> > looking the tids up in the init_pid_ns. Which I assume
Andrew Morton wrote:
> On Mon, 28 Jan 2008 10:48:23 +0300 Pavel Emelyanov <[EMAIL PROTECTED]> wrote:
>
>> Andrew Morton wrote:
>>> On Thu, 17 Jan 2008 13:57:05 +0530 Vinay Sridhar <[EMAIL PROTECTED]>
>>> wrote:
>>>
Hi All,
Last year, there was discussion about per-thread getrus
On Mon, 28 Jan 2008 13:54:12 +0530 Sripathi Kodi <[EMAIL PROTECTED]> wrote:
> Does Roland's patch (http://lkml.org/lkml/2008/1/18/589) look good to go
> in, provided Ulrich's comment (http://lkml.org/lkml/2008/1/19/15) is
> addressed?
Sure, it looks sane - it avoids the problematic get_task_by_
On Mon, 28 Jan 2008 10:48:23 +0300 Pavel Emelyanov <[EMAIL PROTECTED]> wrote:
> Andrew Morton wrote:
> > On Thu, 17 Jan 2008 13:57:05 +0530 Vinay Sridhar <[EMAIL PROTECTED]>
> > wrote:
> >
> >> Hi All,
> >>
> >> Last year, there was discussion about per-thread getrusage by adding
> >> RUSAGE
Hi Andrew,
On Monday 28 January 2008 11:22, Andrew Morton wrote:
> On Thu, 17 Jan 2008 13:57:05 +0530 Vinay Sridhar
<[EMAIL PROTECTED]> wrote:
> > Hi All,
> >
> > Last year, there was discussion about per-thread getrusage by
> > adding RUSAGE_THREAD flag to getrusage(). Please refer to the
Andrew Morton wrote:
> On Thu, 17 Jan 2008 13:57:05 +0530 Vinay Sridhar <[EMAIL PROTECTED]>
> wrote:
>
>> Hi All,
>>
>> Last year, there was discussion about per-thread getrusage by adding
>> RUSAGE_THREAD flag to getrusage(). Please refer to the thread
>> http://lkml.org/lkml/2007/4/4/308.
On Thu, 17 Jan 2008 13:57:05 +0530 Vinay Sridhar <[EMAIL PROTECTED]>
wrote:
> Hi All,
>
> Last year, there was discussion about per-thread getrusage by adding
> RUSAGE_THREAD flag to getrusage(). Please refer to the thread
> http://lkml.org/lkml/2007/4/4/308. Ulrich had suggested that we
I agree that RUSAGE_THREAD is fine. (In fact, if you'd pressed me to
remember without looking, I would have assumed we put it in already.)
However, in the implementation, I would keep it cleaner by moving the
identical code from inside the loop under case RUSAGE_SELF into a shared
subfunction, rat
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Vinay Sridhar wrote:
> There are two ways to implement this in the kernel:
> 1) Introduce an additional parameter 'tid' to sys_getrusage() and put
> code in glibc to handle getrusage() and pthread_getrusage() calls
> correctly.
> 2) Introduce a new sys
14 matches
Mail list logo