padata-add-basic-support-for-multithreaded-jobs.patch removed from -mm tree
The patch titled
Subject: padata: add basic support for multithreaded jobs
has been removed from the -mm tree. Its filename was
padata-add-basic-support-for-multithreaded-jobs.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Daniel Jordan <[email protected]>
Subject: padata: add basic support for multithreaded jobs
Sometimes the kernel doesn't take full advantage of system memory bandwidth, leading to a single CPU spending excessive time in initialization paths where the data scales with memory size.
Multithreading naturally addresses this problem.
Extend padata, a framework that handles many parallel yet singlethreaded jobs, to also handle multithreaded jobs by adding support for splitting up the work evenly, specifying a minimum amount of work that's appropriate for one helper thread to do, load balancing between helpers, and coordinating them.
This is inspired by work from Pavel Tatashin and Steve Sistare.
---
include/linux/padata.h | 29 +++++++ kernel/padata.c | 152 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 178 insertions(+), 3 deletions(-)
include/linux/padata.h renamed from include/linux/padata.h~padata-add-basic-support-for-multithreaded-jobs +29 -0
@@ -4,6 +4,9 @@* * Copyright (C) 2008, 2009 secunet Security Networks AG * Copyright (C) 2008, 2009 Steffen Klassert <[email protected]> +* +* Copyright (c) 2020 Oracle and/or its affiliates. +* Author: Daniel Jordan <[email protected]> */ #ifndef PADATA_H
@@ -131,6 +134,31 @@ struct padata_shell { };/** +* struct padata_mt_job - represents one multithreaded job +* +* @thread_fn: Called for each chunk of work that a padata thread does. +* @fn_arg: The thread function argument. +* @start: The start of the job (units are job-specific). +* @size: size of this node's work (units are job-specific). +* @align: Ranges passed to the thread function fall on this boundary, with the +* possible exceptions of the beginning and end of the job. +* @min_chunk: The minimum chunk size in job-specific units. This allows +* the client to communicate the minimum amount of work that's +* appropriate for one worker thread to do at once. +* @max_threads: Max threads to use for the job, actual number may be less +* depending on task size and minimum chunk size. +*/ +struct padata_mt_job { +void (*thread_fn)(unsigned long start,unsigned long end,void *arg); +void *fn_arg; +unsigned long start; +unsigned long size; +unsigned long align; +unsigned long min_chunk; +int max_threads; +}; + +/** * struct padata_instance - The overall control structure. * * @cpu_online_node: Linkage for CPU online callback.
@@ -173,6 +201,7 @@ extern void padata_free_shell(struct padextern int padata_do_parallel (struct padata_shell *ps,struct padata_priv *padata,int *cb_cpu);extern void padata_do_serial (struct padata_priv *padata); +extern void __init padata_do_multithreaded (struct padata_mt_job *job);extern int padata_set_cpumask (struct padata_instance *pinst,int cpumask_type,cpumask_var_t cpumask);extern int padata_start (struct padata_instance *pinst);
kernel/padata.c renamed from kernel/padata.c~padata-add-basic-support-for-multithreaded-jobs +149 -3
205 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are