[PATCH] mm/page_alloc: fix documentation error

2020-06-24 Thread Joel Savitz
that mistake. Signed-off-by: Joel Savitz --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 48eb0f1410d4..e028b87ce294 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7832,7 +7832,7 @@ void setup_per_zone_wmarks

[PATCH v2] mm/page_alloc: fix documentation error and remove magic numbers

2020-06-24 Thread Joel Savitz
: - declare constants via enum instead of separate integers Suggested-by: John Hubbard Suggested-by: Vlastimil Babka Signed-off-by: Joel Savitz --- mm/page_alloc.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 48eb0f1410d4

[PATCH] mm/page_alloc: fix documentation error and remove magic numbers

2020-06-23 Thread Joel Savitz
Hubbard Suggested-by: Vlastimil Babka Signed-off-by: Joel Savitz --- mm/page_alloc.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 48eb0f1410d4..f725addc2748 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7832,7

[PATCH] fs: proc: Clarify warnings for invalid proc dir names

2019-10-20 Thread Joel Savitz
stand their mistake. Signed-off-by: Fabrizio D'Angelo Signed-off-by: Joel Savitz --- fs/proc/generic.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 64e9ee1b129e..df04fd4f02af 100644 --- a/fs/proc/generic.c +++ b/fs/p

[PATCH] mm: fix typo in comment

2019-08-01 Thread Joel Savitz
Fix spelling of successful (currently spelled successfull in kernel source) Signed-off-by: Joel Savitz --- include/linux/compaction.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/compaction.h b/include/linux/compaction.h index 9569e7c786d3..4122df65eb44

Re: [PATCH v2] PCI: rpaphp: Avoid a sometimes-uninitialized warning

2019-06-27 Thread Joel Savitz
han Chancellor >> --- >> >> v1 -> v2: >> >> * Eliminate fndit altogether by shuffling the sprintf call into the for >> loop and changing the if conditional, as suggested by Nick. > >> drivers/pci/hotplug/rpaphp_core.c | 18 +++--- >> 1 file changed, 7 insertions(+), 11 deletions(-) >> Gentle ping, can someone pick this up? Looks a good simplification of somewhat convoluted control flow. Acked-by: Joel Savitz

Re: [PATCH v4] fs/proc: add VmTaskSize field to /proc/$$/status

2019-06-15 Thread Joel Savitz
The most immediate use case is the optimization of an internal test, but upon closer examination neither this patch nor the test itself turn out to be worth pursuing. Thank you for your time and constructive comments. Best, Joel Savitz On Thu, Jun 13, 2019 at 3:30 PM Andrew Morton wrote

Re: [PATCH v2] cpuset: restore sanity to cpuset_cpus_allowed_fallback()

2019-06-13 Thread Joel Savitz
patched kernel, the last `taskset -p $$` outputs: pid 2274's current affinity mask: fffb Which is the behavior that this patch aims to modify This case, which I believe is generalizable, demonstrates that we retain the "no longer affine to..." output on a kernel with this patch.

[PATCH v4] fs/proc: add VmTaskSize field to /proc/$$/status

2019-06-13 Thread Joel Savitz
The kernel provides no architecture-independent mechanism to get the size of the virtual address space of a task (userspace process) without brute-force calculation. This patch allows a user to easily retrieve this value via a new VmTaskSize entry in /proc/$$/status. Signed-off-by: Joel Savitz

[RESEND PATCH v2] mm/oom_killer: Add task UID to info message on an oom kill

2019-06-12 Thread Joel Savitz
:129754836kB, file-rss:0kB, shmem-rss:0kB, UID 0 Suggested-by: David Rientjes Signed-off-by: Joel Savitz --- mm/oom_kill.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 3a2484884cfd..af2e3faa72a0 100644 --- a/mm/oom_kill.c +++ b/mm

[RESEND PATCH v3] cpuset: restore sanity to cpuset_cpus_allowed_fallback()

2019-06-12 Thread Joel Savitz
_every_ other valid avenue has been traveled, and it is the last resort before calling BUG(). Suggested-by: Waiman Long Suggested-by: Phil Auld Signed-off-by: Joel Savitz --- kernel/cgroup/cpuset.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/kernel/cgroup/cpu

[PATCH v3] cpuset: restore sanity to cpuset_cpus_allowed_fallback()

2019-06-12 Thread Joel Savitz
_every_ other valid avenue has been traveled, and it is the last resort before calling BUG(). Suggested-by: Waiman Long Suggested-by: Phil Auld Signed-off-by: Joel Savitz --- kernel/cgroup/cpuset.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/kernel/cgroup/cpu

Re: [PATCH v2] cpuset: restore sanity to cpuset_cpus_allowed_fallback()

2019-05-24 Thread Joel Savitz
On Tue, May 21, 2019 at 10:35 AM Michal Koutný wrote: > > $ grep Cpus /proc/$$/status > > Cpus_allowed: ff > > Cpus_allowed_list: 0-7 > > (a) > > > $ taskset -p 4 $$ > > pid 19202's current affinity mask: f > I'm confused where this value comes from, I must be

[RESEND PATCH v2] cpuset: restore sanity to cpuset_cpus_allowed_fallback()

2019-05-07 Thread Joel Savitz
triggered if _every_ other valid avenue has been traveled, and it is the last resort before calling BUG(). Signed-off-by: Joel Savitz --- Makefile | 2 +- kernel/cgroup/cpuset.c | 15 ++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/kernel/cgroup/cpuset.

[PATCH v3] fs/proc: add VmTaskSize field to /proc/$$/status

2019-05-06 Thread Joel Savitz
cpu cycles recalculating a non-sensitive process-dependent value already known to the kernel can now be optimized to use this mechanism. Signed-off-by: Joel Savitz --- Documentation/filesystems/proc.txt | 2 ++ fs/proc/task_mmu.c | 2 ++ 2 files changed, 4 insertions(+) diff --git

[PATCH v3 2/2] prctl.2: Document the new PR_GET_TASK_SIZE option

2019-05-03 Thread Joel Savitz
Add a short explanation of the new PR_GET_TASK_SIZE option for the benefit of future generations. Suggested-by: David Laight Signed-off-by: Joel Savitz --- man2/prctl.2 | 10 ++ 1 file changed, 10 insertions(+) diff --git a/man2/prctl.2 b/man2/prctl.2 index 06d8e13c7..cae582726 100644

[PATCH v3 1/2] kernel/sys: add PR_GET_TASK_SIZE option to prctl(2)

2019-05-03 Thread Joel Savitz
number of bytes to userspace to avoid stack corruption. Suggested-by: Yuri Norov Suggested-by: Alexey Dobriyan Signed-off-by: Joel Savitz --- include/uapi/linux/prctl.h | 3 +++ kernel/sys.c | 23 +++ 2 files changed, 26 insertions(+) diff --git a/include/uapi

[PATCH v3 0/2] sys/prctl: expose TASK_SIZE value to userspace

2019-05-03 Thread Joel Savitz
ath to O(1) in an architecture-independent manner, and provide a mechanism for future generations to do the same. Changes from v2: We now account for the case of 32-bit compat userspace on a 64-bit kernel More detail about the nature of TASK_SIZE in documentation Joel Savitz(2): sys/

Re: [PATCH 2/2] prctl.2: Document the new PR_GET_TASK_SIZE option

2019-05-03 Thread Joel Savitz
cess can use.' But I might be wrong. I believe you are correct David. I will add this information to the manpage in the upcoming v3. Best, Joel Savitz

Re: [PATCH v2 1/2] kernel/sys: add PR_GET_TASK_SIZE option to prctl(2)

2019-05-02 Thread Joel Savitz
> Won't be possible to use put_user here? Something like > > static int prctl_get_tasksize(unsigned long __user *uaddr) > { > return put_user(TASK_SIZE, uaddr) ? -EFAULT : 0; > } What would be the benefit of using put_user() over copy_to_user() in this context?

Re: [PATCH v2 0/2] sys/prctl: expose TASK_SIZE value to userspace

2019-05-02 Thread Joel Savitz
Yes, this the change, thanks to the suggestion of Yury Norov. I also now explicitly mention the expected userspace destination type in the manpage patch. Best, Joel Savitz On Thu, May 2, 2019 at 5:10 PM Cyrill Gorcunov wrote: > > On Thu, May 02, 2019 at 05:01:38PM -0400, Waiman Long

[PATCH v2 1/2] kernel/sys: add PR_GET_TASK_SIZE option to prctl(2)

2019-05-02 Thread Joel Savitz
When PR_GET_TASK_SIZE is passed to prctl, the kernel will attempt to copy the value of TASK_SIZE to the userspace address in arg2. Suggested-by: Alexey Dobriyan Signed-off-by: Joel Savitz --- include/uapi/linux/prctl.h | 3 +++ kernel/sys.c | 10 ++ 2 files changed, 13

[PATCH v2 2/2] prctl.2: Document the new PR_GET_TASK_SIZE option

2019-05-02 Thread Joel Savitz
Add a short explanation of the new PR_GET_TASK_SIZE option for the benefit of future generations. Signed-off-by: Joel Savitz --- man2/prctl.2 | 9 + 1 file changed, 9 insertions(+) diff --git a/man2/prctl.2 b/man2/prctl.2 index 06d8e13c7..35a6a3919 100644 --- a/man2/prctl.2 +++ b/man2

[PATCH v2 0/2] sys/prctl: expose TASK_SIZE value to userspace

2019-05-02 Thread Joel Savitz
ath to O(1) in an architecture-independent manner, and provide a mechanism for others to do the same. Joel Savitz(2): sys/prctl: add PR_GET_TASK_SIZE option to prctl(2) prctl.2: Document the new PR_GET_TASK_SIZE option include/uapi/linux/prctl.h | 3 +++ kernel/sys.c | 10 +++

[PATCH 2/2] prctl.2: Document the new PR_GET_TASK_SIZE option

2019-05-02 Thread Joel Savitz
Add a short explanation of the new PR_GET_TASK_SIZE option for the benefit of future generations. Signed-off-by: Joel Savitz --- man2/prctl.2 | 9 + 1 file changed, 9 insertions(+) diff --git a/man2/prctl.2 b/man2/prctl.2 index 06d8e13c7..35a6a3919 100644 --- a/man2/prctl.2 +++ b/man2

[PATCH 1/2] kernel/sys: add PR_GET_TASK_SIZE option to prctl(2)

2019-05-02 Thread Joel Savitz
When PR_GET_TASK_SIZE is passed to prctl, the kernel will attempt to copy the value of TASK_SIZE to the userspace address in arg2. Suggested-by: Alexey Dobriyan Signed-off-by: Joel Savitz --- include/uapi/linux/prctl.h | 3 +++ kernel/sys.c | 10 ++ 2 files changed, 13

[PATCH 0/2] sys/prctl: expose TASK_SIZE value to userspace

2019-05-02 Thread Joel Savitz
ath to O(1) in an architecture-independent manner, and provide a mechanism for others to do the same. Joel Savitz(2): sys/prctl: add PR_GET_TASK_SIZE option to prctl(2) prctl.2: Document the new PR_GET_TASK_SIZE option include/uapi/linux/prctl.h | 3 +++ kernel/sys.c | 10 +++

Re: [PATCH v2] fs/proc: add VmTaskSize field to /proc/$$/status

2019-04-30 Thread Joel Savitz
Good point Alexey. Expect v3 shortly. Best, Joel Savitz On Sat, Apr 27, 2019 at 5:45 PM Alexey Dobriyan wrote: > > On Fri, Apr 26, 2019 at 03:02:08PM -0400, Joel Savitz wrote: > > In the mainline kernel, there is no quick mechanism to get the virtual > > memory size of t

[PATCH v2] fs/proc: add VmTaskSize field to /proc/$$/status

2019-04-26 Thread Joel Savitz
f the test using a kernel with this patch, and of course it passed through the previously bottlenecking codepath nearly instantaneously. This patched enabled me to upgrade an O(n) codepath to O(1) in an architecture-independent manner. Signed-off-by: Joel Savitz --- Documentation/filesystems/pr

[PATCH v2] mm/oom_killer: Add task UID to info message on an oom kill

2019-04-26 Thread Joel Savitz
:129754836kB, file-rss:0kB, shmem-rss:0kB, UID 0 Signed-off-by: Joel Savitz --- mm/oom_kill.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 3a2484884cfd..af2e3faa72a0 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -874,12 +874,13

[PATCH] fs/proc: add VmTaskSize field to /proc/$$/status

2019-04-25 Thread Joel Savitz
modification to the test component would be portable across all architechtures. Signed-off-by: Joel Savitz --- fs/proc/task_mmu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 92a91e7816d8..f64b9a949624 100644 --- a/fs/proc

[PATCH] mm/oom_killer: Add task UID to info message on an oom kill

2019-04-24 Thread Joel Savitz
, anon-rss:129754836kB, file-rss:0kB, shmem-rss:0kB Signed-off-by: Joel Savitz --- mm/oom_kill.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 3a2484884cfd..22972648b758 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -874,9 +874,9

[tip:sched/core] sched/core: Fix typo in comment

2019-04-19 Thread tip-bot for Joel Savitz
Commit-ID: bee9853932e90ce94bce4276ec6b7b06bc48070b Gitweb: https://git.kernel.org/tip/bee9853932e90ce94bce4276ec6b7b06bc48070b Author: Joel Savitz AuthorDate: Wed, 6 Mar 2019 20:13:33 -0500 Committer: Ingo Molnar CommitDate: Fri, 19 Apr 2019 12:22:16 +0200 sched/core: Fix typo in

[PATCH v2] cpuset: restore sanity to cpuset_cpus_allowed_fallback()

2019-04-09 Thread Joel Savitz
triggered if _every_ other valid avenue has been traveled, and it is the last resort before calling BUG(). Signed-off-by: Joel Savitz --- kernel/cgroup/cpuset.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index 4

Fwd: [RESEND PATCH] cpuset: restore sanity to cpuset_cpus_allowed_fallback()

2019-04-05 Thread Joel Savitz
-- Forwarded message - From: Joel Savitz Date: Fri, Apr 5, 2019 at 11:37 AM Subject: [RESEND PATCH] cpuset: restore sanity to cpuset_cpus_allowed_fallback() To: Cc: Joel Savitz , Li Zefan , If a process is limited by taskset (i.e. cpuset) to only be allowed to run on cpu N

Re: [PATCH] cpuset: restore sanity to cpuset_cpus_allowed_fallback()

2019-03-26 Thread Joel Savitz
Forgot to add cc's... my bad. Best, Joel Savitz On Tue, Mar 26, 2019 at 1:31 PM Joel Savitz wrote: > > Ping! > > Does anyone have any comments or concerns about this patch? > > Best, > Joel Savitz > > Best, > Joel Savitz > > > On Thu, Mar 7, 2019 a

Re: [PATCH] cpuset: restore sanity to cpuset_cpus_allowed_fallback()

2019-03-26 Thread Joel Savitz
Ping! Does anyone have any comments or concerns about this patch? Best, Joel Savitz Best, Joel Savitz On Thu, Mar 7, 2019 at 9:42 AM Joel Savitz wrote: > > On Wed, Mar 6, 2019 at 7:55 PM Joel Savitz wrote: > > > > If a process is limited by taskset (i.e. cpuset) to

Re: [PATCH] sched: fix spelling of active in comment on is_cpu_allowed()

2019-03-07 Thread Joel Savitz
Best, Joel Savitz On Wed, Mar 6, 2019 at 8:13 PM Joel Savitz wrote: > > trivial fix of documentation typo > > Signed-off-by: Joel Savitz > --- > kernel/sched/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/sched/core.c b/

Re: [PATCH] cpuset: restore sanity to cpuset_cpus_allowed_fallback()

2019-03-07 Thread Joel Savitz
On Wed, Mar 6, 2019 at 7:55 PM Joel Savitz wrote: > > If a process is limited by taskset (i.e. cpuset) to only be allowed to > run on cpu N, and then cpu N is offlined via hotplug, the process will > be assigned the current value of its cpuset cgroup's effective_cpus fie

[PATCH] sched: fix spelling of active in comment on is_cpu_allowed()

2019-03-06 Thread Joel Savitz
trivial fix of documentation typo Signed-off-by: Joel Savitz --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index ead464a..2e2e19b 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -920,7 +920,7

[PATCH] cpuset: restore sanity to cpuset_cpus_allowed_fallback()

2019-03-06 Thread Joel Savitz
tput instead: $ grep Cpus /proc/$$/status Cpus_allowed: ff Cpus_allowed_list: 0-7 This patch changes the above behavior by instead simply resetting the mask to cpu_possible_mask. Signed-off-by: Joel Savitz --- kernel/cgroup/cpuset.c | 2 +- 1 file changed, 1 inse