Re: [PATCH v8 3/6] cpuset: Add cpuset.sched.load_balance flag to v2

2018-05-25 Thread Waiman Long
On 05/25/2018 05:40 AM, Patrick Bellasi wrote: > On 24-May 11:22, Waiman Long wrote: >> On 05/24/2018 11:16 AM, Juri Lelli wrote: >>> On 24/05/18 11:09, Waiman Long wrote: >>>> On 05/24/2018 10:36 AM, Juri Lelli wrote: >>>

Re: [PATCH v8 3/6] cpuset: Add cpuset.sched.load_balance flag to v2

2018-05-24 Thread Waiman Long
On 05/24/2018 11:43 AM, Peter Zijlstra wrote: > On Thu, May 17, 2018 at 04:55:42PM -0400, Waiman Long wrote: >> The sched.load_balance flag is needed to enable CPU isolation similar to >> what can be done with the "isolcpus" kernel boot parameter. Its value >> can

Re: [PATCH v8 2/6] cpuset: Add new v2 cpuset.sched.domain flag

2018-05-24 Thread Waiman Long
On 05/24/2018 11:41 AM, Peter Zijlstra wrote: > On Thu, May 17, 2018 at 04:55:41PM -0400, Waiman Long wrote: >> A new cpuset.sched.domain boolean flag is added to cpuset v2. This new >> flag indicates that the CPUs in the current cpuset should be treated >> as a separ

Re: [PATCH v8 3/6] cpuset: Add cpuset.sched.load_balance flag to v2

2018-05-24 Thread Waiman Long
On 05/24/2018 11:16 AM, Juri Lelli wrote: > On 24/05/18 11:09, Waiman Long wrote: >> On 05/24/2018 10:36 AM, Juri Lelli wrote: >>> On 17/05/18 16:55, Waiman Long wrote: >>> >>> [...] >>> >>>> + A parent cgroup cannot distribute all its C

Re: [PATCH v8 4/6] cpuset: Make generate_sched_domains() recognize isolated_cpus

2018-05-23 Thread Waiman Long
On 05/23/2018 01:34 PM, Patrick Bellasi wrote: > Hi Waiman, > > On 17-May 16:55, Waiman Long wrote: > > [...] > >> @@ -672,13 +672,14 @@ static int generate_sched_domains(cpumask_var_t >> **domains, >> int ndoms = 0; /* number of sched do

Re: [PATCH v8 2/6] cpuset: Add new v2 cpuset.sched.domain flag

2018-05-22 Thread Waiman Long
On 05/22/2018 08:57 AM, Juri Lelli wrote: > Hi, > > On 17/05/18 16:55, Waiman Long wrote: > > [...] > >> /** >> + * update_isolated_cpumask - update the isolated_cpus mask of parent cpuset >> + * @cpuset: The cpuset that requests CPU isolation >&

Re: [PATCH v8 1/6] cpuset: Enable cpuset controller in default hierarchy

2018-05-21 Thread Waiman Long
On 05/21/2018 11:09 AM, Patrick Bellasi wrote: > On 21-May 09:55, Waiman Long wrote: > >> Changing cpuset.cpus will require searching for the all the tasks in >> the cpuset and change its cpu mask. > ... I'm wondering if that has to be the case. In principle there can >

Re: [PATCH v8 1/6] cpuset: Enable cpuset controller in default hierarchy

2018-05-21 Thread Waiman Long
anwhile I have > some (hopefully not too much dummy) questions below. > > On 17-May 16:55, Waiman Long wrote: >> Given the fact that thread mode had been merged into 4.14, it is now >> time to enable cpuset to be used in the default hierarchy (cgroup v2) >> as it is c

[PATCH v8 2/6] cpuset: Add new v2 cpuset.sched.domain flag

2018-05-17 Thread Waiman Long
its parent is either root or a scheduling domain itself with non-empty cpu list. The state of this flag cannot be changed if the cpuset has children. Signed-off-by: Waiman Long <long...@redhat.com> --- Documentation/cgroup-v2.txt | 22 kernel/cgroup/cpuset.c

[PATCH v8 3/6] cpuset: Add cpuset.sched.load_balance flag to v2

2018-05-17 Thread Waiman Long
d from its parent. This flag is set by the parent and is not delegatable. Signed-off-by: Waiman Long <long...@redhat.com> --- Documentation/cgroup-v2.txt | 24 kernel/cgroup/cpuset.c | 53 + 2 files changed, 73 insertions

[PATCH v8 4/6] cpuset: Make generate_sched_domains() recognize isolated_cpus

2018-05-17 Thread Waiman Long
The generate_sched_domains() function and the hotplug code are modified to make them use the newly introduced isolated_cpus mask for schedule domains generation. Signed-off-by: Waiman Long <long...@redhat.com> --- kernel/cgroup/cpuset.c | 33 + 1 file chang

[PATCH v8 1/6] cpuset: Enable cpuset controller in default hierarchy

2018-05-17 Thread Waiman Long
features, if desired, to memory controller or may be to the cpu controller instead of staying with cpuset. Signed-off-by: Waiman Long <long...@redhat.com> --- Documentation/cgroup-v2.txt | 90 ++--- kernel/cgroup/cpuset.c | 48 +

[PATCH v8 6/6] cpuset: Allow reporting of sched domain generation info

2018-05-17 Thread Waiman Long
ges are being made. Signed-off-by: Waiman Long <long...@redhat.com> --- kernel/cgroup/cpuset.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index fb8aa82b..8f586e8 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.

[PATCH v8 0/6] Enable cpuset controller in default hierarchy

2018-05-17 Thread Waiman Long
eduling domain genaration code to work with the new scheduling domain feature. Patch 5 exposes cpus.effective and mems.effective to the root cgroup as enabling child scheduling domains will take CPUs away from the root cgroup. So it will be nice to monitor what CPUs are left there. Patch 6 enables th

[PATCH v8 5/6] cpuset: Expose cpus.effective and mems.effective on cgroup v2 root

2018-05-17 Thread Waiman Long
sed in the v2 cgroup root. For consistency, the "cpuset.mems.effective" control file is exposed as well. Signed-off-by: Waiman Long <long...@redhat.com> --- Documentation/cgroup-v2.txt | 4 ++-- kernel/cgroup/cpuset.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-)

Re: [PATCH v7 3/5] cpuset: Add a root-only cpus.isolated v2 control file

2018-05-07 Thread Waiman Long
On 05/02/2018 10:08 AM, Peter Zijlstra wrote: > On Thu, Apr 19, 2018 at 09:47:02AM -0400, Waiman Long wrote: >> diff --git a/Documentation/cgroup-v2.txt b/Documentation/cgroup-v2.txt >> index c970bd7..8d89dc2 100644 >> --- a/Documentation/cgroup-v2.txt >> +++ b/

Re: [PATCH v7 3/4] ipc: Allow boot time extension of IPCMNI from 32k to 2M

2018-05-07 Thread Waiman Long
On 05/07/2018 07:17 PM, Luis R. Rodriguez wrote: > On Mon, May 07, 2018 at 04:59:11PM -0400, Waiman Long wrote: >> diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c >> index 49f9bf4..d62335f 100644 >> --- a/ipc/ipc_sysctl.c >> +++ b/ipc/ipc_sysctl.c >&g

Re: [PATCH v7 1/4] ipc: IPCMNI limit check for msgmni and shmmni

2018-05-07 Thread Waiman Long
On 05/07/2018 06:39 PM, Luis R. Rodriguez wrote: > On Mon, May 07, 2018 at 04:59:09PM -0400, Waiman Long wrote: >> A user can write arbitrary integer values to msgmni and shmmni sysctl >> parameters without getting error, but the actual limit is really >> IPCMNI (32k). T

[PATCH v7 2/4] ipc: IPCMNI limit check for semmni

2018-05-07 Thread Waiman Long
that it is limited to the [0, IPCMNI] range. An error will be returned if this is not the case. Signed-off-by: Waiman Long <long...@redhat.com> --- ipc/ipc_sysctl.c | 23 ++- ipc/util.h | 9 + 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/ipc/ipc_sysctl.c

[PATCH v7 1/4] ipc: IPCMNI limit check for msgmni and shmmni

2018-05-07 Thread Waiman Long
will become aware if they set a value outside of the acceptable range. Signed-off-by: Waiman Long <long...@redhat.com> --- ipc/ipc_sysctl.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c index 8ad93c2..f87cb29 100644 ---

[PATCH v7 3/4] ipc: Allow boot time extension of IPCMNI from 32k to 2M

2018-05-07 Thread Waiman Long
to extend the IPCMNI value to 2M. This is a 64X increase which hopefully is big enough for them. This new option does have the side effect of reducing the maximum number of unique sequence numbers from 64k down to 1k. So it is a trade-off. Signed-off-by: Waiman Long <long...@redhat.com> --- Doc

[PATCH v7 4/4] ipc: Conserve sequence numbers in extended IPCMNI mode

2018-05-07 Thread Waiman Long
done in the extended IPCMNI mode, Signed-off-by: Waiman Long <long...@redhat.com> --- include/linux/ipc_namespace.h | 1 + ipc/ipc_sysctl.c | 2 ++ ipc/util.c| 29 ++--- ipc/util.h| 2 ++ 4 files changed, 27 inse

[PATCH v7 0/4] ipc: IPCMNI limit check for *mni & increase that limit

2018-05-07 Thread Waiman Long
_extend" to increase the IPCMNI limit from 32k to 2M if the users really want the extended value. Waiman Long (4): ipc: IPCMNI limit check for msgmni and shmmni ipc: IPCMNI limit check for semmni ipc: Allow boot time extension of IPCMNI from 32k to 2M ipc: Conserve sequence numbers in

Re: [PATCH v6 0/8] ipc: Clamp *mni to the real IPCMNI limit & increase that limit

2018-05-07 Thread Waiman Long
On 05/02/2018 11:06 AM, Eric W. Biederman wrote: > >>> and or users that may or may not exist. If you can find something that >>> will care sure. We need to avoid breaking userspace and causing >>> regressions. However as this stands it looks you are making maintenance >>> of the kernel more

Re: [PATCH v7 2/5] cpuset: Add cpuset.sched_load_balance to v2

2018-05-02 Thread Waiman Long
On 05/02/2018 09:42 AM, Peter Zijlstra wrote: > On Wed, May 02, 2018 at 09:29:54AM -0400, Waiman Long wrote: >> On 05/02/2018 06:24 AM, Peter Zijlstra wrote: >>> On Thu, Apr 19, 2018 at 09:47:01AM -0400, Waiman Long wrote: >>>> + cpuset.sched_load_balance >>

Re: [PATCH v7 2/5] cpuset: Add cpuset.sched_load_balance to v2

2018-05-02 Thread Waiman Long
On 05/02/2018 06:24 AM, Peter Zijlstra wrote: > On Thu, Apr 19, 2018 at 09:47:01AM -0400, Waiman Long wrote: >> + cpuset.sched_load_balance >> +A read-write single value file which exists on non-root cgroups. > Uhhm.. it should very much exist in the root group too. Othe

Re: [PATCH v6 0/8] ipc: Clamp *mni to the real IPCMNI limit & increase that limit

2018-05-02 Thread Waiman Long
On 05/01/2018 10:18 PM, Eric W. Biederman wrote: > >> The sysctl parameters msgmni, shmmni and semmni have an inherent limit >> of IPC_MNI (32k). However, users may not be aware of that because they >> can write a value much higher than that without getting any error or >> notification. Reading

Re: [PATCH v7 4/5] cpuset: Restrict load balancing off cpus to subset of cpus.isolated

2018-05-01 Thread Waiman Long
On 05/01/2018 04:58 PM, Tejun Heo wrote: > Hello, > > On Tue, May 01, 2018 at 04:33:45PM -0400, Waiman Long wrote: >> I think that will work too. We currently don't have a flag to make a >> file visible on first-level children only, but it shouldn't be hard to >> make

Re: [PATCH v7 4/5] cpuset: Restrict load balancing off cpus to subset of cpus.isolated

2018-05-01 Thread Waiman Long
On 05/01/2018 03:51 PM, Tejun Heo wrote: > Hello, Waiman. > > Sorry about the delay. > > On Thu, Apr 19, 2018 at 09:47:03AM -0400, Waiman Long wrote: >> With the addition of "cpuset.cpus.isolated", it makes sense to add the >> restriction that load balanci

Re: [PATCH v6 3/8] sysctl: Warn when a clamped sysctl parameter is set out of range

2018-05-01 Thread Waiman Long
On 04/30/2018 06:40 PM, Kees Cook wrote: > I like this series overall, thanks! No objections from me. One thing I > noted, though: > > On Fri, Apr 27, 2018 at 2:00 PM, Waiman Long <long...@redhat.com> wrote: >> if (param-&

[PATCH v6 3/8] sysctl: Warn when a clamped sysctl parameter is set out of range

2018-04-27 Thread Waiman Long
buffer when a clamped sysctl parameter receives an out of range value. The pr_warn_ratelimited() macro is used to limit the number of warning messages that can be printed within a given period of time. Signed-off-by: Waiman Long <long...@redhat.com> --- kernel/sysctl.

[PATCH v6 2/8] proc/sysctl: Provide additional ctl_table.flags checks

2018-04-27 Thread Waiman Long
or unsigned flags. The separation of signed and unsigned flags helps to provide more comprehensive checking than it would have been if there is only one flag available. Signed-off-by: Waiman Long <long...@redhat.com> --- fs/proc/proc_sysctl.

[PATCH v6 4/8] ipc: Clamp msgmni and shmmni to the real IPCMNI limit

2018-04-27 Thread Waiman Long
or checking the kernel ring buffer for warning. Signed-off-by: Waiman Long <long...@redhat.com> --- ipc/ipc_sysctl.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c index 8ad93c2..d71f949 100644 --- a/ipc/ipc_sysctl.c +++

[PATCH v6 1/8] sysctl: Add flags to support min/max range clamping

2018-04-27 Thread Waiman Long
us to perform more comprehensive checking in a later patch. Extra braces are also used in this patch to make a latter patch easier to read. Signed-off-by: Waiman Long <long...@redhat.com> --- include/linux/sysctl.h | 32 ++ kernel/sysctl.c

[PATCH v6 6/8] test_sysctl: Add range clamping test

2018-04-27 Thread Waiman Long
minimum clamping ... ok Checking range maximum clamping ... ok Signed-off-by: Waiman Long <long...@redhat.com> --- lib/test_sysctl.c| 29 ++ tools/testing/selftests/sysctl/sysctl.sh | 52 2 files changed, 81 inse

[PATCH v6 5/8] ipc: Clamp semmni to the real IPCMNI limit

2018-04-27 Thread Waiman Long
that it is clamped to the [0, IPCMNI] range and prints a warning message once when an out-of-range value is being written. This does require duplicating some of the code in the _minmax handlers. Signed-off-by: Waiman Long <long...@redhat.com> --- ipc/ipc_sysctl.c | 12 +++- ipc/sem.c

[PATCH v6 7/8] ipc: Allow boot time extension of IPCMNI from 32k to 2M

2018-04-27 Thread Waiman Long
to extend the IPCMNI value to 2M. This is a 64X increase which hopefully is big enough for them. This new option does have the side effect of reducing the maximum number of unique sequence numbers from 64k down to 1k. So it is a trade-off. Signed-off-by: Waiman Long <long...@redhat.com> --- Doc

[PATCH v6 8/8] ipc: Conserve sequence numbers in extended IPCMNI mode

2018-04-27 Thread Waiman Long
done in the extended IPCMNI mode, Signed-off-by: Waiman Long <long...@redhat.com> --- include/linux/ipc_namespace.h | 1 + ipc/ipc_sysctl.c | 2 ++ ipc/util.c| 29 ++--- ipc/util.h| 1 + 4 files changed, 26 inse

[PATCH v6 0/8] ipc: Clamp *mni to the real IPCMNI limit & increase that limit

2018-04-27 Thread Waiman Long
hange in behavior unless they explictly opt in to enable the extended mode. I could open up the whole positive integer space in this case like what Eric did, but that will make the code more complex. So I just extend IPCMNI to 2M in this case and keep similar ID generation logic. Waiman Long

Re: [PATCH v7 0/5] cpuset: Enable cpuset controller in default hierarchy

2018-04-23 Thread Waiman Long
On 04/20/2018 04:23 AM, Mike Galbraith wrote: > On Thu, 2018-04-19 at 09:46 -0400, Waiman Long wrote: >> v7: >> - Add a root-only cpuset.cpus.isolated control file for CPU isolation. >> - Enforce that load_balancing can only be turned off on cpusets with >>

Re: [PATCH v7 0/5] cpuset: Enable cpuset controller in default hierarchy

2018-04-23 Thread Waiman Long
On 04/23/2018 09:57 AM, Juri Lelli wrote: > On 23/04/18 15:07, Juri Lelli wrote: >> Hi Waiman, >> >> On 19/04/18 09:46, Waiman Long wrote: >>> v7: >>> - Add a root-only cpuset.cpus.isolated control file for CPU isolation. >>> - Enforce that

[PATCH v2] proc/stat: Separate out individual irq counts into /proc/stat_irqs

2018-04-19 Thread Waiman Long
/proc/stat and be duplicated in /proc/stat_irqs. Applications that need to look up individual irq counts will now have to look into /proc/stat_irqs instead of /proc/stat. v2: Update Documentation/filesystems/proc.txt accordingly. Signed-off-by: Waiman Long <long...@redhat.com> --- Documenta

[PATCH v7 0/5] cpuset: Enable cpuset controller in default hierarchy

2018-04-19 Thread Waiman Long
solated". In other words, all the CPUs that need to be isolated or in separate root domains have to be put into the "cpuset.cpus.isolated" first. Then child cpusets can be created to partition those isolated CPUs into either separate root domains with "sched_load_balance" on or

[PATCH v7 5/5] cpuset: Make generate_sched_domains() recognize isolated_cpus

2018-04-19 Thread Waiman Long
The generate_sched_domains() function and the hotplug code are modified to make them use the newly introduced isolated_cpus mask for schedule domains generation. Signed-off-by: Waiman Long <long...@redhat.com> --- kernel/cgroup/cpuset.c | 35 +-- 1 file c

[PATCH v7 2/5] cpuset: Add cpuset.sched_load_balance to v2

2018-04-19 Thread Waiman Long
t. For v2, this flag is hierarchical and is inherited by child cpusets. It is not allowed to have this flag turn off in a parent cpuset, but on in a child cpuset. This flag is set by the parent and is not delegatable. Signed-off-by: Waiman Long <long...@redhat.com> --- Documentation/cg

[PATCH v7 1/5] cpuset: Enable cpuset controller in default hierarchy

2018-04-19 Thread Waiman Long
features, if desired, to memory controller or may be to the cpu controller instead of staying with cpuset. Signed-off-by: Waiman Long <long...@redhat.com> --- Documentation/cgroup-v2.txt | 90 ++--- kernel/cgroup/cpuset.c | 48 +

[PATCH v7 3/5] cpuset: Add a root-only cpus.isolated v2 control file

2018-04-19 Thread Waiman Long
state are in any of the child cpusets. Signed-off-by: Waiman Long <long...@redhat.com> --- Documentation/cgroup-v2.txt | 25 ++ kernel/cgroup/cpuset.c | 119 +++- 2 files changed, 143 insertions(+), 1 deletion(-) diff --git a/Documen

[PATCH v7 4/5] cpuset: Restrict load balancing off cpus to subset of cpus.isolated

2018-04-19 Thread Waiman Long
With the addition of "cpuset.cpus.isolated", it makes sense to add the restriction that load balancing can only be turned off if the CPUs in the isolated cpuset are subset of "cpuset.cpus.isolated". Signed-off-by: Waiman Long <long...@redhat.com> --- Docume

Re: [PATCH v5 1/9] sysctl: Add flags to support min/max range clamping

2018-03-29 Thread Waiman Long
On 03/29/2018 02:15 PM, Luis R. Rodriguez wrote: > On Mon, Mar 19, 2018 at 11:39:19AM -0400, Waiman Long wrote: >> On 03/16/2018 09:10 PM, Luis R. Rodriguez wrote: >>> On Fri, Mar 16, 2018 at 02:13:42PM -0400, Waiman Long wrote: >>>> When the CTL_FLAGS_CLAMP_RANG

Re: [PATCH v6 2/2] cpuset: Add cpuset.sched_load_balance to v2

2018-03-27 Thread Waiman Long
On 03/27/2018 10:02 AM, Tejun Heo wrote: > Hello, > > On Mon, Mar 26, 2018 at 04:28:49PM -0400, Waiman Long wrote: >> Maybe we can have a different root level flag, say, >> sched_partition_domain that is equivalent to !sched_load_balnace. >> However, I am still no

Re: [PATCH v6 2/2] cpuset: Add cpuset.sched_load_balance to v2

2018-03-26 Thread Waiman Long
On 03/26/2018 08:47 AM, Juri Lelli wrote: > On 23/03/18 14:44, Waiman Long wrote: >> On 03/23/2018 03:59 AM, Juri Lelli wrote: > [...] > >>> OK, thanks for confirming. Can you tell again however why do you think >>> we need to remove sched_load_balance from root

Re: [PATCH v6 2/2] cpuset: Add cpuset.sched_load_balance to v2

2018-03-23 Thread Waiman Long
On 03/23/2018 03:59 AM, Juri Lelli wrote: > On 22/03/18 17:50, Waiman Long wrote: >> On 03/22/2018 04:41 AM, Juri Lelli wrote: >>> On 21/03/18 12:21, Waiman Long wrote: > [...] > >>>> + cpuset.sched_load_balance >>>> + A read-write si

Re: [PATCH v6 2/2] cpuset: Add cpuset.sched_load_balance to v2

2018-03-22 Thread Waiman Long
On 03/22/2018 04:41 AM, Juri Lelli wrote: > Hi Waiman, > > On 21/03/18 12:21, Waiman Long wrote: >> The sched_load_balance flag is needed to enable CPU isolation similar >> to what can be done with the "isolcpus" kernel boot parameter. >> >> The

[PATCH v6 0/2] cpuset: Enable cpuset controller in default hierarchy

2018-03-21 Thread Waiman Long
p v2 with cpus, mems and their effective counterparts. Patch 2 adds sched_load_balance whose behavior changes in v2 to become hierarchical and includes an implicit !cpu_exclusive. Waiman Long (2): cpuset: Enable cpuset controller in default hierarchy cpuset: Add cpuset.sched_load_balance to v2 Doc

[PATCH v6 2/2] cpuset: Add cpuset.sched_load_balance to v2

2018-03-21 Thread Waiman Long
t. For v2, this flag is hierarchical and is inherited by child cpusets. It is not allowed to have this flag turn off in a parent cpuset, but on in a child cpuset. This flag is set by the parent and is not delegatable. Signed-off-by: Waiman Long <long...@redhat.com> --- Documentation/cg

[PATCH v6 1/2] cpuset: Enable cpuset controller in default hierarchy

2018-03-21 Thread Waiman Long
features, if desired, to memory controller or may be to the cpu controller instead of staying with cpuset. Signed-off-by: Waiman Long <long...@redhat.com> --- Documentation/cgroup-v2.txt | 90 ++--- kernel/cgroup/cpuset.c | 48 +

Re: [PATCH v5 1/2] cpuset: Enable cpuset controller in default hierarchy

2018-03-20 Thread Waiman Long
On 03/20/2018 05:14 PM, Tejun Heo wrote: > Hello, > > On Tue, Mar 20, 2018 at 04:53:37PM -0400, Waiman Long wrote: >> ASAIK for v2, when cpuset.cpus is empty, cpuset.effective_cpus will show >> all the cpus available from the parent. It is a different behavior from >&

Re: [PATCH v5 1/2] cpuset: Enable cpuset controller in default hierarchy

2018-03-20 Thread Waiman Long
On 03/20/2018 04:10 PM, Tejun Heo wrote: > Hello, Waiman. > > On Tue, Mar 20, 2018 at 09:51:20AM -0400, Waiman Long wrote: >>>> + It lists the onlined CPUs that are actually allowed to be >>>> + used by tasks within the current cgroup. It is a subset of

Re: [PATCH v5 2/2] cpuset: Add cpuset.flags control knob to v2

2018-03-20 Thread Waiman Long
On 03/20/2018 04:22 PM, Tejun Heo wrote: > Hello, Waiman. > > On Tue, Mar 20, 2018 at 04:12:25PM -0400, Waiman Long wrote: >> After some thought, I am planning to impose the following additional >> constraints on how sched_load_balance works in v2. >> >> 1

Re: [PATCH v5 2/2] cpuset: Add cpuset.flags control knob to v2

2018-03-20 Thread Waiman Long
On 03/19/2018 12:33 PM, Waiman Long wrote: > On 03/19/2018 12:26 PM, Tejun Heo wrote: >> Hello, Waiman. >> >> On Thu, Mar 15, 2018 at 05:20:42PM -0400, Waiman Long wrote: >>> + The currently supported flag is: >>> + >>> + sched

Re: [PATCH v5 1/2] cpuset: Enable cpuset controller in default hierarchy

2018-03-20 Thread Waiman Long
On 03/19/2018 11:59 AM, Tejun Heo wrote: > Hello, Waiman. > > This looks great. A couple nitpicks below. > >> + 5-3. Cpuset >> + 5.3-1. Cpuset Interface Files > Can we put cpuset below pid? It feels weird to break up cpu, memory > and io as they represent the three major resources and

Re: [PATCH v4] cpuset: Enable cpuset controller in default hierarchy

2018-03-19 Thread Waiman Long
On 03/19/2018 04:49 PM, Mike Galbraith wrote: > On Mon, 2018-03-19 at 08:34 -0700, Tejun Heo wrote: >> Hello, Mike. >> >> On Thu, Mar 15, 2018 at 03:49:01AM +0100, Mike Galbraith wrote: >>> Under the hood v2 details are entirely up to you. My input ends at >>> please don't leave dynamic

Re: [PATCH v5 2/2] cpuset: Add cpuset.flags control knob to v2

2018-03-19 Thread Waiman Long
On 03/19/2018 12:26 PM, Tejun Heo wrote: > Hello, Waiman. > > On Thu, Mar 15, 2018 at 05:20:42PM -0400, Waiman Long wrote: >> +The currently supported flag is: >> + >> + sched_load_balance >> +When it is not set, there will be no load bal

Re: [PATCH v5 1/9] sysctl: Add flags to support min/max range clamping

2018-03-19 Thread Waiman Long
On 03/16/2018 09:10 PM, Luis R. Rodriguez wrote: > On Fri, Mar 16, 2018 at 02:13:42PM -0400, Waiman Long wrote: >> When the CTL_FLAGS_CLAMP_RANGE flag is set in the ctl_table >> entry, any update from the userspace will be clamped to the given >> range wi

Re: [PATCH v5 2/9] proc/sysctl: Provide additional ctl_table.flags checks

2018-03-19 Thread Waiman Long
On 03/16/2018 08:54 PM, Luis R. Rodriguez wrote: > On Fri, Mar 16, 2018 at 02:13:43PM -0400, Waiman Long wrote: >> Checking code is added to provide the following additional >> ctl_table.flags checks: >> >> 1) No unknown flag is allowed. >> 2) Minimum of a range

[PATCH v5 5/9] ipc: Clamp semmni to the real IPCMNI limit

2018-03-16 Thread Waiman Long
that it is clamped to the [0, IPCMNI] range and prints a warning message once when an out-of-range value is being written. This does require duplicating some of the code in the _minmax handlers. Signed-off-by: Waiman Long <long...@redhat.com> --- ipc/ipc_sysctl.c | 12 +++- ipc/sem.c

[PATCH v5 4/9] ipc: Clamp msgmni and shmmni to the real IPCMNI limit

2018-03-16 Thread Waiman Long
. Signed-off-by: Waiman Long <long...@redhat.com> --- ipc/ipc_sysctl.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ipc/ipc_sysctl.c b/ipc/ipc_sysctl.c index 8ad93c2..088721e 100644 --- a/ipc/ipc_sysctl.c +++ b/ipc/ipc_sysctl.c @@ -99,6 +99,7 @@ stat

[PATCH v5 7/9] test_sysctl: Add ctl_table registration failure test

2018-03-16 Thread Waiman Long
and error messages to be printed into the dmesg log, though. A new test is also added to the sysctl.sh to look for those failure messages in the dmesg log to see if anything unexpeced happens. Signed-off-by: Waiman Long <long...@redhat.com> --- lib/test_sysctl.c

[PATCH v5 8/9] ipc: Allow boot time extension of IPCMNI from 32k to 2M

2018-03-16 Thread Waiman Long
to extend the IPCMNI value to 2M. This is a 64X increase which hopefully is big enough for them. This new option does have the side effect of reducing the maximum number of unique sequence numbers from 64k down to 1k. So it is a trade-off. Signed-off-by: Waiman Long <long...@redhat.com> --- Doc

[PATCH v5 9/9] ipc: Conserve sequence numbers in extended IPCMNI mode

2018-03-16 Thread Waiman Long
done in the extended IPCMNI mode, Signed-off-by: Waiman Long <long...@redhat.com> --- include/linux/ipc_namespace.h | 1 + ipc/ipc_sysctl.c | 2 ++ ipc/util.c| 29 ++--- ipc/util.h| 1 + 4 files changed, 26 inse

[PATCH v5 6/9] test_sysctl: Add range clamping test

2018-03-16 Thread Waiman Long
minimum clamping ... ok Checking range maximum clamping ... ok Signed-off-by: Waiman Long <long...@redhat.com> --- lib/test_sysctl.c| 29 ++ tools/testing/selftests/sysctl/sysctl.sh | 52 2 files changed, 81 inse

[PATCH v5 2/9] proc/sysctl: Provide additional ctl_table.flags checks

2018-03-16 Thread Waiman Long
-off-by: Waiman Long <long...@redhat.com> --- fs/proc/proc_sysctl.c | 62 ++ include/linux/sysctl.h | 16 +++-- 2 files changed, 76 insertions(+), 2 deletions(-) diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 493c97

[PATCH v5 3/9] sysctl: Warn when a clamped sysctl parameter is set out of range

2018-03-16 Thread Waiman Long
buffer when a clamped sysctl parameter receives an out of range value. The pr_warn_ratelimited() macro is used to limit the number of warning messages that can be printed within a given period of time. Signed-off-by: Waiman Long <long...@redhat.com> --- kernel/sysctl.

[PATCH v5 1/9] sysctl: Add flags to support min/max range clamping

2018-03-16 Thread Waiman Long
the userspace will be clamped to the given range without error if either the proc_dointvec_minmax() or the proc_douintvec_minmax() handlers is used. The clamped value is either the maximum or minimum value that is closest to the input value provided by the user. Signed-off-by: Waiman Long <l

[PATCH v5 0/9] ipc: Clamp *mni to the real IPCMNI limit & increase that limit

2018-03-16 Thread Waiman Long
mode. I could open up the whole positive integer space in this case like what Eric did, but that will make the code more complex. So I just extend IPCMNI to 2M in this case and keep similar ID generation logic. Waiman Long (9): sysctl: Add flags to support min/max range clamping proc/sysctl: P

[PATCH v5 1/2] cpuset: Enable cpuset controller in default hierarchy

2018-03-15 Thread Waiman Long
features, if desired, to memory controller or may be to the cpu controller instead of staying with cpuset. Signed-off-by: Waiman Long <long...@redhat.com> --- Documentation/cgroup-v2.txt | 96 - kernel/cgroup/cpuset.c | 44 ++

[PATCH v5 0/2] cpuset: Enable cpuset controller in default hierarchy

2018-03-15 Thread Waiman Long
adds flags with support for the sched_load_balance only. Waiman Long (2): cpuset: Enable cpuset controller in default hierarchy cpuset: Add cpuset.flags control knob to v2 Documentation/cgroup-v2.txt | 128 kernel/cgroup/cpuset.c

Re: [PATCH v4] cpuset: Enable cpuset controller in default hierarchy

2018-03-12 Thread Waiman Long
On 03/10/2018 08:16 AM, Peter Zijlstra wrote: > On Fri, Mar 09, 2018 at 06:06:29PM -0500, Waiman Long wrote: >> So you are talking about sched_relax_domain_level and > That one I wouldn't be sad to see the back of. > >> sched_load_balance. > This one, that's critical. And

Re: [PATCH v4] cpuset: Enable cpuset controller in default hierarchy

2018-03-09 Thread Waiman Long
On 03/09/2018 05:17 PM, Peter Zijlstra wrote: > On Fri, Mar 09, 2018 at 03:43:34PM -0500, Waiman Long wrote: >> The isolcpus= parameter just reduce the cpus available to the rests of >> the system. The cpuset controller does look at that value and make >> adjustment ac

Re: [PATCH v4] cpuset: Enable cpuset controller in default hierarchy

2018-03-09 Thread Waiman Long
On 03/09/2018 02:40 PM, Mike Galbraith wrote: >>> >>> If v2 is to ever supersede v1, as is the normal way of things, core >>> functionality really should be on the v2 boat when it sails. What you >>> left standing on the dock is critical core cpuset functionality. >>> >>> -Mike >> From your

Re: [PATCH v4] cpuset: Enable cpuset controller in default hierarchy

2018-03-09 Thread Waiman Long
On 03/09/2018 01:17 PM, Mike Galbraith wrote: > On Fri, 2018-03-09 at 12:45 -0500, Waiman Long wrote: >> On 03/09/2018 11:34 AM, Mike Galbraith wrote: >>> On Fri, 2018-03-09 at 10:35 -0500, Waiman Long wrote: >>>> Given the fact that thread mode had been merged

Re: [PATCH v4] cpuset: Enable cpuset controller in default hierarchy

2018-03-09 Thread Waiman Long
On 03/09/2018 11:34 AM, Mike Galbraith wrote: > On Fri, 2018-03-09 at 10:35 -0500, Waiman Long wrote: >> Given the fact that thread mode had been merged into 4.14, it is now >> time to enable cpuset to be used in the default hierarchy (cgroup v2) >> as it is clearly threa

[PATCH v4] cpuset: Enable cpuset controller in default hierarchy

2018-03-09 Thread Waiman Long
. Signed-off-by: Waiman Long <long...@redhat.com> --- Documentation/cgroup-v2.txt | 96 - kernel/cgroup/cpuset.c | 44 +++-- 2 files changed, 127 insertions(+), 13 deletions(-) diff --git a/Documentation/cgroup-v2.txt b/Documen

Re: [PATCH v3] cpuset: Enable cpuset controller in default hierarchy

2017-11-27 Thread Waiman Long
On 11/27/2017 04:42 PM, Tejun Heo wrote: > Hello, Waiman. > > On Mon, Nov 27, 2017 at 04:19:57PM -0500, Waiman Long wrote: >>> Let's start just with [e]cpus and [e]mems. The flags interface looks >>> fine but the implementations of these features are really bad and

Re: [PATCH v3] cpuset: Enable cpuset controller in default hierarchy

2017-11-27 Thread Waiman Long
On 11/27/2017 04:04 PM, Tejun Heo wrote: > Hello, Waiman. > > Sorry about the long delay. > > On Fri, Oct 06, 2017 at 05:10:30PM -0400, Waiman Long wrote: >> +Cpuset Interface Files >> +~~ >> + >> + cpuset.cpus >> +A read-write

Re: [PATCH v3] cpuset: Enable cpuset controller in default hierarchy

2017-11-14 Thread Waiman Long
On 10/26/2017 02:12 PM, Waiman Long wrote: > On 10/26/2017 10:39 AM, Tejun Heo wrote: >> Hello, Waiman. >> >> On Wed, Oct 25, 2017 at 11:50:34AM -0400, Waiman Long wrote: >>> Ping! Any comment on this patch? >> Sorry about the lack of response. Here are my t

Re: [PATCHv2 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-11-02 Thread Waiman Long
On 11/02/2017 02:08 PM, Eduardo Valentin wrote: > On Thu, Nov 02, 2017 at 06:56:46PM +0100, Paolo Bonzini wrote: >> On 02/11/2017 18:45, Eduardo Valentin wrote: >>> Currently, the existing qspinlock implementation will fallback to >>> test-and-set if the hypervisor has not set the PV_UNHALT flag.

Re: [PATCH v3] cpuset: Enable cpuset controller in default hierarchy

2017-10-26 Thread Waiman Long
On 10/26/2017 10:39 AM, Tejun Heo wrote: > Hello, Waiman. > > On Wed, Oct 25, 2017 at 11:50:34AM -0400, Waiman Long wrote: >> Ping! Any comment on this patch? > Sorry about the lack of response. Here are my two thoughts. > > 1. I'm not really sure about the memo

Re: [PATCH v3] cpuset: Enable cpuset controller in default hierarchy

2017-10-25 Thread Waiman Long
On 10/06/2017 05:10 PM, Waiman Long wrote: > Given the fact that thread mode had been merged into 4.14, it is now > time to enable cpuset to be used in the default hierarchy (cgroup v2) > as it is clearly threaded. > > The cpuset controller had experienced feature creep since its

Re: [PATCH 1/1] locking/qspinlock/x86: Avoid test-and-set when PV_DEDICATED is set

2017-10-24 Thread Waiman Long
On 10/24/2017 11:37 AM, Eduardo Valentin wrote: > Hello Peter, > On Tue, Oct 24, 2017 at 10:13:45AM +0200, Peter Zijlstra wrote: >> On Mon, Oct 23, 2017 at 05:44:27PM -0700, Eduardo Valentin wrote: >>> @@ -46,6 +48,8 @@ static inline bool virt_spin_lock(struct qspinlock *lock) >>> if

[PATCH v3] cpuset: Enable cpuset controller in default hierarchy

2017-10-06 Thread Waiman Long
naming consistency. v3: - Further trim the additional features down to just memory_migrate. - Update Documentation/cgroup-v2.txt. Signed-off-by: Waiman Long <long...@redhat.com> --- Documentation/cgroup-v2.txt | 122 kernel/cgroup/cpuset.c |

Re: [PATCH resend] x86,kvm: Add a kernel parameter to disable PV spinlock

2017-09-04 Thread Waiman Long
On 09/04/2017 10:40 AM, Peter Zijlstra wrote: > On Mon, Sep 04, 2017 at 04:28:36PM +0200, Oscar Salvador wrote: >> This is just a resend of Waiman Long's patch. >> I could not find why it was not merged to upstream, so I thought >> to give it another chance. >> What

Re: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries

2017-08-28 Thread Waiman Long
On 08/28/2017 01:58 PM, Waiman Long wrote: > On 07/28/2017 02:34 PM, Waiman Long wrote: >> v2->v3: >> - Add a faster pruning rate when the free pool is closed to depletion. >> - As suggested by James Bottomley, add an artificial delay waiting >> loop be

Re: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries

2017-08-28 Thread Waiman Long
On 07/28/2017 02:34 PM, Waiman Long wrote: > v2->v3: > - Add a faster pruning rate when the free pool is closed to depletion. > - As suggested by James Bottomley, add an artificial delay waiting > loop before killing a negative dentry and properly clear the > DCACHE_

Re: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries

2017-08-21 Thread Waiman Long
On 08/20/2017 11:23 PM, Wangkai (Kevin,C) wrote: > > Yes, I have add some trace info for the dentry state changed, with dentry > flag and reference count: > > File create: > [ 42.636675] dentry [_1234] 0x880230be8180 flag 0x0 ref 1 ev dentry > alloc > File close: > [ 42.637421]

Re: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries

2017-08-18 Thread Waiman Long
On 08/18/2017 05:59 AM, Wangkai (Kevin,C) wrote: > >>> In my patch the DCACHE_FILE_REMOVED flag was to distinguish the >>> removed file and The closed file, I found there was no difference of a >>> dentry between the removed file and the closed File, they all on the lru >>> list. >> There is a

Re: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries

2017-08-17 Thread Waiman Long
On 08/17/2017 12:00 AM, Wangkai (Kevin,C) wrote: > >>> >>> Hi Longman, >>> I am a fresher of fsdevel, about 2 weeks before, I have joined this >>> mail list, recently I have met the same problem of negative dentries, >>> in my opinion, the dentries should be remove together with the files or >>

Re: [PATCH] cpuset: Allow v2 behavior in v1 cgroup

2017-08-16 Thread Waiman Long
On 08/16/2017 10:36 AM, Tejun Heo wrote: > Hello, > > On Wed, Aug 16, 2017 at 10:34:05AM -0400, Waiman Long wrote: >>> It feels weird to make this a kernel boot param when all other options >>> are specified on mount time. Is there a reason why this can't be a >>&

Re: [PATCH] cpuset: Allow v2 behavior in v1 cgroup

2017-08-16 Thread Waiman Long
On 08/16/2017 10:29 AM, Tejun Heo wrote: > Hello, Waiman. > > On Tue, Aug 15, 2017 at 01:27:20PM -0400, Waiman Long wrote: >> +cpuset_v2_mode= [KNL] Enable cpuset v2 behavior in cpuset v1 cgroups. >> +In v2 mode, the cpus and

Re: [PATCH v3 0/5] fs/dcache: Limit # of negative dentries

2017-08-16 Thread Waiman Long
On 08/16/2017 06:33 AM, Wangkai (Kevin,C) wrote: >> -Original Message- >> From: linux-fsdevel-ow...@vger.kernel.org >> [mailto:linux-fsdevel-ow...@vger.kernel.org] On Behalf Of Waiman Long >> Sent: Wednesday, August 16, 2017 1:15 AM >> To: Alexander Viro; Jo

  1   2   3   4   >