lkml.org 
[lkml]   [2009]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 21/22] Use a pre-calculated value instead of num_online_nodes() in fast paths
    On Wed, 22 Apr 2009, Mel Gorman wrote:

    > diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
    > index 848025c..474e73e 100644
    > --- a/include/linux/nodemask.h
    > +++ b/include/linux/nodemask.h
    > @@ -408,6 +408,19 @@ static inline int num_node_state(enum node_states state)
    > #define next_online_node(nid) next_node((nid), node_states[N_ONLINE])
    >
    > extern int nr_node_ids;
    > +extern int nr_online_nodes;
    > +
    > +static inline void node_set_online(int nid)
    > +{
    > + node_set_state(nid, N_ONLINE);
    > + nr_online_nodes = num_node_state(N_ONLINE);
    > +}
    > +
    > +static inline void node_set_offline(int nid)
    > +{
    > + node_clear_state(nid, N_ONLINE);
    > + nr_online_nodes = num_node_state(N_ONLINE);
    > +}
    > #else
    >
    > static inline int node_state(int node, enum node_states state)

    The later #define's of node_set_online() and node_set_offline() in
    include/linux/nodemask.h should probably be removed now.


    \
     
     \ /
      Last update: 2009-04-23 01:07    [W:0.024 / U:32.640 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site