Oleg Nesterov writes:
> On 03/10, Eric W. Biederman wrote:
>>
>> Jim Newsome writes:
>>
>> > +static int do_wait_pid(struct wait_opts *wo)
>> > +{
>> > + struct task_struct *target = pid_task(wo->wo_pid, PIDTYPE_PID);
>> ^
>>
Jim Newsome writes:
> On 3/10/21 16:40, Eric W. Biederman wrote:
>>> +// Optimization for waiting on PIDTYPE_PID. No need to iterate
> through child
>>> +// and tracee lists to find the target task.
>>
>> Minor nit: C++ style comments look very out of place in this file
>> which
On 3/11/21 09:15, Oleg Nesterov wrote:
> On 03/10, Jim Newsome wrote:
>> On 3/10/21 16:40, Eric W. Biederman wrote:
>>
+static int do_wait_pid(struct wait_opts *wo)
+{
+ struct task_struct *target = pid_task(wo->wo_pid, PIDTYPE_PID);
>>>
On 03/10, Jim Newsome wrote:
>
> On 3/10/21 16:40, Eric W. Biederman wrote:
>
> >> +static int do_wait_pid(struct wait_opts *wo)
> >> +{
> >> + struct task_struct *target = pid_task(wo->wo_pid, PIDTYPE_PID);
> > ^
> > This is
On 03/10, Eric W. Biederman wrote:
>
> Jim Newsome writes:
>
> > +static int do_wait_pid(struct wait_opts *wo)
> > +{
> > + struct task_struct *target = pid_task(wo->wo_pid, PIDTYPE_PID);
> ^
> This is subtle change in
On 3/10/21 16:40, Eric W. Biederman wrote:
>> +// Optimization for waiting on PIDTYPE_PID. No need to iterate
through child
>> +// and tracee lists to find the target task.
>
> Minor nit: C++ style comments look very out of place in this file
> which uses old school C /* */ comment
Jim Newsome writes:
> do_wait is an internal function used to implement waitpid, waitid,
> wait4, etc. To handle the general case, it does an O(n) linear scan of
> the thread group's children and tracees.
>
> This patch adds a special-case when waiting on a pid to skip these scans
> and instead
On 03/09, Jim Newsome wrote:
>
> do_wait is an internal function used to implement waitpid, waitid,
> wait4, etc. To handle the general case, it does an O(n) linear scan of
> the thread group's children and tracees.
>
> This patch adds a special-case when waiting on a pid to skip these scans
> and
do_wait is an internal function used to implement waitpid, waitid,
wait4, etc. To handle the general case, it does an O(n) linear scan of
the thread group's children and tracees.
This patch adds a special-case when waiting on a pid to skip these scans
and instead do an O(1) lookup. This improves
9 matches
Mail list logo