...@mail.gmail.com/
> Fixes: 23cf7aa539dc ("selftests/bpf: Add selftest for fill_link_info")
> Signed-off-by: tyrone-wu
> Acked-by: Jiri Olsa
Acked-by: Yafang Shao
> ---
> V4 -> V5: no change
>
> V3 -> V4:
> Link: https://lore.kernel.org/bpf/Zv_PP6
.com/
> Fixes: 1b715e1b0ec5 ("bpf: Support ->fill_link_info for perf_event")
> Signed-off-by: tyrone-wu
> Acked-by: Jiri Olsa
LGTM
Acked-by: Yafang Shao
> ---
> V4 -> V5:
> Link:
> https://lore.kernel.org/bpf/caloahbc5xm7cbfhau3z5x2pquhihecnwaptjcwiovqtkmdz...@
On Fri, Oct 4, 2024 at 11:40 PM tyrone-wu wrote:
>
> Previously when retrieving `bpf_link_info.perf_event` for
> kprobe/uprobe/tracepoint, the `name_len` field was not populated by the
> kernel, leaving it to reflect the value initially set by the user. This
> behavior was inconsistent with how ot
helpers,
after that change, the callsite will specifilly set 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 ins
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, we
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 --g
48[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 34ad07fb924e..ae5282484710 100644
--- a/ke
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/in
re in prev 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 insertio
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/lin
Mel.
- make struct schedstats 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 t
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
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
(slab|head)
- 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
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 of page flags in pGp
Documentation/core-api/printk-formats.rst | 2 +-
lib/test_printf.c | 90 ++
f)
The documentation 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]
Signe
ut 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)
Rev
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: error:
(slab|head)
- 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
ut 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)
Rev
f)
The documentation 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]
Signe
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 of page flags in pGp
Documentation/core-api/printk-formats.rst | 2 +-
lib/test_printf.c | 90 ++
e 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 +-
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 names of p
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
(slab|head)
- 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
x 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 to print p
f)
The documentation 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
ut 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)
Rev
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
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 it is
f)
The documentation 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
(slab|head)
- 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
ut 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)
Rev
anging 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: don't combine pr_err with INFO
vsprin
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
>
ut 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 chang
(slab|head)
- 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-b
- the possible impact 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
hew Wilcox
Signed-off-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
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:
>
>
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)
&
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
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
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
tation 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/
(slab|head)
- 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-b
ut 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 dele
est_printf: 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
vspr
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
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
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
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 it is
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].
> >
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. While it
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
=33 used=3
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/
|head)
Cc: 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
ut 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 69742ab
r the patch
[ 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
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
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
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
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
time=0 [ns]
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 2d
eep-15582 [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
--
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
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
--- a
.
};
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 |
igned-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/
s well.
Detailed 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 __sched
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.
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
.
};
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 |
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
--- a
ed_stat_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 helper
igned-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/
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 t
igned-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/
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/
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 independe
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/
sed around 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 fil
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
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
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
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/sta
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/
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
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/
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
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
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
st 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/linu
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
> ---
&
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)
> > >
> > >
&
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,
> >
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
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
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
1 - 100 of 342 matches
Mail list logo