From: Roman Gushchin <roman.gushchin@linux.dev>
To: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Cc: 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>,
Vlastimil Babka <vbabka@suse.cz>, Ingo Molnar <mingo@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.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
Subject: Re: [PATCH mm-unstable] lib/Kconfig.debug: do not enable DEBUG_PREEMPT by default
Date: Wed, 25 Jan 2023 18:02:04 -0800 [thread overview]
Message-ID: <Y9HfHKXRPLrfG6g1@P9FQF9L96D.corp.robot.car> (raw)
In-Reply-To: <20230121033942.350387-1-42.hyeyoo@gmail.com>
On Sat, Jan 21, 2023 at 12:39:42PM +0900, Hyeonggon Yoo wrote:
> In workloads where this_cpu operations are frequently performed,
> enabling DEBUG_PREEMPT may result in significant increase in
> runtime overhead due to frequent invocation of
> __this_cpu_preempt_check() function.
>
> This can be demonstrated through benchmarks such as hackbench where this
> configuration results in a 10% reduction in performance, primarily due to
> the added overhead within memcg charging path.
>
> Therefore, do not to enable DEBUG_PREEMPT by default and make users aware
> of its potential impact on performance in some workloads.
>
> hackbench-process-sockets
> debug_preempt no_debug_preempt
> Amean 1 0.4743 ( 0.00%) 0.4295 * 9.45%*
> Amean 4 1.4191 ( 0.00%) 1.2650 * 10.86%*
> Amean 7 2.2677 ( 0.00%) 2.0094 * 11.39%*
> Amean 12 3.6821 ( 0.00%) 3.2115 * 12.78%*
> Amean 21 6.6752 ( 0.00%) 5.7956 * 13.18%*
> Amean 30 9.6646 ( 0.00%) 8.5197 * 11.85%*
> Amean 48 15.3363 ( 0.00%) 13.5559 * 11.61%*
> Amean 79 24.8603 ( 0.00%) 22.0597 * 11.27%*
> Amean 96 30.1240 ( 0.00%) 26.8073 * 11.01%*
>
> Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Nice!
I checkout my very simple kmem performance test (1M allocations 8-bytes allocations)
and it shows ~30% difference: 112319 us with vs 80836 us without.
Probably not that big for real workloads, but still nice to have.
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
Thank you!
next prev parent reply other threads:[~2023-01-26 2:02 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
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 [this message]
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=Y9HfHKXRPLrfG6g1@P9FQF9L96D.corp.robot.car \
--to=roman.gushchin@linux.dev \
--cc=42.hyeyoo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=hannes@cmpxchg.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mingo@redhat.com \
--cc=muchun.song@linux.dev \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=shakeelb@google.com \
--cc=vbabka@suse.cz \
--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