You need to sign in or sign up before continuing.
  • D
    ktask: multithread CPU-intensive kernel work · c48676ef
    Daniel Jordan 提交于
    hulk inclusion
    category: feature
    bugzilla: 13228
    CVE: NA
    ---------------------------
    
    A single CPU can spend an excessive amount of time in the kernel
    operating on large amounts of data.  Often these situations arise
    during initialization- and destruction-related tasks, where the data
    involved scales with system size. These long-running jobs can slow
    startup and shutdown of applications and the system itself while extra
    CPUs sit idle.
    
    To ensure that applications and the kernel continue to perform well as
    core counts and memory sizes increase, harness these idle CPUs to
    complete such jobs more quickly.
    
    ktask is a generic framework for parallelizing CPU-intensive work in the
    kernel.  The API is generic enough to add concurrency to many different
    kinds of tasks--for example, zeroing a range of pages or evicting a list
    of inodes--and aims to save its clients the trouble of splitting up the
    work, choosing the number of threads to use, maintaining an efficient
    concurrency level, starting these threads, and load balancing the work
    between them.
    
    The Documentation patch earlier in this series, from which the above was
    swiped, has more background.
    
    Inspired by work from Pavel Tatashin, Steve Sistare, and Jonathan Adams.
    Signed-off-by: NDaniel Jordan <daniel.m.jordan@oracle.com>
    Suggested-by: NPavel Tatashin <Pavel.Tatashin@microsoft.com>
    Suggested-by: NSteve Sistare <steven.sistare@oracle.com>
    Suggested-by: NJonathan Adams <jwadams@google.com>
    Signed-off-by: NHongbo Yao <yaohongbo@huawei.com>
    Reviewed-by: NXie XiuQi <xiexiuqi@huawei.com>
    Tested-by: NHongbo Yao <yaohongbo@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    c48676ef
main.c 28.9 KB