Re: [PATCH 01/23] tref: Implement task references.

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

 



"Eric W. Biederman" wrote:
> 
>  struct pid
>  {
> +       atomic_t count;
>         /* Try to keep pid_chain in the same cacheline as nr for find_pid */
>         int nr;
>         struct hlist_node pid_chain;
>         /* list of pids with the same nr, only one of them is in the hash */
> -       struct list_head pid_list;
> -       /* Does a weak reference of this type exist to the task struct? */
> -       struct task_ref *tref;
> +       struct list_head tasks[PIDTYPE_MAX];
> +       struct rcu_head rcu;
>  };
>
> ...
>
> +static void rcu_put_pid(struct rcu_head *rhp)
> +{
> +       struct pid *pid = container_of(rhp, struct pid, rcu);
> +       put_pid(pid);
> +}

I hope we can do it without pid->rcu and rcu_put_pid(). Hopefuly
we can use SLAB_DESTROY_BY_RCU. To do so we need some changes in
find_task_by_pid_type().

I'll try to look closer at this patch tomorrow.

Oleg.
-
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