From: Hyeonggon Yoo <42.hyeyoo@gmail.com>
To: Michal Hocko <mhocko@suse.com>
Cc: Vlastimil Babka <vbabka@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Roman Gushchin <roman.gushchin@linux.dev>,
Ingo Molnar <mingo@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Shakeel Butt <shakeelb@google.com>,
Muchun Song <muchun.song@linux.dev>,
Matthew Wilcox <willy@infradead.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>,
Mel Gorman <mgorman@techsingularity.net>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Valentin Schneider <vschneid@redhat.com>,
Dennis Zhou <dennis@kernel.org>, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH mm-unstable] lib/Kconfig.debug: do not enable DEBUG_PREEMPT by default
Date: Fri, 27 Jan 2023 20:43:20 +0900 [thread overview]
Message-ID: <Y9O42N9J9gAsbJ6T@hyeyoo> (raw)
In-Reply-To: <Y9D7iXUuLsOURfFv@dhcp22.suse.cz>
On Wed, Jan 25, 2023 at 10:51:05AM +0100, Michal Hocko wrote:
> On Thu 26-01-23 00:41:15, Hyeonggon Yoo wrote:
> [...]
> > > Do you happen to have any perf data collected during those runs? I
> > > would be interested in the memcg side of things. Maybe we can do
> > > something better there.
> >
> > Yes, below is performance data I've collected.
> >
> > 6.1.8-debug-preempt-dirty
> > =========================
> > Overhead Command Shared Object Symbol
> > + 9.14% hackbench [kernel.vmlinux] [k] check_preemption_disabled
>
> Thanks! Could you just add callers that are showing in the profile for
> this call please?
- 14.56% 9.14% hackbench [kernel.vmlinux] [k] check_preemption_disabled
- 6.37% check_preemption_disabled
+ 3.48% mod_objcg_state
+ 1.10% obj_cgroup_charge
1.02% refill_obj_stock
0.67% memcg_slab_post_alloc_hook
0.58% mod_objcg_state
According to perf, many memcg functions call this function
and that's because __this_cpu_xxxx checks if preemption is disabled.
in include/linux/percpu-defs.h:
/*
* Operations for contexts that are safe from preemption/interrupts. These
* operations verify that preemption is disabled.
*/
#define __this_cpu_read(pcp) \
({ \
__this_cpu_preempt_check("read"); \
raw_cpu_read(pcp); \
})
#define __this_cpu_write(pcp, val) \
({ \
__this_cpu_preempt_check("write"); \
raw_cpu_write(pcp, val); \
})
#define __this_cpu_add(pcp, val) \
({ \
__this_cpu_preempt_check("add"); \
raw_cpu_add(pcp, val); \
})
in lib/smp_processor_id.c:
noinstr void __this_cpu_preempt_check(const char *op)
{
check_preemption_disabled("__this_cpu_", op);
}
EXPORT_SYMBOL(__this_cpu_preempt_check);
> --
> Michal Hocko
> SUSE Labs
next prev parent reply other threads:[~2023-01-27 11:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-21 3:39 Hyeonggon Yoo
2023-01-21 11:29 ` Vlastimil Babka
2023-01-21 11:54 ` Hyeonggon Yoo
2023-01-23 8:58 ` Michal Hocko
2023-01-25 15:41 ` Hyeonggon Yoo
2023-01-25 9:51 ` Michal Hocko
2023-01-27 11:43 ` Hyeonggon Yoo [this message]
2023-01-27 12:33 ` Michal Hocko
2023-01-23 11:05 ` Christoph Lameter
2023-01-24 16:34 ` Hyeonggon Yoo
2023-01-23 14:01 ` Mel Gorman
2023-01-26 2:02 ` Roman Gushchin
2023-01-27 11:45 ` Hyeonggon Yoo
2023-02-02 3:09 ` Davidlohr Bueso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y9O42N9J9gAsbJ6T@hyeyoo \
--to=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=cl@linux.com \
--cc=dennis@kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=hannes@cmpxchg.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=muchun.song@linux.dev \
--cc=penberg@kernel.org \
--cc=peterz@infradead.org \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=rostedt@goodmis.org \
--cc=shakeelb@google.com \
--cc=tj@kernel.org \
--cc=vbabka@suse.cz \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox