Re: [PATCH RFC UGLY] x86,mm,sched: make lazy TLB mode even lazier

2016-08-29 Thread Rik van Riel
On Sun, 2016-08-28 at 01:11 -0700, Andy Lutomirski wrote: > On Aug 25, 2016 9:06 PM, "Rik van Riel" <r...@redhat.com> wrote: > > > > Subject: x86,mm,sched: make lazy TLB mode even lazier > > > > Lazy TLB mode can result in an idle CPU being woken up for

Re: [PATCH RFC UGLY] x86,mm,sched: make lazy TLB mode even lazier

2016-08-29 Thread Rik van Riel
On Sun, 2016-08-28 at 01:11 -0700, Andy Lutomirski wrote: > On Aug 25, 2016 9:06 PM, "Rik van Riel" wrote: > > > > Subject: x86,mm,sched: make lazy TLB mode even lazier > > > > Lazy TLB mode can result in an idle CPU being woken up for a TLB > > flush

Re: [PATCH] bug: avoid Kconfig warning for BUG_ON_DATA_CORRUPTION

2016-08-26 Thread Rik van Riel
direct dependencies (DEBUG_KERNEL) > > This annotates the DEBUG_LIST option to be selectable by > BUG_ON_DATA_CORRUPTION when DEBUG_KERNEL is disabled. > > Signed-off-by: Arnd Bergmann <a...@arndb.de> > Fixes: 40cd725cfc7f ("bug: Provide toggle for BUG on data > corruption") > Acked-by: Rik van Riel <r...@redhat.com>

Re: [PATCH] bug: avoid Kconfig warning for BUG_ON_DATA_CORRUPTION

2016-08-26 Thread Rik van Riel
direct dependencies (DEBUG_KERNEL) > > This annotates the DEBUG_LIST option to be selectable by > BUG_ON_DATA_CORRUPTION when DEBUG_KERNEL is disabled. > > Signed-off-by: Arnd Bergmann > Fixes: 40cd725cfc7f ("bug: Provide toggle for BUG on data > corruption") > Acked-by: Rik van Riel

[PATCH RFC v3] x86,mm,sched: make lazy TLB mode even lazier

2016-08-25 Thread Rik van Riel
n TLBSTATE_OK to begin with. Nothing is done for a CPU that is already in TLBSTATE_FLUSH mode. This patch is totally untested, because I am at a conference right now, and Benjamin has the test case :) Benjamin, does this help your issue? Signed-off-by: Rik van Riel <r...@redhat.com> Reported-

[PATCH RFC v3] x86,mm,sched: make lazy TLB mode even lazier

2016-08-25 Thread Rik van Riel
n with. Nothing is done for a CPU that is already in TLBSTATE_FLUSH mode. This patch is totally untested, because I am at a conference right now, and Benjamin has the test case :) Benjamin, does this help your issue? Signed-off-by: Rik van Riel Reported-by: Benjamin Serebrin --- arch/x86/includ

[PATCH RFC v2] x86,mm,sched: make lazy TLB mode even lazier

2016-08-25 Thread Rik van Riel
rom TLBSTATE_LAZY to TLBSTATE_FLUSH, an invalidation IPI will be sent. Nothing is done for a CPU that is already in TLBSTATE_FLUH mode. This patch is totally untested, because I am at a conference right now, and Benjamin has the test case :) Benjamin, does this help your issue? Signed-off-by: Rik

[PATCH RFC v2] x86,mm,sched: make lazy TLB mode even lazier

2016-08-25 Thread Rik van Riel
rom TLBSTATE_LAZY to TLBSTATE_FLUSH, an invalidation IPI will be sent. Nothing is done for a CPU that is already in TLBSTATE_FLUH mode. This patch is totally untested, because I am at a conference right now, and Benjamin has the test case :) Benjamin, does this help your issue? Signed-off-by: Rik

Re: [PATCH RFC UGLY] x86,mm,sched: make lazy TLB mode even lazier

2016-08-25 Thread Rik van Riel
On Thu, 2016-08-25 at 12:42 -0700, H. Peter Anvin wrote: > On August 25, 2016 12:04:59 PM PDT, Rik van Riel <r...@redhat.com> > wrote: > > Subject: x86,mm,sched: make lazy TLB mode even lazier > > > > Lazy TLB mode can result in an idle CPU being woken up for a TLB

Re: [PATCH RFC UGLY] x86,mm,sched: make lazy TLB mode even lazier

2016-08-25 Thread Rik van Riel
On Thu, 2016-08-25 at 12:42 -0700, H. Peter Anvin wrote: > On August 25, 2016 12:04:59 PM PDT, Rik van Riel > wrote: > > Subject: x86,mm,sched: make lazy TLB mode even lazier > > > > Lazy TLB mode can result in an idle CPU being woken up for a TLB > > flush, w

Re: [PATCH] mm: Don't use radix tree writeback tags for pages in swap cache

2016-08-25 Thread Rik van Riel
n_lock_irqsave.test_clear_page_writeback.end_page_writebac > k.page_endio.pmem_rw_page > > Cc: Hugh Dickins <hu...@google.com> > Cc: Shaohua Li <s...@kernel.org> > Cc: Minchan Kim <minc...@kernel.org> > Cc: Rik van Riel <r...@redhat.com> > Cc: Mel Gorman &l

Re: [PATCH] mm: Don't use radix tree writeback tags for pages in swap cache

2016-08-25 Thread Rik van Riel
n_lock_irqsave.test_clear_page_writeback.end_page_writebac > k.page_endio.pmem_rw_page > > Cc: Hugh Dickins > Cc: Shaohua Li > Cc: Minchan Kim > Cc: Rik van Riel > Cc: Mel Gorman > Cc: Tejun Heo > Cc: Wu Fengguang > Cc: Dave Hansen > Signed-off-by: "

[PATCH RFC UGLY] x86,mm,sched: make lazy TLB mode even lazier

2016-08-25 Thread Rik van Riel
, and Benjamin has the test case :) Signed-off-by: Rik van Riel <r...@redhat.com> Reported-by: Benjamin Serebrin <sereb...@google.com> --- arch/x86/include/asm/tlbflush.h | 1 + arch/x86/mm/tlb.c | 38 +++--- 2 files changed, 36 insertions(+),

[PATCH RFC UGLY] x86,mm,sched: make lazy TLB mode even lazier

2016-08-25 Thread Rik van Riel
, and Benjamin has the test case :) Signed-off-by: Rik van Riel Reported-by: Benjamin Serebrin --- arch/x86/include/asm/tlbflush.h | 1 + arch/x86/mm/tlb.c | 38 +++--- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm

Re: [PATCH] mm, swap: Add swap_cluster_list

2016-08-24 Thread Rik van Riel
for the free cluster and discard > cluster list operations.  This avoid some code duplication, improved > the code readability, and reduced the total line number. > > Cc: Tim Chen <tim.c.c...@intel.com> > Cc: Hugh Dickins <hu...@google.com> > Cc: Shaohua Li <s...@ke

Re: [PATCH] mm, swap: Add swap_cluster_list

2016-08-24 Thread Rik van Riel
scard > cluster list operations.  This avoid some code duplication, improved > the code readability, and reduced the total line number. > > Cc: Tim Chen > Cc: Hugh Dickins > Cc: Shaohua Li > Cc: Rik van Riel > Acked-by: Minchan Kim > Signed-off-by: "Huang, Ying" > Acked-by: Rik van Riel

Re: utime accounting regression since 4.6 (was: Re: [PACTH v2 0/3] Implement /proc//totmaps)

2016-08-23 Thread Rik van Riel
On Tue, 2016-08-23 at 16:33 +0200, Michal Hocko wrote: > On Tue 23-08-16 10:26:03, Michal Hocko wrote: > > On Mon 22-08-16 19:47:09, Michal Hocko wrote: > > > On Mon 22-08-16 19:29:36, Michal Hocko wrote: > > > > On Mon 22-08-16 18:45:54, Michal Hocko wrote: > > > > [...] > > > > > I have no idea

Re: utime accounting regression since 4.6 (was: Re: [PACTH v2 0/3] Implement /proc//totmaps)

2016-08-23 Thread Rik van Riel
On Tue, 2016-08-23 at 16:33 +0200, Michal Hocko wrote: > On Tue 23-08-16 10:26:03, Michal Hocko wrote: > > On Mon 22-08-16 19:47:09, Michal Hocko wrote: > > > On Mon 22-08-16 19:29:36, Michal Hocko wrote: > > > > On Mon 22-08-16 18:45:54, Michal Hocko wrote: > > > > [...] > > > > > I have no idea

Re: [kernel-hardening] [PATCH v3 0/5] bug: Provide toggle for BUG on data corruption

2016-08-18 Thread Rik van Riel
On Thu, 2016-08-18 at 13:57 -0700, Paul E. McKenney wrote: > On Thu, Aug 18, 2016 at 01:42:55PM -0400, Rik van Riel wrote: > > On Wed, 2016-08-17 at 14:42 -0700, Kees Cook wrote: > > > This adds CONFIG_BUG_ON_DATA_CORRUPTION to trigger BUG()s when > > > the > > >

Re: [kernel-hardening] [PATCH v3 0/5] bug: Provide toggle for BUG on data corruption

2016-08-18 Thread Rik van Riel
On Thu, 2016-08-18 at 13:57 -0700, Paul E. McKenney wrote: > On Thu, Aug 18, 2016 at 01:42:55PM -0400, Rik van Riel wrote: > > On Wed, 2016-08-17 at 14:42 -0700, Kees Cook wrote: > > > This adds CONFIG_BUG_ON_DATA_CORRUPTION to trigger BUG()s when > > > the > > >

Re: [PATCH] usercopy: Skip multi-page bounds checking on SLOB

2016-08-18 Thread Rik van Riel
On Thu, 2016-08-18 at 10:42 -0700, Linus Torvalds wrote: > On Thu, Aug 18, 2016 at 7:21 AM, Rik van Riel <r...@redhat.com> > wrote: > > > > One big question I have for Linus is, do we want > > to allow code that does a higher order allocation, > > and the

Re: [PATCH] usercopy: Skip multi-page bounds checking on SLOB

2016-08-18 Thread Rik van Riel
On Thu, 2016-08-18 at 10:42 -0700, Linus Torvalds wrote: > On Thu, Aug 18, 2016 at 7:21 AM, Rik van Riel > wrote: > > > > One big question I have for Linus is, do we want > > to allow code that does a higher order allocation, > > and then frees part of it in sma

Re: [kernel-hardening] [PATCH v3 0/5] bug: Provide toggle for BUG on data corruption

2016-08-18 Thread Rik van Riel
On Wed, 2016-08-17 at 14:42 -0700, Kees Cook wrote: > This adds CONFIG_BUG_ON_DATA_CORRUPTION to trigger BUG()s when the > kernel > encounters unexpected data structure integrity as currently detected > with CONFIG_DEBUG_LIST. > > Specifically list operations have been a target for widening flaws

Re: [kernel-hardening] [PATCH v3 0/5] bug: Provide toggle for BUG on data corruption

2016-08-18 Thread Rik van Riel
On Wed, 2016-08-17 at 14:42 -0700, Kees Cook wrote: > This adds CONFIG_BUG_ON_DATA_CORRUPTION to trigger BUG()s when the > kernel > encounters unexpected data structure integrity as currently detected > with CONFIG_DEBUG_LIST. > > Specifically list operations have been a target for widening flaws

Re: [PATCH] usercopy: Skip multi-page bounds checking on SLOB

2016-08-18 Thread Rik van Riel
On Wed, 2016-08-17 at 15:29 -0700, Kees Cook wrote: > When an allocator does not mark all allocations as PageSlab, or does > not > mark multipage allocations with __GFP_COMP, hardened usercopy cannot > correctly validate the allocation. SLOB lacks this, so short-circuit > the checking for the

Re: [PATCH] usercopy: Skip multi-page bounds checking on SLOB

2016-08-18 Thread Rik van Riel
On Wed, 2016-08-17 at 15:29 -0700, Kees Cook wrote: > When an allocator does not mark all allocations as PageSlab, or does > not > mark multipage allocations with __GFP_COMP, hardened usercopy cannot > correctly validate the allocation. SLOB lacks this, so short-circuit > the checking for the

Re: [PATCH v2 2/2] fs: super.c: Add tracepoint to get name of superblock shrinker

2016-08-18 Thread Rik van Riel
On Thu, 2016-08-18 at 07:32 +0100, Al Viro wrote: > On Thu, Aug 18, 2016 at 02:09:31AM -0400, Janani Ravichandran wrote: > > >  static LIST_HEAD(super_blocks); > > @@ -64,6 +65,7 @@ static unsigned long super_cache_scan(struct > > shrinker *shrink, > >   longinodes; > >   > >   sb =

Re: [PATCH v2 2/2] fs: super.c: Add tracepoint to get name of superblock shrinker

2016-08-18 Thread Rik van Riel
On Thu, 2016-08-18 at 07:32 +0100, Al Viro wrote: > On Thu, Aug 18, 2016 at 02:09:31AM -0400, Janani Ravichandran wrote: > > >  static LIST_HEAD(super_blocks); > > @@ -64,6 +65,7 @@ static unsigned long super_cache_scan(struct > > shrinker *shrink, > >   longinodes; > >   > >   sb =

[tip:sched/core] sched: Remove struct rq::nohz_stamp

2016-08-18 Thread tip-bot for Rik van Riel
Commit-ID: 1fc770d5899c995db8e22d35eb918a2cb79559d9 Gitweb: http://git.kernel.org/tip/1fc770d5899c995db8e22d35eb918a2cb79559d9 Author: Rik van Riel <r...@redhat.com> AuthorDate: Mon, 15 Aug 2016 12:14:10 -0400 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Thu, 18 Au

[tip:sched/core] sched: Remove struct rq::nohz_stamp

2016-08-18 Thread tip-bot for Rik van Riel
Commit-ID: 1fc770d5899c995db8e22d35eb918a2cb79559d9 Gitweb: http://git.kernel.org/tip/1fc770d5899c995db8e22d35eb918a2cb79559d9 Author: Rik van Riel AuthorDate: Mon, 15 Aug 2016 12:14:10 -0400 Committer: Ingo Molnar CommitDate: Thu, 18 Aug 2016 10:55:39 +0200 sched: Remove struct rq

Re: [x86/uaccess] 5b710f34e1: kernel BUG at mm/usercopy.c:75!

2016-08-17 Thread Rik van Riel
On Wed, 2016-08-17 at 09:14 -0700, Linus Torvalds wrote: > but compound pages are about the mapping of hugepages, not about > simple multi-order allocations like the task structure (or slab > entries). > > In other words, it looks like the memory hardening is simply broken > for any case that

Re: [x86/uaccess] 5b710f34e1: kernel BUG at mm/usercopy.c:75!

2016-08-17 Thread Rik van Riel
On Wed, 2016-08-17 at 09:14 -0700, Linus Torvalds wrote: > but compound pages are about the mapping of hugepages, not about > simple multi-order allocations like the task structure (or slab > entries). > > In other words, it looks like the memory hardening is simply broken > for any case that

Re: [PATCH v3] sched/cputime: Resync steal time when guest & host lose sync

2016-08-16 Thread Rik van Riel
t; much steal time the host told us elapsed.  > > Suggested-by: Rik van Riel <r...@redhat.com>  > Suggested-by: Paolo Bonzini <pbonz...@redhat.com> > Cc: Ingo Molnar <mi...@kernel.org> > Cc: Peter Zijlstra <pet...@infradead.org> > Cc: Rik van Riel <r...@re

Re: [PATCH v3] sched/cputime: Resync steal time when guest & host lose sync

2016-08-16 Thread Rik van Riel
t; much steal time the host told us elapsed.  > > Suggested-by: Rik van Riel   > Suggested-by: Paolo Bonzini > Cc: Ingo Molnar > Cc: Peter Zijlstra > Cc: Rik van Riel > Cc: Paolo Bonzini > Cc: Radim Krcmar > Cc: Mike Galbraith > Cc: Frederic Weisbecker &g

Re: [PATCH v2] sched/cputime: Resync steal time when guest & host lose sync

2016-08-16 Thread Rik van Riel
On Wed, 2016-08-17 at 09:16 +0800, Wanpeng Li wrote: >  > @@ -694,6 +699,12 @@ static cputime_t get_vtime_delta(struct > task_struct *tsk) >   unsigned long now = READ_ONCE(jiffies); >   cputime_t delta, other; >   > + /* > +  * The interval returned by account_other_time() is NOT

Re: [PATCH v2] sched/cputime: Resync steal time when guest & host lose sync

2016-08-16 Thread Rik van Riel
On Wed, 2016-08-17 at 09:16 +0800, Wanpeng Li wrote: >  > @@ -694,6 +699,12 @@ static cputime_t get_vtime_delta(struct > task_struct *tsk) >   unsigned long now = READ_ONCE(jiffies); >   cputime_t delta, other; >   > + /* > +  * The interval returned by account_other_time() is NOT

Re: [PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-16 Thread Rik van Riel
On Tue, 2016-08-16 at 14:54 +0800, Wanpeng Li wrote: > 2016-08-16 10:11 GMT+08:00 Rik van Riel <r...@redhat.com>: > > On Tue, 2016-08-16 at 09:31 +0800, Wanpeng Li wrote: > > > 2016-08-15 23:00 GMT+08:00 Rik van Riel <r...@redhat.com>: > > > > On Mon, 2

Re: [PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-16 Thread Rik van Riel
On Tue, 2016-08-16 at 14:54 +0800, Wanpeng Li wrote: > 2016-08-16 10:11 GMT+08:00 Rik van Riel : > > On Tue, 2016-08-16 at 09:31 +0800, Wanpeng Li wrote: > > > 2016-08-15 23:00 GMT+08:00 Rik van Riel : > > > > On Mon, 2016-08-15 at 16:53 +0800, Wanpeng Li wrote: >

Re: [PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-15 Thread Rik van Riel
On Tue, 2016-08-16 at 09:31 +0800, Wanpeng Li wrote: > 2016-08-15 23:00 GMT+08:00 Rik van Riel <r...@redhat.com>: > > On Mon, 2016-08-15 at 16:53 +0800, Wanpeng Li wrote: > > > 2016-08-12 23:58 GMT+08:00 Rik van Riel <r...@redhat.com>: > > > [...] > > &

Re: [PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-15 Thread Rik van Riel
On Tue, 2016-08-16 at 09:31 +0800, Wanpeng Li wrote: > 2016-08-15 23:00 GMT+08:00 Rik van Riel : > > On Mon, 2016-08-15 at 16:53 +0800, Wanpeng Li wrote: > > > 2016-08-12 23:58 GMT+08:00 Rik van Riel : > > > [...] > > > > Wanpeng, does the patch below work fo

[PATCH] sched: remove nohz_stamp from struct rq

2016-08-15 Thread Rik van Riel
The nohz_stamp member of struct rq has been unused since 2010, when this commit removed the code that referenced it: 396e894d289d ("sched: Revert nohz_ratelimit() for now") Signed-off-by: Rik van Riel <r...@redhat.com> --- kernel/sched/sched.h | 1 - 1 file changed, 1 deletio

[PATCH] sched: remove nohz_stamp from struct rq

2016-08-15 Thread Rik van Riel
The nohz_stamp member of struct rq has been unused since 2010, when this commit removed the code that referenced it: 396e894d289d ("sched: Revert nohz_ratelimit() for now") Signed-off-by: Rik van Riel --- kernel/sched/sched.h | 1 - 1 file changed, 1 deletion(-) diff --git a/ke

Re: [PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-15 Thread Rik van Riel
On Mon, 2016-08-15 at 16:53 +0800, Wanpeng Li wrote: > 2016-08-12 23:58 GMT+08:00 Rik van Riel <r...@redhat.com>: > [...] > > Wanpeng, does the patch below work for you? > > It will break steal time for full dynticks guest, and there is a > calltrace of thread_group_

Re: [PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-15 Thread Rik van Riel
On Mon, 2016-08-15 at 16:53 +0800, Wanpeng Li wrote: > 2016-08-12 23:58 GMT+08:00 Rik van Riel : > [...] > > Wanpeng, does the patch below work for you? > > It will break steal time for full dynticks guest, and there is a > calltrace of thread_group_cputime_adj

Re: [PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-14 Thread Rik van Riel
On Sat, 2016-08-13 at 10:42 +0200, Ingo Molnar wrote: > * Rik van Riel <r...@redhat.com> wrote: > > > On Wed, 10 Aug 2016 07:39:08 +0800 > > Wanpeng Li <kernel...@gmail.com> wrote: > > > > > The regression is caused by your commit "sched,time

Re: [PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-14 Thread Rik van Riel
On Sat, 2016-08-13 at 10:42 +0200, Ingo Molnar wrote: > * Rik van Riel wrote: > > > On Wed, 10 Aug 2016 07:39:08 +0800 > > Wanpeng Li wrote: > > > > > The regression is caused by your commit "sched,time: Count > > > actually > > > elapse

Re: [patch 4 14/22] timer: Switch to a non cascading wheel

2016-08-12 Thread Rik van Riel
On Thu, 2016-08-11 at 18:21 +0300, Jouni Malinen wrote: > On Mon, Jul 4, 2016 at 12:50 PM, Thomas Gleixner > wrote: > > The current timer wheel has some drawbacks: > ... > > It looks like this change (commit > 500462a9de657f86edaa102f8ab6bff7f7e43fc2 in linux.git) breaks one

Re: [patch 4 14/22] timer: Switch to a non cascading wheel

2016-08-12 Thread Rik van Riel
On Thu, 2016-08-11 at 18:21 +0300, Jouni Malinen wrote: > On Mon, Jul 4, 2016 at 12:50 PM, Thomas Gleixner > wrote: > > The current timer wheel has some drawbacks: > ... > > It looks like this change (commit > 500462a9de657f86edaa102f8ab6bff7f7e43fc2 in linux.git) breaks one of > the automated

Re: [PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-12 Thread Rik van Riel
On Fri, 2016-08-12 at 18:33 +0200, Paolo Bonzini wrote: > > On 10/08/2016 18:52, Rik van Riel wrote: > > Paolo, what is your opinion on this issue? > > > > I can think of all kinds of ways in which guest and host might lose > > sync with steal time, from uninitia

Re: [PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-12 Thread Rik van Riel
On Fri, 2016-08-12 at 18:33 +0200, Paolo Bonzini wrote: > > On 10/08/2016 18:52, Rik van Riel wrote: > > Paolo, what is your opinion on this issue? > > > > I can think of all kinds of ways in which guest and host might lose > > sync with steal time, from uninitia

Re: [PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-12 Thread Rik van Riel
On Fri, 12 Aug 2016 15:09:00 +0800 Wanpeng Li <kernel...@gmail.com> wrote: > 2016-08-12 10:44 GMT+08:00 Rik van Riel <r...@redhat.com>: > > If you pass ULONG_MAX as the maxtime argument to > > steal_account_process_time(), does the steal time > > get accounte

Re: [PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-12 Thread Rik van Riel
On Fri, 12 Aug 2016 15:09:00 +0800 Wanpeng Li wrote: > 2016-08-12 10:44 GMT+08:00 Rik van Riel : > > If you pass ULONG_MAX as the maxtime argument to > > steal_account_process_time(), does the steal time > > get accounted properly at 75%? > > Yes. I tal

Re: [PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-11 Thread Rik van Riel
On Thu, 2016-08-11 at 18:11 +0800, Wanpeng Li wrote: > 2016-08-11 0:52 GMT+08:00 Rik van Riel <r...@redhat.com>: > > On Wed, 10 Aug 2016 07:39:08 +0800 > > Wanpeng Li <kernel...@gmail.com> wrote: > > > > > The regression is caused by your commit "sch

Re: [PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-11 Thread Rik van Riel
On Thu, 2016-08-11 at 18:11 +0800, Wanpeng Li wrote: > 2016-08-11 0:52 GMT+08:00 Rik van Riel : > > On Wed, 10 Aug 2016 07:39:08 +0800 > > Wanpeng Li wrote: > > > > > The regression is caused by your commit "sched,time: Count > > > actually > &g

Re: [PATCH 1/5] sched,time: Count actually elapsed irq & softirq time

2016-08-10 Thread Rik van Riel
On Wed, 2016-08-10 at 07:39 +0800, Wanpeng Li wrote: > 2016-08-10 7:25 GMT+08:00 Wanpeng Li <kernel...@gmail.com>: > > 2016-08-09 22:06 GMT+08:00 Rik van Riel <r...@redhat.com>: > > > On Tue, 2016-08-09 at 11:59 +0800, Wanpeng Li wrote: > > > > Hi Rik, &

Re: [PATCH 1/5] sched,time: Count actually elapsed irq & softirq time

2016-08-10 Thread Rik van Riel
On Wed, 2016-08-10 at 07:39 +0800, Wanpeng Li wrote: > 2016-08-10 7:25 GMT+08:00 Wanpeng Li : > > 2016-08-09 22:06 GMT+08:00 Rik van Riel : > > > On Tue, 2016-08-09 at 11:59 +0800, Wanpeng Li wrote: > > > > Hi Rik, > > > > 2016-07-13 22:50 GMT+08:00 Frede

[PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-10 Thread Rik van Riel
ng to do. The exact value of the threshold use probably does not matter too much, as long as it is long enough to cover all the timer ticks that passed during an idle period, because (irqtime_)account_idle_ticks can process a large amount of time all at once. Signed-off-by: Rik van Riel <r...@redhat

[PATCH] time,virt: resync steal time when guest & host lose sync

2016-08-10 Thread Rik van Riel
he threshold use probably does not matter too much, as long as it is long enough to cover all the timer ticks that passed during an idle period, because (irqtime_)account_idle_ticks can process a large amount of time all at once. Signed-off-by: Rik van Riel Reported-by: Wanpeng Li --- kernel/

Re: [PATCH 1/5] sched,time: Count actually elapsed irq & softirq time

2016-08-09 Thread Rik van Riel
On Tue, 2016-08-09 at 11:59 +0800, Wanpeng Li wrote: > Hi Rik, > 2016-07-13 22:50 GMT+08:00 Frederic Weisbecker <fweis...@gmail.com>: > > From: Rik van Riel <r...@redhat.com> > > > > Currently, if there was any irq or softirq time during 'ticks' > > ji

Re: [PATCH 1/5] sched,time: Count actually elapsed irq & softirq time

2016-08-09 Thread Rik van Riel
On Tue, 2016-08-09 at 11:59 +0800, Wanpeng Li wrote: > Hi Rik, > 2016-07-13 22:50 GMT+08:00 Frederic Weisbecker : > > From: Rik van Riel > > > > Currently, if there was any irq or softirq time during 'ticks' > > jiffies, the entire period will be accoun

Re: [PATCH] x86/mm: disable preemption during CR3 read+write

2016-08-05 Thread Rik van Riel
+ preempt_enable(); >  } That is one subtle race! Acked-by: Rik van Riel <r...@redhat.com> -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH] x86/mm: disable preemption during CR3 read+write

2016-08-05 Thread Rik van Riel
+ preempt_enable(); >  } That is one subtle race! Acked-by: Rik van Riel -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [PATCH] mm: move swap-in anonymous page into active list

2016-07-29 Thread Rik van Riel
: Minchan Kim <minc...@kernel.org> Acked-by: Rik van Riel <r...@redhat.com> The reason newly read in swap cache pages start on the inactive list is that we do some amount of read-around, and do not know which pages will get used. However, immediately activating the ones that DO get used, l

Re: [PATCH] mm: move swap-in anonymous page into active list

2016-07-29 Thread Rik van Riel
window size for getting a new referece > is 2 * NR_inactive + NR_active while others is NR_active + NR_active. > > It's not fair that it has more chance to be referenced compared > to other newly allocated page which starts from active lru list's > head. > > Signed-off-by: Min

Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath

2016-07-27 Thread Rik van Riel
On Wed, 2016-07-27 at 20:44 +0200, Michal Hocko wrote: > On Wed 27-07-16 14:16:22, Rik van Riel wrote: > > > > On Wed, 2016-07-27 at 18:33 +0200, Michal Hocko wrote: > > > > > > On Wed 27-07-16 10:47:59, Janani Ravichandran wrote: > > > > > >

Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath

2016-07-27 Thread Rik van Riel
On Wed, 2016-07-27 at 20:44 +0200, Michal Hocko wrote: > On Wed 27-07-16 14:16:22, Rik van Riel wrote: > > > > On Wed, 2016-07-27 at 18:33 +0200, Michal Hocko wrote: > > > > > > On Wed 27-07-16 10:47:59, Janani Ravichandran wrote: > > > > > >

Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath

2016-07-27 Thread Rik van Riel
On Wed, 2016-07-27 at 18:33 +0200, Michal Hocko wrote: > On Wed 27-07-16 10:47:59, Janani Ravichandran wrote: > > > > Add tracepoints to the slowpath code to gather some information. > > The tracepoints can also be used to find out how much time was > > spent in > > the slowpath. > I do not think

Re: [PATCH 1/2] mm: page_alloc.c: Add tracepoints for slowpath

2016-07-27 Thread Rik van Riel
On Wed, 2016-07-27 at 18:33 +0200, Michal Hocko wrote: > On Wed 27-07-16 10:47:59, Janani Ravichandran wrote: > > > > Add tracepoints to the slowpath code to gather some information. > > The tracepoints can also be used to find out how much time was > > spent in > > the slowpath. > I do not think

Re: [kernel-hardening] [PATCH] [RFC] Introduce mmap randomization

2016-07-26 Thread Rik van Riel
On Tue, 2016-07-26 at 11:22 -0700, william.c.robe...@intel.com wrote: > From: William Roberts > > This patch introduces the ability randomize mmap locations where the > address is not requested, for instance when ld is allocating pages > for > shared libraries. It

Re: [kernel-hardening] [PATCH] [RFC] Introduce mmap randomization

2016-07-26 Thread Rik van Riel
On Tue, 2016-07-26 at 11:22 -0700, william.c.robe...@intel.com wrote: > From: William Roberts > > This patch introduces the ability randomize mmap locations where the > address is not requested, for instance when ld is allocating pages > for > shared libraries. It chooses to randomize based on

Re: [PATCH v4 12/12] mm: SLUB hardened usercopy support

2016-07-25 Thread Rik van Riel
On Mon, 2016-07-25 at 16:29 -0700, Laura Abbott wrote: > On 07/25/2016 02:42 PM, Rik van Riel wrote: > > On Mon, 2016-07-25 at 12:16 -0700, Laura Abbott wrote: > > > On 07/20/2016 01:27 PM, Kees Cook wrote: > > > > Under CONFIG_HARDENED_USERCOPY,

Re: [PATCH v4 12/12] mm: SLUB hardened usercopy support

2016-07-25 Thread Rik van Riel
On Mon, 2016-07-25 at 16:29 -0700, Laura Abbott wrote: > On 07/25/2016 02:42 PM, Rik van Riel wrote: > > On Mon, 2016-07-25 at 12:16 -0700, Laura Abbott wrote: > > > On 07/20/2016 01:27 PM, Kees Cook wrote: > > > > Under CONFIG_HARDENED_USERCOPY,

Re: [PATCH v4 12/12] mm: SLUB hardened usercopy support

2016-07-25 Thread Rik van Riel
On Mon, 2016-07-25 at 12:16 -0700, Laura Abbott wrote: > On 07/20/2016 01:27 PM, Kees Cook wrote: > > Under CONFIG_HARDENED_USERCOPY, this adds object size checking to > > the > > SLUB allocator to catch any copies that may span objects. Includes > > a > > redzone handling fix discovered by

Re: [PATCH v4 12/12] mm: SLUB hardened usercopy support

2016-07-25 Thread Rik van Riel
On Mon, 2016-07-25 at 12:16 -0700, Laura Abbott wrote: > On 07/20/2016 01:27 PM, Kees Cook wrote: > > Under CONFIG_HARDENED_USERCOPY, this adds object size checking to > > the > > SLUB allocator to catch any copies that may span objects. Includes > > a > > redzone handling fix discovered by

Re: [PATCH 1/3] Add a new field to struct shrinker

2016-07-23 Thread Rik van Riel
On Fri, 2016-07-22 at 21:05 -0700, Tony Jones wrote: > On 07/22/2016 06:27 PM, Tony Jones wrote: > > On 07/20/2016 07:54 AM, Michal Hocko wrote: > > > > > > Michal, just to make sure I understand you correctly, do you > > > > mean that we > > > > could infer the names of the shrinkers by looking

Re: [PATCH 1/3] Add a new field to struct shrinker

2016-07-23 Thread Rik van Riel
On Fri, 2016-07-22 at 21:05 -0700, Tony Jones wrote: > On 07/22/2016 06:27 PM, Tony Jones wrote: > > On 07/20/2016 07:54 AM, Michal Hocko wrote: > > > > > > Michal, just to make sure I understand you correctly, do you > > > > mean that we > > > > could infer the names of the shrinkers by looking

Re: [PATCH v3 00/11] mm: Hardened usercopy

2016-07-20 Thread Rik van Riel
On Wed, 2016-07-20 at 16:02 +, David Laight wrote: > From: Kees Cook > > Sent: 20 July 2016 16:32 > ... > > Yup: that's exactly what it's doing: walking up the stack. :) > > Remind me to make sure all our customers run kernels with it > disabled. You want a single copy_from_user to write to

Re: [PATCH v3 00/11] mm: Hardened usercopy

2016-07-20 Thread Rik van Riel
On Wed, 2016-07-20 at 16:02 +, David Laight wrote: > From: Kees Cook > > Sent: 20 July 2016 16:32 > ... > > Yup: that's exactly what it's doing: walking up the stack. :) > > Remind me to make sure all our customers run kernels with it > disabled. You want a single copy_from_user to write to

Re: [RFC PATCH v3 2/2] mm, thp: convert from optimistic swapin collapsing to conservative

2016-07-20 Thread Rik van Riel
t; Suggested-by: Minchan Kim <minc...@kernel.org> > Acked-by: Rik van Riel <r...@redhat.com> -- All Rights Reversed. signature.asc Description: This is a digitally signed message part

Re: [RFC PATCH v3 2/2] mm, thp: convert from optimistic swapin collapsing to conservative

2016-07-20 Thread Rik van Riel
On Sun, 2016-07-10 at 03:10 +0300, Ebru Akagunduz wrote: > To detect whether khugepaged swapin worthwhile, this patch checks > the amount of young pages. There should be at least half of > HPAGE_PMD_NR to swapin. > > Signed-off-by: Ebru Akagunduz > Suggested-by: Minchan Kim &g

Re: [PATCH v3 1/2] mm, thp: fix comment inconsistency for swapin readahead functions

2016-07-20 Thread Rik van Riel
On Sun, 2016-07-10 at 03:09 +0300, Ebru Akagunduz wrote: > After fixing swapin issues, comment lines stayed as in old version. > This patch updates the comments. > > Signed-off-by: Ebru Akagunduz <ebru.akagun...@gmail.com> > Cc: Hillf Danton <hillf...@alibaba-inc.com> &

Re: [PATCH v3 1/2] mm, thp: fix comment inconsistency for swapin readahead functions

2016-07-20 Thread Rik van Riel
On Sun, 2016-07-10 at 03:09 +0300, Ebru Akagunduz wrote: > After fixing swapin issues, comment lines stayed as in old version. > This patch updates the comments. > > Signed-off-by: Ebru Akagunduz > Cc: Hillf Danton > Acked-by: Rik van Riel -- All Rights Reversed. signatu

Re: [PATCH v2 02/11] mm: Hardened usercopy

2016-07-14 Thread Rik van Riel
On Fri, 2016-07-15 at 09:20 +1000, Balbir Singh wrote: > > == > > +    ((unsigned long)end & (unsigned > > long)PAGE_MASK))) > > + return NULL; > > + > > + /* Allow if start and end are inside the same compound > > page. */ > > + endpage = virt_to_head_page(end); > > +

Re: [PATCH v2 02/11] mm: Hardened usercopy

2016-07-14 Thread Rik van Riel
On Fri, 2016-07-15 at 09:20 +1000, Balbir Singh wrote: > > == > > +    ((unsigned long)end & (unsigned > > long)PAGE_MASK))) > > + return NULL; > > + > > + /* Allow if start and end are inside the same compound > > page. */ > > + endpage = virt_to_head_page(end); > > +

[tip:timers/nohz] sched/cputime: Drop local_irq_save/restore from irqtime_account_irq()

2016-07-14 Thread tip-bot for Rik van Riel
Commit-ID: 553bf6bbfd8a540c70aee28eb50e24caff456a03 Gitweb: http://git.kernel.org/tip/553bf6bbfd8a540c70aee28eb50e24caff456a03 Author: Rik van Riel <r...@redhat.com> AuthorDate: Wed, 13 Jul 2016 16:50:05 +0200 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Thu, 14 Ju

[tip:timers/nohz] sched/cputime: Drop local_irq_save/restore from irqtime_account_irq()

2016-07-14 Thread tip-bot for Rik van Riel
Commit-ID: 553bf6bbfd8a540c70aee28eb50e24caff456a03 Gitweb: http://git.kernel.org/tip/553bf6bbfd8a540c70aee28eb50e24caff456a03 Author: Rik van Riel AuthorDate: Wed, 13 Jul 2016 16:50:05 +0200 Committer: Ingo Molnar CommitDate: Thu, 14 Jul 2016 10:42:35 +0200 sched/cputime: Drop

[tip:timers/nohz] sched/cputime: Replace VTIME_GEN irq time code with IRQ_TIME_ACCOUNTING code

2016-07-14 Thread tip-bot for Rik van Riel
Commit-ID: b58c35840521bb02b150e1d0d34ca9197f8b7145 Gitweb: http://git.kernel.org/tip/b58c35840521bb02b150e1d0d34ca9197f8b7145 Author: Rik van Riel <r...@redhat.com> AuthorDate: Wed, 13 Jul 2016 16:50:02 +0200 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Thu, 14 Ju

[tip:timers/nohz] sched/cputime: Replace VTIME_GEN irq time code with IRQ_TIME_ACCOUNTING code

2016-07-14 Thread tip-bot for Rik van Riel
Commit-ID: b58c35840521bb02b150e1d0d34ca9197f8b7145 Gitweb: http://git.kernel.org/tip/b58c35840521bb02b150e1d0d34ca9197f8b7145 Author: Rik van Riel AuthorDate: Wed, 13 Jul 2016 16:50:02 +0200 Committer: Ingo Molnar CommitDate: Thu, 14 Jul 2016 10:42:34 +0200 sched/cputime: Replace

[tip:timers/nohz] sched/cputime: Count actually elapsed irq & softirq time

2016-07-14 Thread tip-bot for Rik van Riel
Commit-ID: 57430218317e5b280a80582a139b26029c25de6c Gitweb: http://git.kernel.org/tip/57430218317e5b280a80582a139b26029c25de6c Author: Rik van Riel <r...@redhat.com> AuthorDate: Wed, 13 Jul 2016 16:50:01 +0200 Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Thu, 14 Ju

[tip:timers/nohz] sched/cputime: Count actually elapsed irq & softirq time

2016-07-14 Thread tip-bot for Rik van Riel
Commit-ID: 57430218317e5b280a80582a139b26029c25de6c Gitweb: http://git.kernel.org/tip/57430218317e5b280a80582a139b26029c25de6c Author: Rik van Riel AuthorDate: Wed, 13 Jul 2016 16:50:01 +0200 Committer: Ingo Molnar CommitDate: Thu, 14 Jul 2016 10:42:34 +0200 sched/cputime: Count

Re: [PATCH 3/3] Add name fields in shrinker tracepoint definitions

2016-07-13 Thread Rik van Riel
On Wed, 2016-07-13 at 12:12 -0700, Tony Jones wrote: > On 07/12/2016 11:16 PM, Janani Ravichandran wrote: > > > > > > > > I also have a patch which adds a similar latency script (python) > > > but interfaces it into the perf script setup. > > I’m looking for pointers for writing latency scripts

Re: [PATCH 3/3] Add name fields in shrinker tracepoint definitions

2016-07-13 Thread Rik van Riel
On Wed, 2016-07-13 at 12:12 -0700, Tony Jones wrote: > On 07/12/2016 11:16 PM, Janani Ravichandran wrote: > > > > > > > > I also have a patch which adds a similar latency script (python) > > > but interfaces it into the perf script setup. > > I’m looking for pointers for writing latency scripts

Re: [PATCH 1/3] Add a new field to struct shrinker

2016-07-11 Thread Rik van Riel
On Mon, 2016-07-11 at 08:37 +0200, Michal Hocko wrote: > On Sat 09-07-16 04:43:31, Janani Ravichandran wrote: > > Struct shrinker does not have a field to uniquely identify the > > shrinkers > > it represents. It would be helpful to have a new field to hold > > names of > > shrinkers. This

Re: [PATCH 1/3] Add a new field to struct shrinker

2016-07-11 Thread Rik van Riel
On Mon, 2016-07-11 at 08:37 +0200, Michal Hocko wrote: > On Sat 09-07-16 04:43:31, Janani Ravichandran wrote: > > Struct shrinker does not have a field to uniquely identify the > > shrinkers > > it represents. It would be helpful to have a new field to hold > > names of > > shrinkers. This

Re: [PATCH 0/9] mm: Hardened usercopy

2016-07-08 Thread Rik van Riel
On Fri, 2016-07-08 at 19:22 -0700, Laura Abbott wrote: >  > Even with the SLUB fixup I'm still seeing this blow up on my arm64 > system. This is a > Fedora rawhide kernel + the patches > > [0.666700] usercopy: kernel memory exposure attempt detected from > fc0008b4dd58 () (8 bytes) > [

Re: [PATCH 0/9] mm: Hardened usercopy

2016-07-08 Thread Rik van Riel
On Fri, 2016-07-08 at 19:22 -0700, Laura Abbott wrote: >  > Even with the SLUB fixup I'm still seeing this blow up on my arm64 > system. This is a > Fedora rawhide kernel + the patches > > [0.666700] usercopy: kernel memory exposure attempt detected from > fc0008b4dd58 () (8 bytes) > [

Re: [PATCH 4/4] irqtime: drop local_irq_save/restore from irqtime_account_irq

2016-07-08 Thread Rik van Riel
On Fri, 2016-07-08 at 16:34 +0200, Paolo Bonzini wrote: > > On 08/07/2016 15:19, Rik van Riel wrote: > > On Fri, 2016-07-08 at 14:30 +0200, Frederic Weisbecker wrote: > > > On Thu, Jun 30, 2016 at 03:35:50PM -0400, r...@redhat.com wrote: > > > > Fr

Re: [PATCH 4/4] irqtime: drop local_irq_save/restore from irqtime_account_irq

2016-07-08 Thread Rik van Riel
On Fri, 2016-07-08 at 16:34 +0200, Paolo Bonzini wrote: > > On 08/07/2016 15:19, Rik van Riel wrote: > > On Fri, 2016-07-08 at 14:30 +0200, Frederic Weisbecker wrote: > > > On Thu, Jun 30, 2016 at 03:35:50PM -0400, r...@redhat.com wrote: > > > > From: Ri

Re: [PATCH 4/4] irqtime: drop local_irq_save/restore from irqtime_account_irq

2016-07-08 Thread Rik van Riel
On Fri, 2016-07-08 at 14:30 +0200, Frederic Weisbecker wrote: > On Thu, Jun 30, 2016 at 03:35:50PM -0400, r...@redhat.com wrote: > > From: Rik van Riel <r...@redhat.com> > > > > Drop local_irq_save/restore from irqtime_account_irq. > > Instead, have softirq a

Re: [PATCH 4/4] irqtime: drop local_irq_save/restore from irqtime_account_irq

2016-07-08 Thread Rik van Riel
On Fri, 2016-07-08 at 14:30 +0200, Frederic Weisbecker wrote: > On Thu, Jun 30, 2016 at 03:35:50PM -0400, r...@redhat.com wrote: > > From: Rik van Riel > > > > Drop local_irq_save/restore from irqtime_account_irq. > > Instead, have softirq and hardirq track their t

<    8   9   10   11   12   13   14   15   16   17   >