lkml.org 
[lkml]   [2011]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 3/4] rcu: introduce task_rcu_struct and move task's RCU code to rcupdate_defs.h
    From
    On Thu, Apr 7, 2011 at 10:07 AM, Lai Jiangshan <laijs@cn.fujitsu.com> wrote:
    > Add struct task_rcu_struct to make code clearer and move
    > them to rcupdate_defs.h which help us for code maitainment.

    > --- a/include/linux/sched.h
    > +++ b/include/linux/sched.h
    > @@ -1232,17 +1232,7 @@ struct task_struct {
    >        unsigned int policy;
    >        cpumask_t cpus_allowed;
    >
    > -#ifdef CONFIG_PREEMPT_RCU
    > -       int rcu_read_lock_nesting;
    > -       char rcu_read_unlock_special;
    > -       struct list_head rcu_node_entry;
    > -#endif /* #ifdef CONFIG_PREEMPT_RCU */
    > -#ifdef CONFIG_TREE_PREEMPT_RCU
    > -       struct rcu_node *rcu_blocked_node;
    > -#endif /* #ifdef CONFIG_TREE_PREEMPT_RCU */
    > -#ifdef CONFIG_RCU_BOOST
    > -       struct rt_mutex *rcu_boost_mutex;
    > -#endif /* #ifdef CONFIG_RCU_BOOST */
    > +       struct task_rcu_struct task_rcu_struct;

    Oh, wow, all these movements are for this.

    You could do

    struct task_rcu {
    ...
    } rcu;

    inside sched.h, drop pointless 1:1 current_() et al wrappers and
    avoid all this mess.
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2011-04-07 22:53    [W:0.030 / U:0.264 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site