[PATCH 6/8] sched,cfs: fix zero length timeslice calculation

2019-06-12 Thread Rik van Riel
less frequently. Signed-off-by: Rik van Riel --- kernel/sched/fair.c | 25 - 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index c6ede2ecc935..35153a89d5c5 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c

[PATCH 4/8] sched,fair: remove cfs rqs from leaf_cfs_rq_list bottom up

2019-06-12 Thread Rik van Riel
nce it no longer has children on the list, we can avoid walking the sched_entity hierarchy if the bottom cfs_rq is on the list, once the runqueues have been flattened. Signed-off-by: Rik van Riel --- kernel/sched/fair.c | 17 + kernel/sched/sched.h | 1 + 2 files changed, 18 inserti

[PATCH 8/8] sched,fair: flatten hierarchical runqueues

2019-06-12 Thread Rik van Riel
-off-by: Rik van Riel --- include/linux/sched.h | 2 + kernel/sched/fair.c | 478 +- kernel/sched/pelt.c | 6 +- kernel/sched/pelt.h | 2 +- kernel/sched/sched.h | 2 +- 5 files changed, 194 insertions(+), 296 deletions(-) diff --git a/include

[PATCH 1/8] sched: introduce task_se_h_load helper

2019-06-12 Thread Rik van Riel
Sometimes the hierarchical load of a sched_entity needs to be calculated. Split out task_h_load into a task_se_h_load that takes a sched_entity pointer as its argument, and a task_h_load wrapper that calls task_se_h_load. No functional changes. Signed-off-by: Rik van Riel --- kernel/sched

[PATCH 5/8] sched,cfs: use explicit cfs_rq of parent se helper

2019-06-12 Thread Rik van Riel
Use an explicit "cfs_rq of parent sched_entity" helper in a few strategic places, where cfs_rq_of(se) may no longer point at the right runqueue once we flatten the hierarchical cgroup runqueues. No functional change. Signed-off-by: Rik van Riel --- kernel/sched/fair.c | 17 ++

[PATCH 3/8] sched,fair: redefine runnable_load_avg as the sum of task_h_load

2019-06-12 Thread Rik van Riel
runqueue for the CPU controller. Signed-off-by: Rik van Riel --- include/linux/sched.h | 3 +- kernel/sched/core.c | 2 - kernel/sched/debug.c | 1 + kernel/sched/fair.c | 125 +- kernel/sched/pelt.c | 49 ++--- kernel/sched/sched.h

[PATCH 2/8] sched: change /proc/sched_debug fields

2019-06-12 Thread Rik van Riel
Remove some fields from /proc/sched_debug that are removed from sched_entity in a subsequent patch, and add h_load, which comes in very handy to debug CPU controller weight distribution. Signed-off-by: Rik van Riel --- kernel/sched/debug.c | 11 ++- 1 file changed, 2 insertions(+), 9

[RFC] sched,cfs: flatten CPU controller runqueues

2019-06-12 Thread Rik van Riel
The current implementation of the CPU controller uses hierarchical runqueues, where on wakeup a task is enqueued on its group's runqueue, the group is enqueued on the runqueue of the group above it, etc. This increases a fairly large amount of overhead for workloads that do a lot of wakeups a

Re: question on lazy tlb flush

2019-05-29 Thread Rik van Riel
On Wed, 2019-05-29 at 12:54 +0800, Zhenzhong Duan wrote: > Hi Maintainers, > > A question raised when I learned below code. Appreciate any help me > understand the code. > > void native_flush_tlb_others(const struct cpumask *cpumask, > const struct flush_tlb_info

Re: [PATCH 7/7] sched/fair: Rename weighted_cpuload() to cpu_load()

2019-05-27 Thread Rik van Riel
On Mon, 2019-05-27 at 07:21 +0100, Dietmar Eggemann wrote: > This is done to align the per cpu (i.e. per rq) load with the util > counterpart (cpu_util(int cpu)). The term 'weighted' is not needed > since there is no 'unweighted' load to distinguish it from. I can see why you want to make

Re: [PATCH 6/7] sched/fair: Remove sgs->sum_weighted_load

2019-05-27 Thread Rik van Riel
On Mon, 2019-05-27 at 07:21 +0100, Dietmar Eggemann wrote: > Since sg_lb_stats::sum_weighted_load is now identical with > sg_lb_stats::group_load remove it and replace its use case > (calculating load per task) with the latter. > > Signed-off-by: Dietmar Eggemann Acked-b

Re: [PATCH 5/7] sched: Remove sd->*_idx

2019-05-27 Thread Rik van Riel
On Mon, 2019-05-27 at 07:21 +0100, Dietmar Eggemann wrote: > The sched domain per rq load index files also disappear from the > /proc/sys/kernel/sched_domain/cpuX/domainY directories. > > Signed-off-by: Dietmar Eggemann Acked-by: Rik van Riel signature.asc Description: This is

Re: [PATCH 4/7] sched: Remove rq->cpu_load[]

2019-05-27 Thread Rik van Riel
On Mon, 2019-05-27 at 07:21 +0100, Dietmar Eggemann wrote: > The per rq load array values also disappear from the cpu#X sections > in > /proc/sched_debug. > > Signed-off-by: Dietmar Eggemann Acked-by: Rik van Riel signature.asc Description: This is a digitally signed message part

Re: [PATCH 3/7] sched/debug: Remove sd->*_idx range on sysctl

2019-05-27 Thread Rik van Riel
ed before that close parenthesis ')' > > Signed-off-by: Dietmar Eggemann Acked-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH 1/7] sched: Remove rq->cpu_load[] update code

2019-05-27 Thread Rik van Riel
On Mon, 2019-05-27 at 07:21 +0100, Dietmar Eggemann wrote: > With LB_BIAS disabled, there is no need to update the rq- > >cpu_load[idx] > any more. > > Signed-off-by: Dietmar Eggemann Acked-by: Rik van Riel signature.asc Description: This is a digitally signed message part

Re: [PATCH 2/7] sched/fair: Replace source_load() & target_load() w/ weighted_cpuload()

2019-05-27 Thread Rik van Riel
_idx(), can be removed as well. > > Finally, get rid of the sched feature LB_BIAS. > > Signed-off-by: Dietmar Eggemann Acked-by: Rik van Riel signature.asc Description: This is a digitally signed message part

Re: [PATCH] smp,cpumask: Don't call functions on offline CPUs

2019-05-22 Thread Rik van Riel
On Wed, 2019-05-22 at 16:49 +0200, Peter Zijlstra wrote: > On Wed, May 22, 2019 at 03:37:11PM +0100, Andrew Murray wrote: > > > Is perhaps the problem that on_each_cpu_cond() uses > > > cpu_onlne_mask > > > without protection? > > > > Does this prevent racing with a CPU going offline? I guess

[PATCH] kvm: change KVM_REQUEST_MASK to reflect vcpu.requests size

2019-05-21 Thread Rik van Riel
w users of kvm_make_request to overflow the vcpu.requests bitmask, and is confusing to developers examining the code. Redefine KVM_REQUEST_MASK to reflect the number of bits that actually fit inside an unsigned long, and add a comment explaining set_bit and friends take bit numbers, not a bitmask. Signed-off-by:

Re: [PATCH] fs,xfs: fix missed wakeup on l_flush_wait

2019-05-09 Thread Rik van Riel
On Thu, 2019-05-09 at 07:32 +1000, Dave Chinner wrote: > Hmmm, the first wakeup in xsdc is this one, right: > > /* wake up threads waiting in xfs_log_force() */ > wake_up_all(>ic_force_wait); > > At the end of the iclog iteration loop? That one is under the >

Re: [PATCH] fs,xfs: fix missed wakeup on l_flush_wait

2019-05-08 Thread Rik van Riel
On Wed, 2019-05-08 at 07:22 +1000, Dave Chinner wrote: > On Tue, May 07, 2019 at 01:05:28PM -0400, Rik van Riel wrote: > > The code in xlog_wait uses the spinlock to make adding the task to > > the wait queue, and setting the task state to UNINTERRUPTIBLE > > atomic > >

[PATCH] fs,xfs: fix missed wakeup on l_flush_wait

2019-05-07 Thread Rik van Riel
the l_icloglock is already used inside xlog_wait; it is unclear why the waker was doing things differently. Signed-off-by: Rik van Riel Reported-by: Chris Mason diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index c3b610b687d1..8b9be76b2412 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c

Re: [PATCH] x86/fpu: Remove the _GPL from the kernel_fpu_begin/end() export

2019-05-05 Thread Rik van Riel
On Sat, 2019-05-04 at 04:28 +0200, Sebastian Gottschall wrote: > Using fpu code in kernel space in a kernel module is a derived work > of > the kernel itself? > dont get me wrong, but this is absurd. i mean you limit the use of > cpu > instructions. the use > of cpu instructions should be free

[tip:x86/fpu] x86/fpu: Defer FPU state load until return to userspace

2019-04-13 Thread tip-bot for Rik van Riel
Commit-ID: 5f409e20b794565e2d60ad333e79334630a6c798 Gitweb: https://git.kernel.org/tip/5f409e20b794565e2d60ad333e79334630a6c798 Author: Rik van Riel AuthorDate: Wed, 3 Apr 2019 18:41:52 +0200 Committer: Borislav Petkov CommitDate: Fri, 12 Apr 2019 19:34:47 +0200 x86/fpu: Defer FPU

[tip:x86/fpu] x86/fpu: Prepare copy_fpstate_to_sigframe() for TIF_NEED_FPU_LOAD

2019-04-13 Thread tip-bot for Rik van Riel
Commit-ID: a352a3b7b7920212ee4c45a41500c66826318e92 Gitweb: https://git.kernel.org/tip/a352a3b7b7920212ee4c45a41500c66826318e92 Author: Rik van Riel AuthorDate: Wed, 3 Apr 2019 18:41:47 +0200 Committer: Borislav Petkov CommitDate: Thu, 11 Apr 2019 18:20:04 +0200 x86/fpu: Prepare

[tip:x86/fpu] x86/fpu: Always store the registers in copy_fpstate_to_sigframe()

2019-04-13 Thread tip-bot for Rik van Riel
Commit-ID: 69277c98f5eef0d9839699b7825923c3985f665f Gitweb: https://git.kernel.org/tip/69277c98f5eef0d9839699b7825923c3985f665f Author: Rik van Riel AuthorDate: Wed, 3 Apr 2019 18:41:46 +0200 Committer: Borislav Petkov CommitDate: Thu, 11 Apr 2019 18:08:57 +0200 x86/fpu: Always store

[tip:x86/fpu] x86/fpu: Eager switch PKRU state

2019-04-13 Thread tip-bot for Rik van Riel
Commit-ID: 0cecca9d03c964abbd2b7927d0670eb70db4ebf2 Gitweb: https://git.kernel.org/tip/0cecca9d03c964abbd2b7927d0670eb70db4ebf2 Author: Rik van Riel AuthorDate: Wed, 3 Apr 2019 18:41:44 +0200 Committer: Borislav Petkov CommitDate: Thu, 11 Apr 2019 15:57:10 +0200 x86/fpu: Eager switch

[tip:x86/fpu] x86/fpu: Add an __fpregs_load_activate() internal helper

2019-04-13 Thread tip-bot for Rik van Riel
Commit-ID: 4ee91519e1dccc175665fe24bb20a47c6053575c Gitweb: https://git.kernel.org/tip/4ee91519e1dccc175665fe24bb20a47c6053575c Author: Rik van Riel AuthorDate: Wed, 3 Apr 2019 18:41:38 +0200 Committer: Borislav Petkov CommitDate: Wed, 10 Apr 2019 16:23:14 +0200 x86/fpu: Add

Re: [Lsf-pc] [RFC 0/2] opportunistic memory reclaim of a killed process

2019-04-11 Thread Rik van Riel
On Wed, 2019-04-10 at 18:43 -0700, Suren Baghdasaryan via Lsf-pc wrote: > The time to kill a process and free its memory can be critical when > the > killing was done to prevent memory shortages affecting system > responsiveness. The OOM killer is fickle, and often takes a fairly long time to

Re: crypto: Kernel memory overwrite attempt detected to spans multiple pages

2019-04-10 Thread Rik van Riel
On Wed, 2019-04-10 at 16:11 -0700, Eric Biggers wrote: > You've explained *what* it does again, but not *why*. *Why* do you > want > hardened usercopy to detect copies across page boundaries, when there > is no > actual buffer overflow? When some subsystem in the kernel allocates multiple pages

Re: [PATCH 5/5] mm/vmscan: don't forcely shrink active anon lru list

2019-02-26 Thread Rik van Riel
On Tue, 2019-02-26 at 15:04 +0300, Andrey Ryabinin wrote: > I think we should leave anon aging only for !SCAN_FILE cases. > At least aging was definitely invented for the SCAN_FRACT mode which > was the > main mode at the time it was added by the commit: > and I think would be reasonable to

Re: [PATCH 1/5] mm/workingset: remove unused @mapping argument in workingset_eviction()

2019-02-22 Thread Rik van Riel
On Fri, 2019-02-22 at 20:43 +0300, Andrey Ryabinin wrote: > workingset_eviction() doesn't use and never did use the @mapping > argument. > Remove it. > > Signed-off-by: Andrey Ryabinin > Cc: Johannes Weiner > Cc: Michal Hocko > Cc: Vlastimil Babka > Cc: Rik van Rie

Re: [PATCH 3/5] mm/compaction: pass pgdat to too_many_isolated() instead of zone

2019-02-22 Thread Rik van Riel
; Cc: Vlastimil Babka > Cc: Rik van Riel > Cc: Mel Gorman Acked-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH RFC] mm/vmscan: try to protect active working set of cgroup from reclaim.

2019-02-22 Thread Rik van Riel
On Fri, 2019-02-22 at 20:58 +0300, Andrey Ryabinin wrote: > In a presence of more than 1 memory cgroup in the system our reclaim > logic is just suck. When we hit memory limit (global or a limit on > cgroup with subgroups) we reclaim some memory from all cgroups. > This is sucks because, the

Re: [PATCH 4.20 71/92] Revert "mm: slowly shrink slabs with a relatively small number of objects"

2019-02-18 Thread Rik van Riel
On Mon, 2019-02-18 at 14:43 +0100, Greg Kroah-Hartman wrote: > 4.20-stable review patch. If anyone has any objections, please let > me know. > > -- > > From: Dave Chinner > > commit a9a238e83fbb0df31c3b9b67003f8f9d1d1b6c96 upstream. > > This reverts commit 172b06c32b9497

Re: [PATCH] mm,slab,vmscan: accumulate gradual pressure on small slabs

2019-01-28 Thread Rik van Riel
On Mon, 2019-01-28 at 12:10 -0800, Andrew Morton wrote: > On Mon, 28 Jan 2019 15:03:28 -0500 Rik van Riel > wrote: > > > On Mon, 2019-01-28 at 11:54 -0800, Andrew Morton wrote: > > > On Mon, 28 Jan 2019 14:35:35 -0500 Rik van Riel > > > &

Re: [PATCH] mm,slab,vmscan: accumulate gradual pressure on small slabs

2019-01-28 Thread Rik van Riel
On Mon, 2019-01-28 at 11:54 -0800, Andrew Morton wrote: > On Mon, 28 Jan 2019 14:35:35 -0500 Rik van Riel > wrote: > > > /* > > * Make sure we apply some minimal pressure on default priority > > -* even on small cgroups. Stale objects are no

[PATCH] mm,slab,vmscan: accumulate gradual pressure on small slabs

2019-01-28 Thread Rik van Riel
There are a few issues with the way the number of slab objects to scan is calculated in do_shrink_slab. First, for zero-seek slabs, we could leave the last object around forever. That could result in pinning a dying cgroup into memory, instead of reclaiming it. The fix for that is trivial.

Re: [PATCH v3 0/5] kvm "virtio pmem" device

2019-01-09 Thread Rik van Riel
On Thu, 2019-01-10 at 12:26 +1100, Dave Chinner wrote: > On Wed, Jan 09, 2019 at 08:17:31PM +0530, Pankaj Gupta wrote: > > This patch series has implementation for "virtio pmem". > > "virtio pmem" is fake persistent memory(nvdimm) in guest > > which allows to bypass the guest page cache. This

Re: [PATCH] mm,slab,memcg: call memcg kmem put cache with same condition as get

2019-01-09 Thread Rik van Riel
On Tue, 2019-01-08 at 21:36 -0800, Shakeel Butt wrote: > On Tue, Jan 8, 2019 at 8:01 PM Rik van Riel wrote: > > > > There is an imbalance between when slab_pre_alloc_hook calls > > memcg_kmem_get_cache and when slab_post_alloc_hook calls > > memcg_kmem_put_cache. &g

[PATCH] mm,slab,memcg: call memcg kmem put cache with same condition as get

2019-01-08 Thread Rik van Riel
e location to another. I am still tagging that changeset, because the fix should automatically apply that far back. Signed-off-by: Rik van Riel Fixes: 452647784b2f ("mm: memcontrol: cleanup kmem charge functions") Cc: kernel-t...@fb.com Cc: linux...@kvack.org Cc: sta...@vger.kernel.org Cc:

Re: [PATCH] fork, memcg: fix cached_stacks case

2019-01-04 Thread Rik van Riel
> this patch fixes. So, the same crash can happen if the memcg charge > of > a cached stack is failed. > > Fixes: 5eed6f1dff87 ("fork,memcg: fix crash in free_thread_stack on > memcg charge fail") > Signed-off-by: Shakeel Butt > Cc: Rik van Riel > Cc: Roman Gushc

[PATCH] fork,memcg: fix crash in free_thread_stack on memcg charge fail

2018-12-14 Thread Rik van Riel
: rework memcg kernel stack accounting") Cc: Andrew Morton Cc: Shakeel Butt Cc: Michal Hocko Cc: Johannes Weiner Cc: Tejun Heo Cc: Roman Gushchin Signed-off-by: Rik van Riel --- kernel/fork.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/kernel/fork.c b/kernel

Re: [PATCH 07/29] x86/fpu: don't export __kernel_fpu_{begin|end}()

2018-11-28 Thread Rik van Riel
On Wed, 2018-11-28 at 23:20 +0100, Sebastian Andrzej Siewior wrote: > > + * Use kernel_fpu_begin/end() if you intend to use FPU in kernel > context. It > + * disables preemption so be carefull if you intend to use it for > long periods Just how careful do you want to be? One l seems sufficient

Re: [PATCH 07/29] x86/fpu: don't export __kernel_fpu_{begin|end}()

2018-11-28 Thread Rik van Riel
On Wed, 2018-11-28 at 23:20 +0100, Sebastian Andrzej Siewior wrote: > > + * Use kernel_fpu_begin/end() if you intend to use FPU in kernel > context. It > + * disables preemption so be carefull if you intend to use it for > long periods Just how careful do you want to be? One l seems sufficient

Re: [PATCH 06/29] x86/fpu: Update comment for __raw_xsave_addr()

2018-11-28 Thread Rik van Riel
ased on that the function works for compacted buffers as long as the > CPU supports it and this what we care about. > > Remove the "Note:" which is not accurate. > > Suggested-by: Paolo Bonzini > Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Rik van Riel

Re: [PATCH 06/29] x86/fpu: Update comment for __raw_xsave_addr()

2018-11-28 Thread Rik van Riel
ased on that the function works for compacted buffers as long as the > CPU supports it and this what we care about. > > Remove the "Note:" which is not accurate. > > Suggested-by: Paolo Bonzini > Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Rik van Riel

Re: [PATCH 05/29] x86/fpu: add might_fault() to user_insn()

2018-11-28 Thread Rik van Riel
ed. Nice catch. > Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH 05/29] x86/fpu: add might_fault() to user_insn()

2018-11-28 Thread Rik van Riel
ed. Nice catch. > Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH 03/29] x86/entry: Remove _TIF_ALLWORK_MASK

2018-11-28 Thread Rik van Riel
ed-off-by: Sebastian Andrzej Siewior Reviewed-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH 04/29] x86/pkeys: Make init_pkru_value static

2018-11-28 Thread Rik van Riel
On Wed, 2018-11-28 at 23:20 +0100, Sebastian Andrzej Siewior wrote: > The variable init_pkru_value isn't used outside of this file. > Make init_pkru_value static. > > Acked-by: Dave Hansen > Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Rik van Riel -- All

Re: [PATCH 03/29] x86/entry: Remove _TIF_ALLWORK_MASK

2018-11-28 Thread Rik van Riel
ed-off-by: Sebastian Andrzej Siewior Reviewed-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH 04/29] x86/pkeys: Make init_pkru_value static

2018-11-28 Thread Rik van Riel
On Wed, 2018-11-28 at 23:20 +0100, Sebastian Andrzej Siewior wrote: > The variable init_pkru_value isn't used outside of this file. > Make init_pkru_value static. > > Acked-by: Dave Hansen > Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Rik van Riel -- All

Re: [PATCH 02/29] x86/entry/32: Remove asm/math_emu.h include

2018-11-28 Thread Rik van Riel
stian Andrzej Siewior Reviewed-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH 02/29] x86/entry/32: Remove asm/math_emu.h include

2018-11-28 Thread Rik van Riel
stian Andrzej Siewior Reviewed-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH 01/29] x86/fpu: Use ULL for shift in xfeature_uncompacted_offset()

2018-11-28 Thread Rik van Riel
en this check > won't > catch it. > > Use BIT_ULL() to compute a mask from a number. > > Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH 01/29] x86/fpu: Use ULL for shift in xfeature_uncompacted_offset()

2018-11-28 Thread Rik van Riel
en this check > won't > catch it. > > Use BIT_ULL() to compute a mask from a number. > > Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH] mm: handle no memcg case in memcg_kmem_charge() properly

2018-10-29 Thread Rik van Riel
int ret = 0; > > > > - if (memcg_kmem_bypass()) > > + if (mem_cgroup_disabled() || memcg_kmem_bypass()) > > return 0; > > > > Why not check memcg_kmem_enabled() before calling memcg_kmem_charge() > in memcg_charge_kernel_stack()? Check Roman's backtrace again. The function memcg_charge_kernel_stack() is not in it. That is why it is generally better to check in the called function, rather than add a check to every call site (and maybe miss one or two). Acked-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH] mm: handle no memcg case in memcg_kmem_charge() properly

2018-10-29 Thread Rik van Riel
int ret = 0; > > > > - if (memcg_kmem_bypass()) > > + if (mem_cgroup_disabled() || memcg_kmem_bypass()) > > return 0; > > > > Why not check memcg_kmem_enabled() before calling memcg_kmem_charge() > in memcg_charge_kernel_stack()? Check Roman's backtrace again. The function memcg_charge_kernel_stack() is not in it. That is why it is generally better to check in the called function, rather than add a check to every call site (and maybe miss one or two). Acked-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH 0/7] x86/mm/tlb: make lazy TLB mode even lazier

2018-10-24 Thread Rik van Riel
On Wed, 2018-10-24 at 07:53 +0200, Ingo Molnar wrote: > * Rik van Riel wrote: > > > The big thing remaining is the reference count overhead of > > the lazy TLB mm_struct, but getting rid of that is rather a > > lot of code for a small performance gain. Not qu

Re: [PATCH 0/7] x86/mm/tlb: make lazy TLB mode even lazier

2018-10-24 Thread Rik van Riel
On Wed, 2018-10-24 at 07:53 +0200, Ingo Molnar wrote: > * Rik van Riel wrote: > > > The big thing remaining is the reference count overhead of > > the lazy TLB mm_struct, but getting rid of that is rather a > > lot of code for a small performance gain. Not qu

Re: [RFC 00/60] Coscheduling for Linux

2018-10-19 Thread Rik van Riel
On Fri, 2018-10-19 at 17:33 +0200, Frederic Weisbecker wrote: > On Fri, Oct 19, 2018 at 11:16:49AM -0400, Rik van Riel wrote: > > On Fri, 2018-10-19 at 13:40 +0200, Jan H. Schönherr wrote: > > > > > > Now, it would be possible to "invent"

Re: [RFC 00/60] Coscheduling for Linux

2018-10-19 Thread Rik van Riel
On Fri, 2018-10-19 at 17:33 +0200, Frederic Weisbecker wrote: > On Fri, Oct 19, 2018 at 11:16:49AM -0400, Rik van Riel wrote: > > On Fri, 2018-10-19 at 13:40 +0200, Jan H. Schönherr wrote: > > > > > > Now, it would be possible to "invent"

Re: [RFC 00/60] Coscheduling for Linux

2018-10-19 Thread Rik van Riel
On Fri, 2018-10-19 at 13:40 +0200, Jan H. Schönherr wrote: > > Now, it would be possible to "invent" relocatable cpusets to address > that > issue ("I want affinity restricted to a core, I don't care which"), > but > then, the current way how cpuset affinity is enforced doesn't scale > for >

Re: [RFC 00/60] Coscheduling for Linux

2018-10-19 Thread Rik van Riel
On Fri, 2018-10-19 at 13:40 +0200, Jan H. Schönherr wrote: > > Now, it would be possible to "invent" relocatable cpusets to address > that > issue ("I want affinity restricted to a core, I don't care which"), > but > then, the current way how cpuset affinity is enforced doesn't scale > for >

Re: [PATCH 4/4] mm: zero-seek shrinkers

2018-10-09 Thread Rik van Riel
ere may well be workloads where we should just put a hard cap on the number of freeable items these slabs, and reclaim them preemptively. However, I do not know for sure, and this patch seems like a big improvement over what we had before, so ... > Reported-by: Domas Mituzas > Signed-off-by: Johannes Weiner Reviewed-by: Rik van Riel

Re: [PATCH 4/4] mm: zero-seek shrinkers

2018-10-09 Thread Rik van Riel
ere may well be workloads where we should just put a hard cap on the number of freeable items these slabs, and reclaim them preemptively. However, I do not know for sure, and this patch seems like a big improvement over what we had before, so ... > Reported-by: Domas Mituzas > Signed-off-by: Johannes Weiner Reviewed-by: Rik van Riel

Re: [PATCH 2/4] mm: workingset: use cheaper __inc_lruvec_state in irqsafe node reclaim

2018-10-09 Thread Rik van Riel
On Tue, 2018-10-09 at 14:47 -0400, Johannes Weiner wrote: > No need to use the preemption-safe lruvec state function inside the > reclaim region that has irqs disabled. > > Signed-off-by: Johannes Weiner Reviewed-by: Rik van Riel

Re: [PATCH 2/4] mm: workingset: use cheaper __inc_lruvec_state in irqsafe node reclaim

2018-10-09 Thread Rik van Riel
On Tue, 2018-10-09 at 14:47 -0400, Johannes Weiner wrote: > No need to use the preemption-safe lruvec state function inside the > reclaim region that has irqs disabled. > > Signed-off-by: Johannes Weiner Reviewed-by: Rik van Riel

Re: [PATCH 1/4] mm: workingset: don't drop refault information prematurely fix

2018-10-09 Thread Rik van Riel
desired_size * nr_online_nodes. > > Switch to NUMA-aware lru and slab counters to approximate cgroup > size. > > Signed-off-by: Johannes Weiner Reviewed-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH 1/4] mm: workingset: don't drop refault information prematurely fix

2018-10-09 Thread Rik van Riel
desired_size * nr_online_nodes. > > Switch to NUMA-aware lru and slab counters to approximate cgroup > size. > > Signed-off-by: Johannes Weiner Reviewed-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

[tip:x86/mm] x86/mm/tlb: Make lazy TLB mode lazier

2018-10-09 Thread tip-bot for Rik van Riel
Commit-ID: 145f573b89a62bf53cfc0144fa9b1c56b0f70b45 Gitweb: https://git.kernel.org/tip/145f573b89a62bf53cfc0144fa9b1c56b0f70b45 Author: Rik van Riel AuthorDate: Tue, 25 Sep 2018 23:58:44 -0400 Committer: Peter Zijlstra CommitDate: Tue, 9 Oct 2018 16:51:12 +0200 x86/mm/tlb: Make lazy

[tip:x86/mm] x86/mm/tlb: Make lazy TLB mode lazier

2018-10-09 Thread tip-bot for Rik van Riel
Commit-ID: 145f573b89a62bf53cfc0144fa9b1c56b0f70b45 Gitweb: https://git.kernel.org/tip/145f573b89a62bf53cfc0144fa9b1c56b0f70b45 Author: Rik van Riel AuthorDate: Tue, 25 Sep 2018 23:58:44 -0400 Committer: Peter Zijlstra CommitDate: Tue, 9 Oct 2018 16:51:12 +0200 x86/mm/tlb: Make lazy

[tip:x86/mm] x86/mm/tlb: Add freed_tables element to flush_tlb_info

2018-10-09 Thread tip-bot for Rik van Riel
Commit-ID: 97807813fe7074ee865d6bc1df1d0f8fb878ee9d Gitweb: https://git.kernel.org/tip/97807813fe7074ee865d6bc1df1d0f8fb878ee9d Author: Rik van Riel AuthorDate: Tue, 25 Sep 2018 23:58:43 -0400 Committer: Peter Zijlstra CommitDate: Tue, 9 Oct 2018 16:51:12 +0200 x86/mm/tlb: Add

[tip:x86/mm] x86/mm/tlb: Add freed_tables element to flush_tlb_info

2018-10-09 Thread tip-bot for Rik van Riel
Commit-ID: 97807813fe7074ee865d6bc1df1d0f8fb878ee9d Gitweb: https://git.kernel.org/tip/97807813fe7074ee865d6bc1df1d0f8fb878ee9d Author: Rik van Riel AuthorDate: Tue, 25 Sep 2018 23:58:43 -0400 Committer: Peter Zijlstra CommitDate: Tue, 9 Oct 2018 16:51:12 +0200 x86/mm/tlb: Add

[tip:x86/mm] x86/mm/tlb: Add freed_tables argument to flush_tlb_mm_range

2018-10-09 Thread tip-bot for Rik van Riel
Commit-ID: 016c4d92cd16f569c6485ae62b076c1a4b779536 Gitweb: https://git.kernel.org/tip/016c4d92cd16f569c6485ae62b076c1a4b779536 Author: Rik van Riel AuthorDate: Tue, 25 Sep 2018 23:58:42 -0400 Committer: Peter Zijlstra CommitDate: Tue, 9 Oct 2018 16:51:12 +0200 x86/mm/tlb: Add

[tip:x86/mm] x86/mm/tlb: Add freed_tables argument to flush_tlb_mm_range

2018-10-09 Thread tip-bot for Rik van Riel
Commit-ID: 016c4d92cd16f569c6485ae62b076c1a4b779536 Gitweb: https://git.kernel.org/tip/016c4d92cd16f569c6485ae62b076c1a4b779536 Author: Rik van Riel AuthorDate: Tue, 25 Sep 2018 23:58:42 -0400 Committer: Peter Zijlstra CommitDate: Tue, 9 Oct 2018 16:51:12 +0200 x86/mm/tlb: Add

[tip:x86/mm] smp,cpumask: introduce on_each_cpu_cond_mask

2018-10-09 Thread tip-bot for Rik van Riel
Commit-ID: 7d49b28a80b830c3ca876d33bedc58d62a78e16f Gitweb: https://git.kernel.org/tip/7d49b28a80b830c3ca876d33bedc58d62a78e16f Author: Rik van Riel AuthorDate: Tue, 25 Sep 2018 23:58:41 -0400 Committer: Peter Zijlstra CommitDate: Tue, 9 Oct 2018 16:51:11 +0200 smp,cpumask: introduce

[tip:x86/mm] smp,cpumask: introduce on_each_cpu_cond_mask

2018-10-09 Thread tip-bot for Rik van Riel
Commit-ID: 7d49b28a80b830c3ca876d33bedc58d62a78e16f Gitweb: https://git.kernel.org/tip/7d49b28a80b830c3ca876d33bedc58d62a78e16f Author: Rik van Riel AuthorDate: Tue, 25 Sep 2018 23:58:41 -0400 Committer: Peter Zijlstra CommitDate: Tue, 9 Oct 2018 16:51:11 +0200 smp,cpumask: introduce

[tip:x86/mm] smp: use __cpumask_set_cpu in on_each_cpu_cond

2018-10-09 Thread tip-bot for Rik van Riel
Commit-ID: c3f7f2c7eba1a53d2e5ffbc2dcc9a20c5f094890 Gitweb: https://git.kernel.org/tip/c3f7f2c7eba1a53d2e5ffbc2dcc9a20c5f094890 Author: Rik van Riel AuthorDate: Tue, 25 Sep 2018 23:58:40 -0400 Committer: Peter Zijlstra CommitDate: Tue, 9 Oct 2018 16:51:11 +0200 smp: use

[tip:x86/mm] smp: use __cpumask_set_cpu in on_each_cpu_cond

2018-10-09 Thread tip-bot for Rik van Riel
Commit-ID: c3f7f2c7eba1a53d2e5ffbc2dcc9a20c5f094890 Gitweb: https://git.kernel.org/tip/c3f7f2c7eba1a53d2e5ffbc2dcc9a20c5f094890 Author: Rik van Riel AuthorDate: Tue, 25 Sep 2018 23:58:40 -0400 Committer: Peter Zijlstra CommitDate: Tue, 9 Oct 2018 16:51:11 +0200 smp: use

[tip:x86/mm] x86/mm/tlb: Restructure switch_mm_irqs_off()

2018-10-09 Thread tip-bot for Rik van Riel
Commit-ID: 12c4d978fd170ccdd7260ec11f93b11e46904228 Gitweb: https://git.kernel.org/tip/12c4d978fd170ccdd7260ec11f93b11e46904228 Author: Rik van Riel AuthorDate: Tue, 25 Sep 2018 23:58:39 -0400 Committer: Peter Zijlstra CommitDate: Tue, 9 Oct 2018 16:51:11 +0200 x86/mm/tlb: Restructure

[tip:x86/mm] x86/mm/tlb: Restructure switch_mm_irqs_off()

2018-10-09 Thread tip-bot for Rik van Riel
Commit-ID: 12c4d978fd170ccdd7260ec11f93b11e46904228 Gitweb: https://git.kernel.org/tip/12c4d978fd170ccdd7260ec11f93b11e46904228 Author: Rik van Riel AuthorDate: Tue, 25 Sep 2018 23:58:39 -0400 Committer: Peter Zijlstra CommitDate: Tue, 9 Oct 2018 16:51:11 +0200 x86/mm/tlb: Restructure

[tip:x86/mm] x86/mm/tlb: Always use lazy TLB mode

2018-10-09 Thread tip-bot for Rik van Riel
Commit-ID: 5462bc3a9a3c38328bbbd276d51164c7cf21d6a8 Gitweb: https://git.kernel.org/tip/5462bc3a9a3c38328bbbd276d51164c7cf21d6a8 Author: Rik van Riel AuthorDate: Tue, 25 Sep 2018 23:58:38 -0400 Committer: Peter Zijlstra CommitDate: Tue, 9 Oct 2018 16:51:11 +0200 x86/mm/tlb: Always use

[tip:x86/mm] x86/mm/tlb: Always use lazy TLB mode

2018-10-09 Thread tip-bot for Rik van Riel
Commit-ID: 5462bc3a9a3c38328bbbd276d51164c7cf21d6a8 Gitweb: https://git.kernel.org/tip/5462bc3a9a3c38328bbbd276d51164c7cf21d6a8 Author: Rik van Riel AuthorDate: Tue, 25 Sep 2018 23:58:38 -0400 Committer: Peter Zijlstra CommitDate: Tue, 9 Oct 2018 16:51:11 +0200 x86/mm/tlb: Always use

Re: [PATCH 00/11 v3] x86: load FPU registers on return to userland

2018-10-04 Thread Rik van Riel
On Thu, 2018-10-04 at 16:05 +0200, Sebastian Andrzej Siewior wrote: > In v3 I dropped that decouple idea. I also learned that the wrpkru > instruction is not privileged and so caching it in kernel does not > work. Wait, so any thread can bypass its memory protection keys, even if there is a

Re: [PATCH 00/11 v3] x86: load FPU registers on return to userland

2018-10-04 Thread Rik van Riel
On Thu, 2018-10-04 at 16:05 +0200, Sebastian Andrzej Siewior wrote: > In v3 I dropped that decouple idea. I also learned that the wrpkru > instruction is not privileged and so caching it in kernel does not > work. Wait, so any thread can bypass its memory protection keys, even if there is a

Re: [PATCH v2 0/7] x86/mm/tlb: make lazy TLB mode even lazier

2018-10-02 Thread Rik van Riel
On Tue, 2018-10-02 at 09:44 +0200, Peter Zijlstra wrote: > On Tue, Sep 25, 2018 at 11:58:37PM -0400, Rik van Riel wrote: > > > This v2 is "identical" to the version I posted yesterday, > > except this one is actually against current -tip (not sure > > what

Re: [PATCH v2 0/7] x86/mm/tlb: make lazy TLB mode even lazier

2018-10-02 Thread Rik van Riel
On Tue, 2018-10-02 at 09:44 +0200, Peter Zijlstra wrote: > On Tue, Sep 25, 2018 at 11:58:37PM -0400, Rik van Riel wrote: > > > This v2 is "identical" to the version I posted yesterday, > > except this one is actually against current -tip (not sure > > what

Re: [PATCH 1/7] x86/mm/tlb: Always use lazy TLB mode

2018-10-01 Thread Rik van Riel
On Mon, 2018-10-01 at 17:58 +0200, Peter Zijlstra wrote: > On Tue, Sep 25, 2018 at 11:58:38PM -0400, Rik van Riel wrote: > > Now that CPUs in lazy TLB mode no longer receive TLB shootdown > > IPIs, except > > at page table freeing time, and idle CPUs will no longer g

Re: [PATCH 1/7] x86/mm/tlb: Always use lazy TLB mode

2018-10-01 Thread Rik van Riel
On Mon, 2018-10-01 at 17:58 +0200, Peter Zijlstra wrote: > On Tue, Sep 25, 2018 at 11:58:38PM -0400, Rik van Riel wrote: > > Now that CPUs in lazy TLB mode no longer receive TLB shootdown > > IPIs, except > > at page table freeing time, and idle CPUs will no longer g

Re: [PATCH 2/2] mm, numa: Migrate pages to local nodes quicker early in the lifetime of a task

2018-10-01 Thread Rik van Riel
t; ( 10.40%)35969.88 ( 10.51%) > > Signed-off-by: Mel Gorman Reviewed-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH 2/2] mm, numa: Migrate pages to local nodes quicker early in the lifetime of a task

2018-10-01 Thread Rik van Riel
t; ( 10.40%)35969.88 ( 10.51%) > > Signed-off-by: Mel Gorman Reviewed-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH 1/2] mm, numa: Remove rate-limiting of automatic numa balancing migration

2018-10-01 Thread Rik van Riel
scale30115.06 ( 0.00%)31293.06 ( 3.91%) > MB/sec add 32825.12 ( 0.00%)34883.62 ( 6.27%) > MB/sec triad32549.52 ( 0.00%)34906.60 ( 7.24% > > Signed-off-by: Mel Gorman Reviewed-by: Rik van Riel -- All Rights Reversed. signature.asc Descripti

Re: [PATCH 1/2] mm, numa: Remove rate-limiting of automatic numa balancing migration

2018-10-01 Thread Rik van Riel
scale30115.06 ( 0.00%)31293.06 ( 3.91%) > MB/sec add 32825.12 ( 0.00%)34883.62 ( 6.27%) > MB/sec triad32549.52 ( 0.00%)34906.60 ( 7.24% > > Signed-off-by: Mel Gorman Reviewed-by: Rik van Riel -- All Rights Reversed. signature.asc Descripti

[PATCH 7/7] x86/mm/tlb: Make lazy TLB mode lazier

2018-09-25 Thread Rik van Riel
ode remain part of the mm_cpumask(mm), both because that allows TLB flush IPIs to be sent at page table freeing time, and because the cache line bouncing on the mm_cpumask(mm) was responsible for about half the CPU use in switch_mm_irqs_off(). Tested-by: Song Liu Signed-off-by: Rik van Riel --- a

[PATCH 4/7] smp,cpumask: introduce on_each_cpu_cond_mask

2018-09-25 Thread Rik van Riel
Introduce a variant of on_each_cpu_cond that iterates only over the CPUs in a cpumask, in order to avoid making callbacks for every single CPU in the system when we only need to test a subset. Signed-off-by: Rik van Riel --- include/linux/smp.h | 4 kernel/smp.c| 17

[PATCH 5/7] Add freed_tables argument to flush_tlb_mm_range

2018-09-25 Thread Rik van Riel
Add an argument to flush_tlb_mm_range to indicate whether page tables are about to be freed after this TLB flush. This allows for an optimization of flush_tlb_mm_range to skip CPUs in lazy TLB mode. No functional changes. Signed-off-by: Rik van Riel --- arch/x86/include/asm/tlb.h | 2

[PATCH 5/7] Add freed_tables argument to flush_tlb_mm_range

2018-09-25 Thread Rik van Riel
Add an argument to flush_tlb_mm_range to indicate whether page tables are about to be freed after this TLB flush. This allows for an optimization of flush_tlb_mm_range to skip CPUs in lazy TLB mode. No functional changes. Signed-off-by: Rik van Riel --- arch/x86/include/asm/tlb.h | 2

[PATCH 7/7] x86/mm/tlb: Make lazy TLB mode lazier

2018-09-25 Thread Rik van Riel
ode remain part of the mm_cpumask(mm), both because that allows TLB flush IPIs to be sent at page table freeing time, and because the cache line bouncing on the mm_cpumask(mm) was responsible for about half the CPU use in switch_mm_irqs_off(). Tested-by: Song Liu Signed-off-by: Rik van Riel --- a

[PATCH 4/7] smp,cpumask: introduce on_each_cpu_cond_mask

2018-09-25 Thread Rik van Riel
Introduce a variant of on_each_cpu_cond that iterates only over the CPUs in a cpumask, in order to avoid making callbacks for every single CPU in the system when we only need to test a subset. Signed-off-by: Rik van Riel --- include/linux/smp.h | 4 kernel/smp.c| 17

<    1   2   3   4   5   6   7   8   9   10   >