[PATCH] delayacct: clear right task's flag after blkio completes

2021-04-14 Thread Yafang Shao
t the right task, which should make it less error prone. Signed-off-by: Yafang Shao Cc: Tejun Heo Cc: Josh Snyder --- include/linux/delayacct.h | 20 ++-- mm/memory.c | 8 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/linux/dela

Re: [PATCH v2 0/6] sched: support schedstats for RT sched class

2021-04-06 Thread Yafang Shao
On Sat, Mar 27, 2021 at 6:13 PM Yafang Shao wrote: > > We want to measure the latency of RT tasks in our production > environment with schedstats facility, but currently schedstats is only > supported for fair sched class. In order to support if for other sched > classes,

[PATCH v2 6/6] sched, rt: support schedstats for RT sched class

2021-03-27 Thread Yafang Shao
elay=1001238954 [ns] [ In sleep.sh, it sleeps 1 sec each time. ] [l...@intel.com: reported build failure in prev version] Signed-off-by: Yafang Shao Cc: kernel test robot --- kernel/sched/rt.c | 137 ++ 1 file changed, 137 insertions(+) diff -

[PATCH v2 5/6] sched, rt: support sched_stat_runtime tracepoint for RT sched class

2021-03-27 Thread Yafang Shao
] d.h. 113.521352: sched_stat_runtime: comm=stress pid=9748 runtime=998203 [ns] vruntime=0 [ns] Signed-off-by: Yafang Shao --- kernel/sched/rt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 34ad07fb924e..ae5282484710 100644 --- a/kernel/sched

[PATCH v2 4/6] sched: introduce task block time in schedstats

2021-03-27 Thread Yafang Shao
, and it is more critital than S state. So it is worth to add a metric to measure it. Signed-off-by: Yafang Shao --- include/linux/sched.h | 2 ++ kernel/sched/debug.c | 6 -- kernel/sched/stats.c | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/linux/sched.h b/include

[PATCH v2 3/6] sched: make schedstats helpers independent of fair sched class

2021-03-27 Thread Yafang Shao
version] Signed-off-by: Yafang Shao Acked-by: Mel Gorman Cc: kernel test robot --- kernel/sched/fair.c | 133 +++ kernel/sched/stats.c | 103 + kernel/sched/stats.h | 34 +++ 3 files changed, 156 insertions(+), 114

[PATCH v2 2/6] sched: make struct sched_statistics independent of fair sched class

2021-03-27 Thread Yafang Shao
6.0~6.1 kernel.sched_schedstats=1 6.2~6.46.2~6.4 No obvious impact on the sched performance. No functional change. [l...@intel.com: reported build failure in prev version] Signed-off-by: Yafang Shao Acked-by: Mel Gorman Cc: kernel test robot --- include/linux/sched.h

[PATCH v2 0/6] sched: support schedstats for RT sched class

2021-03-27 Thread Yafang Shao
chedstats independent of fair sched class Yafang Shao (6): sched, fair: use __schedstat_set() in set_next_entity() sched: make struct sched_statistics independent of fair sched class sched: make schedstats helpers independent of fair sched class sched: introduce task block time in schedstats

[PATCH v2 1/6] sched, fair: use __schedstat_set() in set_next_entity()

2021-03-27 Thread Yafang Shao
schedstat_enabled() has been already checked, so we can use __schedstat_set() directly. Signed-off-by: Yafang Shao Acked-by: Mel Gorman --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index aaa0dfa29d53

Re: [PATCH v6 resend 0/3] mm, vsprintf: dump full information of page flags in pGp

2021-03-19 Thread Yafang Shao
On Fri, Mar 19, 2021 at 6:13 PM Yafang Shao wrote: > > The existed pGp shows the names of page flags only, rather than the full > information including section, node, zone, last cpuipid and kasan tag. > While it is not easy to parse these information manually because there > are

[PATCH v6 resend 2/3] mm, slub: don't combine pr_err with INFO

2021-03-19 Thread Yafang Shao
) - after the patch [ 6343.396602] Slab 0x4382e02b objects=33 used=3 fp=0x9ae06ffc flags=0x17c0010200(slab|head) [1]. https://lore.kernel.org/linux-mm/b9c0f2b6-e9b0-0c36-ebdd-2bc684c5a...@redhat.com/#t Suggested-by: Vlastimil Babka Signed-off-by: Yafang Shao Acked-by: Vlast

[PATCH v6 resend 0/3] mm, vsprintf: dump full information of page flags in pGp

2021-03-19 Thread Yafang Shao
Andy Yafang Shao (3): mm, slub: use pGp to print page flags mm, slub: don't combine pr_err with INFO vsprintf: dump full information of page flags in pGp Documentation/core-api/printk-formats.rst | 2 +- lib/test_printf.c | 90 --- lib/vsprintf.c

[PATCH v6 resend 3/3] vsprintf: dump full information of page flags in pGp

2021-03-19 Thread Yafang Shao
and test cases are also updated. The output of the test cases as follows, [68599.816764] test_printf: loaded. [68599.819068] test_printf: all 388 tests passed [68599.830367] test_printf: unloaded. [l...@intel.com: reported issues in the prev version in test_printf.c] Signed-off-by: Yafang Shao Cc

[PATCH v6 resend 1/3] mm, slub: use pGp to print page flags

2021-03-19 Thread Yafang Shao
is, [ 8846.517809] INFO: Slab 0xf42a2c60 objects=33 used=3 fp=0x60d32ca8 flags=0x17c0010200(slab|head) Signed-off-by: Yafang Shao Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Acked-by: David Rientjes Acked-by: Christoph Lameter Reviewed-by: Matthew Wilcox (Oracle) Reviewed

Re: linux-next: Tree for Mar 10 (lib/test_printf.c)

2021-03-14 Thread Yafang Shao
On Wed, Mar 10, 2021 at 5:52 PM Petr Mladek wrote: > > On Tue 2021-03-09 21:57:48, Randy Dunlap wrote: > > On 3/9/21 8:02 PM, Stephen Rothwell wrote: > > > Hi all, > > > > > > > on i386 (at least): > > > > ../lib/test_printf.c: In function 'page_flags_test': > > ../lib/test_printf.c:595:17:

[PATCH v6 2/3] mm, slub: don't combine pr_err with INFO

2021-03-14 Thread Yafang Shao
) - after the patch [ 6343.396602] Slab 0x4382e02b objects=33 used=3 fp=0x9ae06ffc flags=0x17c0010200(slab|head) [1]. https://lore.kernel.org/linux-mm/b9c0f2b6-e9b0-0c36-ebdd-2bc684c5a...@redhat.com/#t Suggested-by: Vlastimil Babka Signed-off-by: Yafang Shao Acked-by: Vlast

[PATCH v6 1/3] mm, slub: use pGp to print page flags

2021-03-14 Thread Yafang Shao
is, [ 8846.517809] INFO: Slab 0xf42a2c60 objects=33 used=3 fp=0x60d32ca8 flags=0x17c0010200(slab|head) Signed-off-by: Yafang Shao Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Acked-by: David Rientjes Acked-by: Christoph Lameter Reviewed-by: Matthew Wilcox (Oracle) Reviewed

[PATCH v6 3/3] vsprintf: dump full information of page flags in pGp

2021-03-14 Thread Yafang Shao
and test cases are also updated. The output of the test cases as follows, [68599.816764] test_printf: loaded. [68599.819068] test_printf: all 388 tests passed [68599.830367] test_printf: unloaded. [l...@intel.com: reported issues in the prev version in test_printf.c] Signed-off-by: Yafang Shao Cc

[PATCH v6 0/3] mm, vsprintf: dump full information of page flags in pGp

2021-03-14 Thread Yafang Shao
Andy Yafang Shao (3): mm, slub: use pGp to print page flags mm, slub: don't combine pr_err with INFO vsprintf: dump full information of page flags in pGp Documentation/core-api/printk-formats.rst | 2 +- lib/test_printf.c | 90 --- lib/vsprintf.c

[PATCH 1/1] vsprintf: dump full information of page flags in pGp fix

2021-02-22 Thread Yafang Shao
flags in pGp" [1] [1]. https://lore.kernel.org/linux-mm/20210215155141.47432-1-laoar.s...@gmail.com/ Signed-off-by: Yafang Shao Cc: Petr Mladek Cc: Matthew Wilcox Cc: Andy Shevchenko Cc: Vlastimil Babka Cc: Miaohe Lin Cc: Joe Perches Cc: David Hildenbrand --- lib/vsprintf.c | 2 +- 1 fi

Re: [PATCH v5 3/3] vsprintf: dump full information of page flags in pGp

2021-02-22 Thread Yafang Shao
On Mon, Feb 22, 2021 at 8:38 PM Petr Mladek wrote: > > Hello, > > first, I am sorry for the late reply. I have marked the thread as > proceed by mistake last week... > > > On Mon 2021-02-15 23:51:41, Yafang Shao wrote: > > Currently the pGp only shows the na

Re: [PATCH v5 3/3] vsprintf: dump full information of page flags in pGp

2021-02-22 Thread Yafang Shao
On Mon, Feb 15, 2021 at 11:53 PM Yafang Shao wrote: > > Currently the pGp only shows the names of page flags, rather than > the full information including section, node, zone, last cpupid and > kasan tag. While it is not easy to parse these information manually > because there're

[PATCH v5 2/3] mm, slub: don't combine pr_err with INFO

2021-02-15 Thread Yafang Shao
) - after the patch [ 6343.396602] Slab 0x4382e02b objects=33 used=3 fp=0x9ae06ffc flags=0x17c0010200(slab|head) [1]. https://lore.kernel.org/linux-mm/b9c0f2b6-e9b0-0c36-ebdd-2bc684c5a...@redhat.com/#t Suggested-by: Vlastimil Babka Signed-off-by: Yafang Shao Acked-by: Vlast

[PATCH v5 0/3] mm, vsprintf: dump full information of page flags in pGp

2021-02-15 Thread Yafang Shao
and Matthew - introduce new format instead of changing pGp, per Andy v2: - various coding improvement, per Joe, Miaohe, Vlastimil and Andy - remove the prefix completely in patch #2, per Vlastimil - Update the test cases, per Andy Yafang Shao (3): mm, slub: use pGp to print page flags mm, slub

[PATCH v5 3/3] vsprintf: dump full information of page flags in pGp

2021-02-15 Thread Yafang Shao
and test cases are also updated. The output of the test cases as follows, [11585.830272] test_printf: loaded. [11585.830454] test_printf: all 388 tests passed [11585.831401] test_printf: unloaded. Signed-off-by: Yafang Shao Cc: David Hildenbrand Cc: Joe Perches Cc: Miaohe Lin Cc: Vlastimil Babka

[PATCH v5 1/3] mm, slub: use pGp to print page flags

2021-02-15 Thread Yafang Shao
is, [ 8846.517809] INFO: Slab 0xf42a2c60 objects=33 used=3 fp=0x60d32ca8 flags=0x17c0010200(slab|head) Signed-off-by: Yafang Shao Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Acked-by: David Rientjes Acked-by: Christoph Lameter Reviewed-by: Matthew Wilcox (Oracle) Reviewed

Re: [PATCH v4 3/3] vsprintf: dump full information of page flags in pGp

2021-02-10 Thread Yafang Shao
On Wed, Feb 10, 2021 at 8:51 PM Petr Mladek wrote: > > On Wed 2021-02-10 00:21:37, Yafang Shao wrote: > > On Tue, Feb 9, 2021 at 9:53 PM Petr Mladek wrote: > > > > > > On Tue 2021-02-09 18:56:13, Yafang Shao wrote: > > > > Currently the pGp only

Re: [PATCH v4 3/3] vsprintf: dump full information of page flags in pGp

2021-02-09 Thread Yafang Shao
On Tue, Feb 9, 2021 at 9:53 PM Petr Mladek wrote: > > On Tue 2021-02-09 18:56:13, Yafang Shao wrote: > > Currently the pGp only shows the names of page flags, rather than > > the full information including section, node, zone, last cpupid and > > kasan tag. While

[PATCH v4 3/3] vsprintf: dump full information of page flags in pGp

2021-02-09 Thread Yafang Shao
and test cases are also updated. The output of the test cases as follows, [ 501.485081] test_printf: loaded. [ 501.485768] test_printf: all 388 tests passed [ 501.488762] test_printf: unloaded. Signed-off-by: Yafang Shao Cc: David Hildenbrand Cc: Joe Perches Cc: Miaohe Lin Cc: Vlastimil Babka

[PATCH v4 2/3] mm, slub: don't combine pr_err with INFO

2021-02-09 Thread Yafang Shao
) - after the patch [ 6343.396602] Slab 0x4382e02b objects=33 used=3 fp=0x9ae06ffc flags=0x17c0010200(slab|head) [1]. https://lore.kernel.org/linux-mm/b9c0f2b6-e9b0-0c36-ebdd-2bc684c5a...@redhat.com/#t Suggested-by: Vlastimil Babka Signed-off-by: Yafang Shao Acked-by: Vlast

[PATCH v4 1/3] mm, slub: use pGp to print page flags

2021-02-09 Thread Yafang Shao
is, [ 8846.517809] INFO: Slab 0xf42a2c60 objects=33 used=3 fp=0x60d32ca8 flags=0x17c0010200(slab|head) Signed-off-by: Yafang Shao Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Acked-by: David Rientjes Acked-by: Christoph Lameter Reviewed-by: Matthew Wilcox (Oracle) Reviewed

[PATCH v4 0/3] mm, vsprintf: dump full information of page flags in pGp

2021-02-09 Thread Yafang Shao
v2: - various coding improvement, per Joe, Miaohe, Vlastimil and Andy - remove the prefix completely in patch #2, per Vlastimil - Update the test cases, per Andy Yafang Shao (3): mm, slub: use pGp to print page flags mm, slub: don't combine pr_err with INFO vsprintf: dump full information

Re: [PATCH v3 0/3] mm, vsprintf: introduce new format to dump full information of page flags

2021-02-08 Thread Yafang Shao
On Mon, Feb 8, 2021 at 8:20 PM Matthew Wilcox wrote: > > On Mon, Feb 08, 2021 at 06:14:36PM +0800, Yafang Shao wrote: > > To avoid breaking some tools which parsing pGp via debugfs or affecting > > the printf buffer, other new formats are introduced, so the user can choose >

[PATCH v3 1/3] mm, slub: use pGp to print page flags

2021-02-08 Thread Yafang Shao
is, [ 8846.517809] INFO: Slab 0xf42a2c60 objects=33 used=3 fp=0x60d32ca8 flags=0x17c0010200(slab|head) Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Acked-by: David Rientjes Acked-by: Christoph Lameter Signed-off-by: Yafang Shao --- mm/slub.c | 5 +++-- 1 file changed, 3

[PATCH v3 2/3] mm, slub: don't combine pr_err with INFO

2021-02-08 Thread Yafang Shao
) - after the patch [ 6343.396602] Slab 0x4382e02b objects=33 used=3 fp=0x9ae06ffc flags=0x17c0010200(slab|head) [1]. https://lore.kernel.org/linux-mm/b9c0f2b6-e9b0-0c36-ebdd-2bc684c5a...@redhat.com/#t Suggested-by: Vlastimil Babka Cc: David Hildenbrand Signed-off-by: Yafang

[PATCH v3 0/3] mm, vsprintf: introduce new format to dump full information of page flags

2021-02-08 Thread Yafang Shao
on debugfs and the fix of it, per Joe and Matthew - introduce new format instead of changing pGp, per Andy v2: - various coding improvement, per Joe, Miaohe, Vlastimil and Andy - remove the prefix completely in patch #2, per Vlastimil - Update the test cases, per Andy Yafang Shao (3): mm, slub: use pGp

[PATCH v3 3/3] vsprintf: introduce new format to dump full information of page flags

2021-02-08 Thread Yafang Shao
-by: Yafang Shao --- Documentation/core-api/printk-formats.rst | 2 + lib/test_printf.c | 126 +++--- lib/vsprintf.c| 115 +++- 3 files changed, 226 insertions(+), 17 deletions(-) diff --git a/Documentation/core-api

Re: [PATCH v2 3/3] vsprintf: dump full information of page flags in pGp

2021-02-02 Thread Yafang Shao
On Tue, Feb 2, 2021 at 12:16 AM Andy Shevchenko wrote: > > On Mon, Feb 01, 2021 at 09:49:59PM +0800, Yafang Shao wrote: > > On Mon, Feb 1, 2021 at 9:27 PM Andy Shevchenko > > wrote: > > > On Mon, Feb 01, 2021 at 07:56:10PM +0800, Yafang Shao wrote: > >

Re: [PATCH v2 3/3] vsprintf: dump full information of page flags in pGp

2021-02-01 Thread Yafang Shao
On Mon, Feb 1, 2021 at 10:15 PM Matthew Wilcox wrote: > > On Mon, Feb 01, 2021 at 07:56:10PM +0800, Yafang Shao wrote: > > - Before the patch, > > [ 6343.396602] Slab 0x4382e02b objects=33 used=3 > > fp=0x9ae06ffc flags=0x17c0010200(slab|head) &

Re: [PATCH v2 3/3] vsprintf: dump full information of page flags in pGp

2021-02-01 Thread Yafang Shao
On Mon, Feb 1, 2021 at 9:34 PM Andy Shevchenko wrote: > > On Mon, Feb 01, 2021 at 02:23:33PM +0100, David Hildenbrand wrote: > > On 01.02.21 12:56, Yafang Shao wrote: > > > Currently the pGp only shows the names of page flags, rather than > > > the full information

Re: [PATCH v2 3/3] vsprintf: dump full information of page flags in pGp

2021-02-01 Thread Yafang Shao
On Mon, Feb 1, 2021 at 9:27 PM Andy Shevchenko wrote: > > On Mon, Feb 01, 2021 at 07:56:10PM +0800, Yafang Shao wrote: > > Currently the pGp only shows the names of page flags, rather than > > the full information including section, node, zone, last cpupid and > > kasan t

Re: [PATCH v2 3/3] vsprintf: dump full information of page flags in pGp

2021-02-01 Thread Yafang Shao
On Mon, Feb 1, 2021 at 9:05 PM Joe Perches wrote: > > On Mon, 2021-02-01 at 19:56 +0800, Yafang Shao wrote: > > Currently the pGp only shows the names of page flags, rather than > > the full information including section, node, zone, last cpupid and > > kasan tag. While

[PATCH v2 3/3] vsprintf: dump full information of page flags in pGp

2021-02-01 Thread Yafang Shao
and test cases are also updated. Cc: David Hildenbrand Cc: Joe Perches Cc: Miaohe Lin Cc: Vlastimil Babka Cc: Andy Shevchenko Signed-off-by: Yafang Shao --- Documentation/core-api/printk-formats.rst | 2 +- lib/test_printf.c | 65 ++- lib/vsprintf.c

[PATCH v2 2/3] mm, slub: don't combine pr_err with INFO

2021-02-01 Thread Yafang Shao
) - after the patch [ 6343.396602] Slab 0x4382e02b objects=33 used=3 fp=0x9ae06ffc flags=0x17c0010200(slab|head) [1]. https://lore.kernel.org/linux-mm/b9c0f2b6-e9b0-0c36-ebdd-2bc684c5a...@redhat.com/#t Suggested-by: Vlastimil Babka Cc: David Hildenbrand Signed-off-by: Yafang

[PATCH v2 1/3] mm, slub: use pGp to print page flags

2021-02-01 Thread Yafang Shao
is, [ 8846.517809] INFO: Slab 0xf42a2c60 objects=33 used=3 fp=0x60d32ca8 flags=0x17c0010200(slab|head) Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Acked-by: David Rientjes Signed-off-by: Yafang Shao --- mm/slub.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions

[PATCH v2 0/3] mm, vsprintf: dump full information of page flags in pGp

2021-02-01 Thread Yafang Shao
: unloaded. v2: - various coding improvement, per Joe, Miaohe, Vlastimil and Andy - remove the prefix completely in patch #2, per Vlastimil - Update the test cases, per Andy Yafang Shao (3): mm, slub: use pGp to print page flags mm, slub: don't combine pr_err with INFO vsprintf: dump full

Re: [PATCH 3/3] printk: dump full information of page flags in pGp

2021-01-28 Thread Yafang Shao
On Thu, Jan 28, 2021 at 10:50 PM Andy Shevchenko wrote: > > On Thu, Jan 28, 2021 at 09:18:24PM +0800, Yafang Shao wrote: > > On Thu, Jan 28, 2021 at 8:11 PM Andy Shevchenko > > wrote: > > ... > > > Thanks for the explanation. > > I will change it as you s

Re: [PATCH 0/3] mm, printk: dump full information of page flags in pGp

2021-01-28 Thread Yafang Shao
On Thu, Jan 28, 2021 at 8:12 PM Andy Shevchenko wrote: > > On Thu, Jan 28, 2021 at 10:19:44AM +0800, Yafang Shao wrote: > > Currently the pGp only shows the names of page flags, rather than > > the full information including section, node, zone, last cpupid and > > kasan t

Re: [PATCH 3/3] printk: dump full information of page flags in pGp

2021-01-28 Thread Yafang Shao
On Thu, Jan 28, 2021 at 8:11 PM Andy Shevchenko wrote: > > On Thu, Jan 28, 2021 at 10:19:47AM +0800, Yafang Shao wrote: > > Currently the pGp only shows the names of page flags, rather than > > the full information including section, node, zone, last cpupid and > > kasan t

Re: [PATCH 3/3] printk: dump full information of page flags in pGp

2021-01-28 Thread Yafang Shao
On Thu, Jan 28, 2021 at 6:42 PM Vlastimil Babka wrote: > > On 1/28/21 3:19 AM, Yafang Shao wrote: > > Currently the pGp only shows the names of page flags, rather than > > the full information including section, node, zone, last cpupid and > > kasan tag. While

Re: [PATCH 2/3] mm, slub: don't combine pr_err with INFO

2021-01-28 Thread Yafang Shao
On Thu, Jan 28, 2021 at 6:35 PM Vlastimil Babka wrote: > > On 1/28/21 3:19 AM, Yafang Shao wrote: > > It is strange to combine "pr_err" with "INFO", so let's clean them up. > > This patch is motivated by David's comment[1]. > > > >

Re: [PATCH 3/3] printk: dump full information of page flags in pGp

2021-01-27 Thread Yafang Shao
On Thu, Jan 28, 2021 at 10:52 AM Miaohe Lin wrote: > > Hi: > On 2021/1/28 10:19, Yafang Shao wrote: > > Currently the pGp only shows the names of page flags, rather than > > the full information including section, node, zone, last cpupid and > > kasan tag. Wh

Re: [PATCH 3/3] printk: dump full information of page flags in pGp

2021-01-27 Thread Yafang Shao
On Thu, Jan 28, 2021 at 10:35 AM Joe Perches wrote: > > On Thu, 2021-01-28 at 10:19 +0800, Yafang Shao wrote: > > Currently the pGp only shows the names of page flags, rather than > > the full information including section, node, zone, last cpupid and > > kasan tag. While

[PATCH 0/3] mm, printk: dump full information of page flags in pGp

2021-01-27 Thread Yafang Shao
fp=0x6d0779d1 flags=0x17c0010200(Node 0x0,Zone 0x2,Lastcpupid 0x1f,slab|head) Yafang Shao (3): mm, slub: use pGp to print page flags mm, slub: don't combine pr_err with INFO printk: dump full information of page flags in pGp lib/vsprintf.c | 42

[PATCH 3/3] printk: dump full information of page flags in pGp

2021-01-27 Thread Yafang Shao
: David Hildenbrand Signed-off-by: Yafang Shao --- lib/vsprintf.c | 42 +- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 3b53c73580c5..bd809f4f1b82 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1916,6

[PATCH 1/3] mm, slub: use pGp to print page flags

2021-01-27 Thread Yafang Shao
is, [ 8846.517809] INFO: Slab 0xf42a2c60 objects=33 used=3 fp=0x60d32ca8 flags=0x17c0010200(slab|head) Reviewed-by: David Hildenbrand Signed-off-by: Yafang Shao --- mm/slub.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/slub.c b/mm/slub.c index 69742ab9a21d

[PATCH 2/3] mm, slub: don't combine pr_err with INFO

2021-01-27 Thread Yafang Shao
h [ 6312.639698] ERR: Slab 0x6d1133b9 objects=33 used=3 fp=0x6d0779d1 flags=0x17c0010200(slab|head) [1]. https://lore.kernel.org/linux-mm/b9c0f2b6-e9b0-0c36-ebdd-2bc684c5a...@redhat.com/#t Cc: David Hildenbrand Signed-off-by: Yafang Shao --- mm/slub.c | 10 +

Re: [xfs] db962cd266: Assertion_failed

2021-01-04 Thread Yafang Shao
On Sat, Jan 2, 2021 at 5:53 AM Dave Chinner wrote: > > On Fri, Jan 01, 2021 at 05:10:49PM +0800, Yafang Shao wrote: > > On Thu, Dec 31, 2020 at 10:46 AM kernel test robot > > wrote: > . > > > [ 552.905799] XFS: Assertion failed: !current->journal_info, file

Re: [xfs] db962cd266: Assertion_failed

2021-01-01 Thread Yafang Shao
on reservation recursion") > url: > https://github.com/0day-ci/linux/commits/Yafang-Shao/xfs-avoid-transaction-reservation-recursion/20201222-092315 > base: https://git.kernel.org/cgit/fs/xfs/xfs-linux.git for-next > > in testcase: filebench > version: filebench-x86_64-22620e6-1

Re: [PATCH 3/6] sched: make struct sched_statistics independent of fair sched class

2020-12-01 Thread Yafang Shao
On Tue, Dec 1, 2020 at 8:41 PM Mel Gorman wrote: > > On Tue, Dec 01, 2020 at 07:54:13PM +0800, Yafang Shao wrote: > > If we want to use schedstats facility, we should move out of > > struct sched_statistics from the struct sched_entity or add it into other > > sctructs

Re: [PATCH 4/6] sched: make schedstats helpers independent of fair sched class

2020-12-01 Thread Yafang Shao
On Tue, Dec 1, 2020 at 8:46 PM Mel Gorman wrote: > > On Tue, Dec 01, 2020 at 07:54:14PM +0800, Yafang Shao wrote: > > The original prototype of the schedstats helpers are > > > > update_stats_wait_*(struct cfs_rq *cfs_rq, struct sched_entity *se) > > > > The cf

[PATCH 5/6] sched, rt: support sched_stat_runtime tracepoint for RT sched class

2020-12-01 Thread Yafang Shao
] stress-9748[039] d.h. 113.521352: sched_stat_runtime: comm=stress pid=9748 runtime=998203 [ns] vruntime=0 [ns] Signed-off-by: Yafang Shao --- kernel/sched/rt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 2d543a270dfe

[PATCH 6/6] sched, rt: support schedstats for RT sched class

2020-12-01 Thread Yafang Shao
5582 [041] dN.. 1732.814348: sched_stat_sleep: comm=sleep.sh pid=15474 delay=1001223130 [ns] sleep-15584 [041] dN.. 1733.815908: sched_stat_sleep: comm=sleep.sh pid=15474 delay=1001238954 [ns] [ In sleep.sh, it sleeps 1 sec each time. ] Signed-off-by: Yafang Shao --- ke

[PATCH 4/6] sched: make schedstats helpers independent of fair sched class

2020-12-01 Thread Yafang Shao
Gorman Signed-off-by: Yafang Shao --- kernel/sched/fair.c | 140 +++ kernel/sched/stats.c | 104 kernel/sched/stats.h | 32 ++ 3 files changed, 157 insertions(+), 119 deletions(-) diff --git a/kernel/sched/fair.c b

[PATCH 2/6] sched, fair: use __schedstat_set() in set_next_entity()

2020-12-01 Thread Yafang Shao
schedstat_enabled() has been already checked, so we can use __schedstat_set() directly. Signed-off-by: Yafang Shao --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 8ff1daa3d9bb..7e7c03cede94 100644

[PATCH 3/6] sched: make struct sched_statistics independent of fair sched class

2020-12-01 Thread Yafang Shao
After the patch it is clearly that both of se or rt_se can easily get the sched_statistics by a task_struct or a task_group. Signed-off-by: Yafang Shao --- include/linux/sched.h| 3 +- kernel/sched/core.c | 24 --- kernel/sched/deadline.c | 4 +- kernel/sched/debug.c | 81 ++

[PATCH 1/6] sched: don't include stats.h in sched.h

2020-12-01 Thread Yafang Shao
-off-by: Yafang Shao --- kernel/sched/core.c | 1 + kernel/sched/deadline.c | 1 + kernel/sched/debug.c | 1 + kernel/sched/fair.c | 1 + kernel/sched/idle.c | 1 + kernel/sched/rt.c| 2 +- kernel/sched/sched.h | 6 +- kernel/sched/stats.c | 1 + kernel/sched

[PATCH 0/6] sched: support schedstats for RT sched class

2020-12-01 Thread Yafang Shao
etailed examples of the output of schedstats for RT tasks are in patch #6. Changes since RFC: - improvement of schedstats helpers, per Mel. - make struct schedstats independent of fair sched class Yafang Shao (6): sched: don't include stats.h in sched.h sched, fair: use __schedstat_set() in s

Re: [RFC PATCH v3 0/5] sched: support schedstats for RT sched class

2020-11-27 Thread Yafang Shao
On Sat, Nov 28, 2020 at 12:12 AM Yafang Shao wrote: > > We want to measure the latency of RT tasks in our production > environment with schedstats facility, but currently schedstats is only > supported for fair sched class. This patch enable it for RT sched class > as well.

[RFC PATCH v3 4/5] sched: make schedstats helpers independent of fair sched class

2020-11-27 Thread Yafang Shao
Gorman Signed-off-by: Yafang Shao --- kernel/sched/fair.c | 140 +++ kernel/sched/stats.c | 104 kernel/sched/stats.h | 32 ++ 3 files changed, 157 insertions(+), 119 deletions(-) diff --git a/kernel/sched/fair.c b

[RFC PATCH v3 3/5] sched: make struct sched_statistics independent of fair sched class

2020-11-27 Thread Yafang Shao
After the patch it is clearly that both of se or rt_se can easily get the sched_statistics by a task_struct or a task_group. Signed-off-by: Yafang Shao --- include/linux/sched.h| 3 +- kernel/sched/core.c | 24 --- kernel/sched/deadline.c | 4 +- kernel/sched/debug.c | 81 ++

[RFC PATCH v3 2/5] sched, fair: use __schedstat_set() in set_next_entity()

2020-11-27 Thread Yafang Shao
schedstat_enabled() has been already checked, so we can use __schedstat_set() directly. Signed-off-by: Yafang Shao --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 8ff1daa3d9bb..7e7c03cede94 100644

[RFC PATCH v3 0/5] sched: support schedstats for RT sched class

2020-11-27 Thread Yafang Shao
_runtime can also be supported in the future if it is helpful. Yafang Shao (5): sched: don't include stats.h in sched.h sched, fair: use __schedstat_set() in set_next_entity() sched: make struct sched_statistics independent of fair sched class sched: make schedstats helpers independent o

[RFC PATCH v3 1/5] sched: don't include stats.h in sched.h

2020-11-27 Thread Yafang Shao
-off-by: Yafang Shao --- kernel/sched/core.c | 1 + kernel/sched/deadline.c | 1 + kernel/sched/debug.c | 1 + kernel/sched/fair.c | 1 + kernel/sched/idle.c | 1 + kernel/sched/rt.c| 2 +- kernel/sched/sched.h | 6 +- kernel/sched/stats.c | 1 + kernel/sched

Re: [RFC PATCH v2 3/5] sched: make schedstats helper independent of cfs_rq

2020-11-24 Thread Yafang Shao
On Tue, Nov 24, 2020 at 7:40 PM Mel Gorman wrote: > > On Mon, Nov 23, 2020 at 08:58:06PM +0800, Yafang Shao wrote: > > The 'cfs_rq' in these helpers > > update_stats_{wait_start, wait_end, enqueue_sleeper} is only used to get > > the rq_clock, so we can pass the rq dire

[RFC PATCH v2 1/5] sched: don't include stats.h in sched.h

2020-11-23 Thread Yafang Shao
-off-by: Yafang Shao --- kernel/sched/core.c | 1 + kernel/sched/deadline.c | 1 + kernel/sched/debug.c | 1 + kernel/sched/fair.c | 1 + kernel/sched/idle.c | 1 + kernel/sched/rt.c| 2 +- kernel/sched/sched.h | 6 +- kernel/sched/stats.c | 1 + kernel/sched

[RFC PATCH v2 4/5] sched: define update_stats_curr_start() as a common helper

2020-11-23 Thread Yafang Shao
update_stats_curr_start() is used to update the exec_start when we are starting a new run period, which is used by all sched class. So we'd better define it as a common helper. Signed-off-by: Yafang Shao --- kernel/sched/fair.c | 14 +- kernel/sched/rt.c| 2 +- kernel/sched

[RFC PATCH v2 0/5] sched: support schedstat for RT sched class

2020-11-23 Thread Yafang Shao
to trace RT tasks as well after that patchset. PATCH #1 ~ #4 are the preparation of PATCH #5. - v2: keep the schedstats functions inline, per Mel. Yafang Shao (5): sched: don't include stats.h in sched.h sched: define task_of() as a common helper sched: make schedstats helper independent

[RFC PATCH v2 2/5] sched: define task_of() as a common helper

2020-11-23 Thread Yafang Shao
task_of() is used to get task_struct from sched_entity. As sched_entity in struct task_struct can be used by all sched class, we'd better move this macro into sched.h, then it can be used by all sched class. Signed-off-by: Yafang Shao --- kernel/sched/fair.c | 11 --- kernel/sched

[RFC PATCH v2 3/5] sched: make schedstats helper independent of cfs_rq

2020-11-23 Thread Yafang Shao
824Bytes. w/o this patch, with this patch Size of vmlinux:7844383278444656 Signed-off-by: Yafang Shao --- kernel/sched/fair.c | 148 ++- kernel/sched/stats.h | 144 + 2 files changed

[RFC PATCH v2 5/5] sched, rt: support schedstat for RT sched class

2020-11-23 Thread Yafang Shao
RT tasks as well. Signed-off-by: Yafang Shao --- kernel/sched/rt.c| 90 kernel/sched/sched.h | 4 ++ 2 files changed, 94 insertions(+) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index 3422dd85cfb4..f2eff92275f0 100644 --- a/kernel/sched

Re: [RFC PATCH 4/4] sched, rt: support schedstat for RT sched class

2020-11-20 Thread Yafang Shao
On Fri, Nov 20, 2020 at 10:39 AM jun qian wrote: > > Yafang Shao 于2020年11月19日周四 上午11:55写道: > > > > We want to measure the latency of RT tasks in our production > > environment with schedstat facility, but currently schedstat is only > > supported for fair sched clas

Re: [RFC PATCH 2/4] sched: make schedstats helpers not depend on cfs_rq

2020-11-19 Thread Yafang Shao
On Thu, Nov 19, 2020 at 3:45 PM Mel Gorman wrote: > > On Thu, Nov 19, 2020 at 11:52:28AM +0800, Yafang Shao wrote: > > The 'cfs_rq' in these helpers is only used to get the rq_clock, so we > > can pass the rq_clock directly. After that, these helpers can be used by &

[RFC PATCH 2/4] sched: make schedstats helpers not depend on cfs_rq

2020-11-18 Thread Yafang Shao
The 'cfs_rq' in these helpers is only used to get the rq_clock, so we can pass the rq_clock directly. After that, these helpers can be used by all sched class. Signed-off-by: Yafang Shao --- kernel/sched/fair.c | 148 ++- kernel/sched/stats.c | 134

[RFC PATCH 3/4] sched: define update_stats_curr_start() as a common helper

2020-11-18 Thread Yafang Shao
update_stats_curr_start() is used to update the exec_start when we are starting a new run period, which is used by all sched class. So we'd better define it as a common helper. Signed-off-by: Yafang Shao --- kernel/sched/fair.c | 14 +- kernel/sched/rt.c| 2 +- kernel/sched

[RFC PATCH 4/4] sched, rt: support schedstat for RT sched class

2020-11-18 Thread Yafang Shao
RT tasks as well. Signed-off-by: Yafang Shao --- kernel/sched/rt.c| 61 kernel/sched/sched.h | 2 ++ 2 files changed, 63 insertions(+) diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c index b9ec886702a1..a318236b7166 100644 --- a/kernel/sched

[RFC PATCH 1/4] sched: define task_of() as a common helper

2020-11-18 Thread Yafang Shao
task_of() is used to get task_struct from sched_entity. As sched_entity in struct task_struct can be used by all sched class, we'd better move this macro into sched.h, then it can be used by all sched class. Signed-off-by: Yafang Shao --- kernel/sched/fair.c | 11 --- kernel/sched

[RFC PATCH 0/4] sched: support schedstat for RT sched class

2020-11-18 Thread Yafang Shao
to trace RT tasks as well after that patchset. PATCH #1 ~ #3 are the preparation of PATCH #4. Yafang Shao (4): sched: define task_of() as a common helper sched: make schedstats helpers not depend on cfs_rq sched: define update_stats_curr_start() as a common helper sched, rt: support schedstat

Re: [PATCH 1/1] Sched/fair: Improve the accuracy of sched_stat_wait statistics

2020-10-15 Thread Yafang Shao
t;statistics.wait_start will be 0. > > So it will let the (rq_of(cfs_rq)) - se->statistics.wait_start) > > wrong. We need to avoid this scenario. > > > > Signed-off-by: jun qian > > Signed-off-by: Yafang Shao > > This SoB chain isn't valid. Did Yafang's tag n

Re: [PATCH] tracing: add tgid into common field

2020-10-13 Thread Yafang Shao
On Tue, Oct 13, 2020 at 9:05 PM Steven Rostedt wrote: > > On Tue, 13 Oct 2020 13:54:54 +0800 > Yafang Shao wrote: > > > --- a/include/linux/trace_events.h > > +++ b/include/linux/trace_events.h > > @@ -67,6 +67,7 @@ struct trace_entry { > > unsigned char

[PATCH] tracing: add tgid into common field

2020-10-12 Thread Yafang Shao
t keep it as-is. Signed-off-by: Yafang Shao --- include/linux/trace_events.h | 1 + kernel/trace/trace.c | 1 + kernel/trace/trace_events.c | 1 + kernel/trace/trace_output.c | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/trace_events.h b/include/linux/trace_ev

Re: [PATCH v3 2/2] mmap_lock: add tracepoints around lock acquisition

2020-10-09 Thread Yafang Shao
patch has effectively no overhead unless tracepoints are enabled at > runtime. If tracepoints are enabled, there is a performance impact, but > how much depends on exactly what e.g. the BPF program does. > > Signed-off-by: Axel Rasmussen Acked-by: Yafang Shao > --- >

Re: [PATCH] mmap_lock: add tracepoints around lock acquisition

2020-09-23 Thread Yafang Shao
On Thu, Sep 24, 2020 at 12:09 AM Steven Rostedt wrote: > > On Wed, 23 Sep 2020 18:04:17 +0800 > Yafang Shao wrote: > > > > What you can do, and what we have done is the following: > > > > > > (see include/linux/page_ref.h) > > > > > > &

Re: [PATCH] mmap_lock: add tracepoints around lock acquisition

2020-09-23 Thread Yafang Shao
On Wed, Sep 23, 2020 at 12:51 AM Steven Rostedt wrote: > > On Tue, 22 Sep 2020 12:09:19 +0800 > Yafang Shao wrote: > > > > > Are there any methods to avoid un-inlining these wrappers ? > > > > > > > > For example, > >

Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-22 Thread Yafang Shao
On Tue, Sep 22, 2020 at 3:27 PM Michal Hocko wrote: > > On Tue 22-09-20 12:20:52, Yafang Shao wrote: > > On Mon, Sep 21, 2020 at 7:36 PM Michal Hocko wrote: > > > > > > On Mon 21-09-20 19:23:01, Yafang Shao wrote: > > > > On Mon, S

Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-21 Thread Yafang Shao
On Mon, Sep 21, 2020 at 7:36 PM Michal Hocko wrote: > > On Mon 21-09-20 19:23:01, Yafang Shao wrote: > > On Mon, Sep 21, 2020 at 7:05 PM Michal Hocko wrote: > > > > > > On Mon 21-09-20 18:55:40, Yafang Shao wrote: > > > > On Mon, S

Re: [PATCH] mmap_lock: add tracepoints around lock acquisition

2020-09-21 Thread Yafang Shao
On Tue, Sep 22, 2020 at 12:53 AM Axel Rasmussen wrote: > > On Sun, Sep 20, 2020 at 9:58 PM Yafang Shao wrote: > > > > On Fri, Sep 18, 2020 at 2:13 AM Axel Rasmussen > > wrote: > > > > > > The goal of these tracepoints is to be able to debug lock cont

Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-21 Thread Yafang Shao
On Mon, Sep 21, 2020 at 7:05 PM Michal Hocko wrote: > > On Mon 21-09-20 18:55:40, Yafang Shao wrote: > > On Mon, Sep 21, 2020 at 4:12 PM Michal Hocko wrote: > > > > > > On Mon 21-09-20 16:02:55, zangchun...@bytedance.com wrote: > > > > From: Chunxin

Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-21 Thread Yafang Shao
On Mon, Sep 21, 2020 at 4:12 PM Michal Hocko wrote: > > On Mon 21-09-20 16:02:55, zangchun...@bytedance.com wrote: > > From: Chunxin Zang > > > > In the cgroup v1, we have 'force_mepty' interface. This is very > > useful for userspace to actively release memory. But the cgroup > > v2 does not. >

Re: [PATCH] mmap_lock: add tracepoints around lock acquisition

2020-09-20 Thread Yafang Shao
On Fri, Sep 18, 2020 at 2:13 AM Axel Rasmussen wrote: > > The goal of these tracepoints is to be able to debug lock contention > issues. This lock is acquired on most (all?) mmap / munmap / page fault > operations, so a multi-threaded process which does a lot of these can > experience significant

  1   2   3   4   5   >