lkml.org 
[lkml]   [2017]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC V2 05/12] cpuset: Add cpuset_inc() inside cpuset_init()
    Date
    Currently cpusets_enabled() wrongfully returns 0 even if we have a root
    cpuset configured on the system. This got missed when jump level was
    introduced in place of number_of_cpusets with the commit 664eeddeef65
    ("mm: page_alloc: use jump labels to avoid checking number_of_cpusets")
    . This fixes the problem so that cpusets_enabled() returns positive even
    for the root cpuset.

    Fixes: 664eeddeef65 ("mm: page_alloc: use jump labels to avoid")
    Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
    ---
    kernel/cpuset.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/kernel/cpuset.c b/kernel/cpuset.c
    index b308888..be75f3f 100644
    --- a/kernel/cpuset.c
    +++ b/kernel/cpuset.c
    @@ -2133,6 +2133,8 @@ int __init cpuset_init(void)
    set_bit(CS_SCHED_LOAD_BALANCE, &top_cpuset.flags);
    top_cpuset.relax_domain_level = -1;

    + cpuset_inc();
    +
    err = register_filesystem(&cpuset_fs_type);
    if (err < 0)
    return err;
    --
    2.9.3
    \
     
     \ /
      Last update: 2017-01-30 04:40    [W:4.036 / U:0.236 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site