Re: [RFC] ps command race fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 24 Jul 2006 19:06:26 -0700
Andrew Morton <[email protected]> wrote:
> > but it was not very good because 
> > proc_pid_readdir() has to traverse all pids, not tgids.
> 
> You mean "all tgids, not pids".
> 
Ah, sorry. Precisely, traverse all pids and choose tgids from them because
pid_hash[] remembers all pids.


> > So, I had to access
> > task_struct of the pid. I wanted to avoid to access task struct itself,
> 
> Why do you wish to avoid accessing the task_struct?
> 
I thought accessing all task struct at random is heavy work and have to
up and down rcu_read_lock thousands of times.
I'm sorry if my thought is not problem.

Thanks,
-Kame

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux