[RFC PATCH 2/7] core/metricfs: add support for percpu metricfs files

2020-08-07 Thread Jonathan Adams
METRIC_EMIT_PERCPU_INT with the value for the specified CPU. Signed-off-by: Jonathan Adams --- jwad...@google.com: rebased to 5.6-pre6, renamed funcs to start with metric_. This is work originally done by another engineer at google, who would rather not have their name associated

[RFC PATCH 3/7] core/metricfs: metric for kernel warnings

2020-08-07 Thread Jonathan Adams
(because it may be a module address); reporting the metric just walks the table and prints the values. The "warnings" metric is cumulative. Signed-off-by: Jonathan Adams --- jwad...@google.com: rebased to 5.8-rc6, removed google-isms, added lockdep_assert_held(), NMI handling, .

[RFC PATCH 5/7] core/metricfs: expose scheduler stat information through metricfs

2020-08-07 Thread Jonathan Adams
Add metricfs support for displaying percpu scheduler counters. The top directory is /sys/kernel/debug/metricfs/stat (analogous to /proc/stat). Then there is a subdirectory for each scheduler stat. For example: cat /sys/kernel/debug/metricfs/stat/user/values Signed-off-by: Jonathan Adams

[RFC PATCH 7/7] net-metricfs: Export /proc/net/dev via metricfs.

2020-08-07 Thread Jonathan Adams
...@google.com: ported code to 5.8-pre6, cleaned up googleisms ] Signed-off-by: Jonathan Adams --- net/core/Makefile | 1 + net/core/net_metricfs.c | 194 2 files changed, 195 insertions(+) create mode 100644 net/core/net_metricfs.c diff --git a/net

[RFC PATCH 6/7] core/metricfs: expose x86-specific irq information through metricfs

2020-08-07 Thread Jonathan Adams
Add metricfs support for displaying percpu irq counters for x86. The top directory is /sys/kernel/debug/metricfs/irq_x86. Then there is a subdirectory for each x86-specific irq counter. For example: cat /sys/kernel/debug/metricfs/irq_x86/TLB/values Signed-off-by: Jonathan Adams --- jwad

[RFC PATCH 4/7] core/metricfs: expose softirq information through metricfs

2020-08-07 Thread Jonathan Adams
Add metricfs support for displaying percpu softirq counters. The top directory is /sys/kernel/debug/metricfs/softirq. Then there is a subdirectory for each softirq type. For example: cat /sys/kernel/debug/metricfs/softirq/NET_RX/values Signed-off-by: Jonathan Adams --- jwad

[RFC PATCH 1/7] core/metricfs: Create metricfs, standardized files under debugfs.

2020-08-07 Thread Jonathan Adams
ators can create a hierarchy for their statistics using metricfs_create_subsys(). Signed-off-by: Justin TerAvest [jwad...@google.com: Forward ported to v5.8, cleaned up and modernized code significantly] Signed-off-by: Jonathan Adams --- notes: * To go upstream, this will ne

[RFC PATCH 0/7] metricfs metric file system and examples

2020-08-07 Thread Jonathan Adams
in having a generic interface for adding these kinds of statistics with reasonably low overhead (reading them is O(number of statistics), not number of objects in each statistic). There are definitely warts in the interface, but does the basic approach make sense to folks? Thanks, - Jonathan Jonath

[RFC PATCH 2/7] core/metricfs: add support for percpu metricfs files

2020-08-05 Thread Jonathan Adams
METRIC_EMIT_PERCPU_INT with the value for the specified CPU. Signed-off-by: Jonathan Adams --- jwad...@google.com: rebased to 5.6-pre6, renamed funcs to start with metric_. This is work originally done by another engineer at google, who would rather not have their name associated

[RFC PATCH 1/7] core/metricfs: Create metricfs, standardized files under debugfs.

2020-08-05 Thread Jonathan Adams
ators can create a hierarchy for their statistics using metricfs_create_subsys(). Signed-off-by: Justin TerAvest [jwad...@google.com: Forward ported to v5.8, cleaned up and modernized code significantly] Signed-off-by: Jonathan Adams --- notes: * To go upstream, this will ne

[RFC PATCH 4/7] core/metricfs: expose softirq information through metricfs

2020-08-05 Thread Jonathan Adams
Add metricfs support for displaying percpu softirq counters. The top directory is /sys/kernel/debug/metricfs/softirq. Then there is a subdirectory for each softirq type. For example: cat /sys/kernel/debug/metricfs/softirq/NET_RX/values Signed-off-by: Jonathan Adams --- jwad

[RFC PATCH 7/7] net-metricfs: Export /proc/net/dev via metricfs.

2020-08-05 Thread Jonathan Adams
...@google.com: ported code to 5.8-pre6, cleaned up googleisms ] Signed-off-by: Jonathan Adams --- net/core/Makefile | 1 + net/core/net_metricfs.c | 194 2 files changed, 195 insertions(+) create mode 100644 net/core/net_metricfs.c diff --git a/net

[RFC PATCH 6/7] core/metricfs: expose x86-specific irq information through metricfs

2020-08-05 Thread Jonathan Adams
Add metricfs support for displaying percpu irq counters for x86. The top directory is /sys/kernel/debug/metricfs/irq_x86. Then there is a subdirectory for each x86-specific irq counter. For example: cat /sys/kernel/debug/metricfs/irq_x86/TLB/values Signed-off-by: Jonathan Adams --- jwad

[RFC PATCH 5/7] core/metricfs: expose scheduler stat information through metricfs

2020-08-05 Thread Jonathan Adams
Add metricfs support for displaying percpu scheduler counters. The top directory is /sys/kernel/debug/metricfs/stat (analogous to /proc/stat). Then there is a subdirectory for each scheduler stat. For example: cat /sys/kernel/debug/metricfs/stat/user/values Signed-off-by: Jonathan Adams

[RFC PATCH 0/7] metricfs metric file system and examples

2020-08-05 Thread Jonathan Adams
ot number of objects in each statistic). There are definitely warts in the interface, but does the basic approach make sense to folks? Thanks, - Jonathan Jonathan Adams (5): core/metricfs: add support for percpu metricfs files core/metricfs: metric for kernel warnings core/metricfs: expose softirq

[RFC PATCH 3/7] core/metricfs: metric for kernel warnings

2020-08-05 Thread Jonathan Adams
(because it may be a module address); reporting the metric just walks the table and prints the values. The "warnings" metric is cumulative. Signed-off-by: Jonathan Adams --- jwad...@google.com: rebased to 5.8-rc6, removed google-isms, added lockdep_assert_held(), NMI handling, .

Re: [PATCH v2 0/5] Statsfs: a new ram-based file sytem for Linux kernel statistics

2020-05-14 Thread Jonathan Adams
bottom. > On 11/05/20 19:02, Jonathan Adams wrote: > > I think I'd characterize this slightly differently; we have a set of > > statistics which are essentially "in parallel": > > > > - a variety of statistics, N CPUs they're available for, or > > - a vari

Re: [PATCH v2 0/5] Statsfs: a new ram-based file sytem for Linux kernel statistics

2020-05-11 Thread Jonathan Adams
On Fri, May 8, 2020 at 2:44 AM Paolo Bonzini wrote: > > [Answering for Emanuele because he's not available until Monday] > > On 07/05/20 19:45, Jonathan Adams wrote: > > This is good work. As David Rientjes mentioned, I'm currently investigating > > a similar project, ba

Re: [PATCH v2 0/5] Statsfs: a new ram-based file sytem for Linux kernel statistics

2020-05-07 Thread Jonathan Adams
On Mon, May 4, 2020 at 4:05 AM Emanuele Giuseppe Esposito wrote: ... > Statsfs offers a generic and stable API, allowing any kind of > directory/file organization and supporting multiple kind of aggregations > (not only sum, but also average, max, min and count_zero) and data types > (all

Re: [PATCH 1/2] mm/zsmalloc.c: Migration can leave pages in ZS_EMPTY indefinitely

2019-08-02 Thread Jonathan Adams
a new putback_zspage_deferred() function which both > zs_page_migrate() and zs_page_putback() call. > > Signed-off-by: Henry Burns Reviewed-by: Jonathan Adams > > --- > mm/zsmalloc.c | 30 -- > 1 file changed, 20 insertions(+), 10 deletions(-) >

Re: [PATCH] mm/z3fold.c: Fix z3fold_destroy_pool() race condition

2019-07-26 Thread Jonathan Adams
c: support page migration") > > Signed-off-by: Henry Burns Reviewed-by: Jonathan Adams > Cc: > --- > mm/z3fold.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/mm/z3fold.c b/mm/z3fold.c > index 43de92f52961..ed19d98c9dcd 100644

Re: [PATCH] mm/z3fold.c: Fix z3fold_destroy_pool() ordering

2019-07-26 Thread Jonathan Adams
;mm/z3fold.c: use kref to prevent page free/compact > race") > > Signed-off-by: Henry Burns Reviewed-by: Jonathan Adams > Cc: > --- > mm/z3fold.c | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/mm/z3fold.c b/mm/z3fold.

Re: [RFC KVM 18/27] kvm/isolation: function to copy page table entries for percpu buffer

2019-05-17 Thread Jonathan Adams
On Tue, May 14, 2019 at 3:38 PM Sean Christopherson wrote: > On Tue, May 14, 2019 at 02:55:18PM -0700, Andy Lutomirski wrote: > > > On May 14, 2019, at 2:06 PM, Sean Christopherson > > > wrote: > > >> On Tue, May 14, 2019 at 01:33:21PM -0700, Andy Lutomirski wrote: > > >> I suspect that the

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-19 Thread Jonathan Adams
(apologies again; resending due to formatting issues) On Tue, Sep 18, 2018 at 6:03 PM Balbir Singh wrote: > > On Mon, Aug 20, 2018 at 09:52:19PM +, Woodhouse, David wrote: > > On Mon, 2018-08-20 at 14:48 -0700, Linus Torvalds wrote: > > > > > > Of course, after the long (and entirely

Re: Redoing eXclusive Page Frame Ownership (XPFO) with isolated CPUs in mind (for KVM to isolate its guests per CPU)

2018-09-19 Thread Jonathan Adams
(apologies again; resending due to formatting issues) On Tue, Sep 18, 2018 at 6:03 PM Balbir Singh wrote: > > On Mon, Aug 20, 2018 at 09:52:19PM +, Woodhouse, David wrote: > > On Mon, 2018-08-20 at 14:48 -0700, Linus Torvalds wrote: > > > > > > Of course, after the long (and entirely