From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67FB1C38142 for ; Mon, 23 Jan 2023 08:58:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CE91B6B0071; Mon, 23 Jan 2023 03:58:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C99656B0072; Mon, 23 Jan 2023 03:58:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B61A56B0073; Mon, 23 Jan 2023 03:58:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id A40796B0071 for ; Mon, 23 Jan 2023 03:58:34 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 782BE1604F9 for ; Mon, 23 Jan 2023 08:58:34 +0000 (UTC) X-FDA: 80385462948.18.6107048 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf20.hostedemail.com (Postfix) with ESMTP id 9BFA71C001C for ; Mon, 23 Jan 2023 08:58:32 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=t56Gdt2Y; spf=pass (imf20.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674464312; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=gIYcLkIhHoIqMTHU7z0z+ani6y5ft7j45PE+7GKmbjU=; b=CqDiFRCZaT13w1FFOl6tdrHN0IIlsRD9zPFO4cSNPDWG+SSG05wf/ZhJ1PA+Q9/39y2Fp5 jMpxV2a1NxNjCKOWgaj/pu5bZjzEz81UhtbPuYRLMI2BjblcJSUZzntWt/D6UfOV4a3cu0 GELO+n2TKQ2X6dklxMwDjAmYdWAsmbE= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=t56Gdt2Y; spf=pass (imf20.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1674464312; a=rsa-sha256; cv=none; b=WmZ1U+QGhgl1nQX9tthImiXgnWTU5cuQzvvuT6m/p7+nly8coGF00gOsxw5OrWtivTlV8a rrGr5rKSNY9MDZe9/aj6nT0EIW4pNAGG6jR26s0ht94g0T/ytHASEDa9YKwit377FOMe0J oNuEgFao9fcGLCFwz4whe9/Tm0emWNc= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id E6A9B1F388; Mon, 23 Jan 2023 08:58:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1674464310; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gIYcLkIhHoIqMTHU7z0z+ani6y5ft7j45PE+7GKmbjU=; b=t56Gdt2YqfMDFP9ycCDdRfCDH0nRp9TEdZr+wahpxuHv9wvnt5U5uEP+aR5NfLD1ItMmGG NzRhTiJay4EawlaFHdnsWXwmjmjOeMDvptjwjENxtboarwYhULWQt3CQhuGojFUH5kBNw5 a9vFx/aDZNwt6NfUbkONweihqx8IENs= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id B97731357F; Mon, 23 Jan 2023 08:58:30 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id qRweLDZMzmMNZQAAMHmgww (envelope-from ); Mon, 23 Jan 2023 08:58:30 +0000 Date: Mon, 23 Jan 2023 09:58:30 +0100 From: Michal Hocko To: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Vlastimil Babka , Andrew Morton , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Roman Gushchin , Ingo Molnar , Johannes Weiner , Shakeel Butt , Muchun Song , Matthew Wilcox , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Dennis Zhou , Tejun Heo Subject: Re: [PATCH mm-unstable] lib/Kconfig.debug: do not enable DEBUG_PREEMPT by default Message-ID: References: <20230121033942.350387-1-42.hyeyoo@gmail.com> <86e68d3b-b029-5e82-5bbc-e0ccc2ae1d36@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 9BFA71C001C X-Stat-Signature: 6eu91tyb3rkdc131k6as98wt97xyfxo7 X-Rspam-User: X-HE-Tag: 1674464312-825495 X-HE-Meta: U2FsdGVkX1/wG8y3SkP8db5V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AmjaM8zFWZfIsFovvDzhnsmf8QPdLllxcL7RgvETxA/POqBK3nKc8jj/zNbz5BMewJmMxoYl9uO15KB+1nLTDPtkPOjvVuhGAnV0aLyL2soXmwmDnpy/UEK41zXPrvetIVW7NUnCxJZ8qf9pCuX+zGZzyvyOupVjqH5Q/4QEQEnwJFK/6ydwqDiLXon X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat 21-01-23 20:54:15, Hyeonggon Yoo wrote: > On Sat, Jan 21, 2023 at 12:29:44PM +0100, Vlastimil Babka wrote: > > On 1/21/23 04:39, 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%* 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. -- Michal Hocko SUSE Labs