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 65A18C433F5 for ; Mon, 14 Feb 2022 16:23:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A48FC6B0075; Mon, 14 Feb 2022 11:23:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9CEAF6B007B; Mon, 14 Feb 2022 11:23:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 86F296B007D; Mon, 14 Feb 2022 11:23:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0130.hostedemail.com [216.40.44.130]) by kanga.kvack.org (Postfix) with ESMTP id 6F5B26B0075 for ; Mon, 14 Feb 2022 11:23:35 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 2184B9F5D6 for ; Mon, 14 Feb 2022 16:23:35 +0000 (UTC) X-FDA: 79141905990.23.992D6C2 Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) by imf25.hostedemail.com (Postfix) with ESMTP id B0B8CA0008 for ; Mon, 14 Feb 2022 16:23:34 +0000 (UTC) Received: by mail-qt1-f171.google.com with SMTP id x5so15839680qtw.10 for ; Mon, 14 Feb 2022 08:23:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=x0S57OtD5YWbc+A1GxyslYvaWYv57bktzT6DJRKKi4o=; b=2KF50jQJOk201/VzTxLzvo9tjknPWNwu2jq/ZfgmRAUVpqtndEci1YGElVvMe9FLtS GEfQPmOnDIboOy2xW5TOVpQM9OThMYIKu5l0KeXWoW30aMdjupqwujmJ/pRkgFCbrWBn XGeLik/uEYbK2QO5lhy251iXcjVaIbny5gymo5CB+wGit2CHhHKfqyIToIviWlzyTrsA cilVLQw40SsmdtHZq73lUfhv3Skge2BiknSX0i4YI+KGEoZpL78HoSL1R3ahdQrq/c4D JtVmvLR3+a2yrPHIUSb0QlGWoNa9y33b+j8jakbnOySnimEPhzB0aqbdWYdq9UM1buCZ BJ2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=x0S57OtD5YWbc+A1GxyslYvaWYv57bktzT6DJRKKi4o=; b=jyEKSqAjHCRkfGfHjTf8TlHg2x62SKKC5LwDqDzloi90oK9seYzawni7VJhjUsvo28 zpF7tFeCZ1W5r7r2xTmAP53ZCpBhLLJL10bvHcbOtDguIQ6gvVTkTGN3J7f/KewQ+Djp jdFZ9rGP+8XxYNUGU9EnA4npV97qSUS+JDtHe9gxgX+F7aOytbNRl1kitc8WFwMGt9mp F2/zJNQdidwBaE7ndr3l8BACKXyTXADt4mcDCyjZdIrIoIEcYMC+joDGOzzWrUOZQPVu afbrK/9s/vIrlBgakew9+iEDUawZDDD3fa9raupLDc46cHd8On8mUV5vw89Fh6xJ7632 o0Jg== X-Gm-Message-State: AOAM530YwOGH5TpWrYGM9H3NDsm4QEVfJfWBIYgEQGABec6S/cUPb9Tj R2QhCV6+0v1ahyzTm/kBr+wdEQ== X-Google-Smtp-Source: ABdhPJxBJ/o/Xs1chmzwENOly7CtoT9aAOKUkKm2rW8grOwiwuDhzaMGP7xBHjue8HfewsMyVku9hQ== X-Received: by 2002:a05:622a:1714:: with SMTP id h20mr462793qtk.198.1644855814104; Mon, 14 Feb 2022 08:23:34 -0800 (PST) Received: from localhost (cpe-98-15-154-102.hvc.res.rr.com. [98.15.154.102]) by smtp.gmail.com with ESMTPSA id l11sm16589303qkp.86.2022.02.14.08.23.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 08:23:33 -0800 (PST) Date: Mon, 14 Feb 2022 11:23:33 -0500 From: Johannes Weiner To: Sebastian Andrzej Siewior Cc: cgroups@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Michal Hocko , Michal =?iso-8859-1?Q?Koutn=FD?= , Peter Zijlstra , Thomas Gleixner , Vladimir Davydov , Waiman Long , Michal Hocko Subject: Re: [PATCH v2 1/4] mm/memcg: Revert ("mm/memcg: optimize user context object stock access") Message-ID: References: <20220211223537.2175879-1-bigeasy@linutronix.de> <20220211223537.2175879-2-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220211223537.2175879-2-bigeasy@linutronix.de> Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=2KF50jQJ; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf25.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.160.171 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: B0B8CA0008 X-Stat-Signature: e8513x68kj8pis3tbi6m3du7a9hc6aok X-HE-Tag: 1644855814-928717 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Feb 11, 2022 at 11:35:34PM +0100, Sebastian Andrzej Siewior wrote: > From: Michal Hocko > > The optimisation is based on a micro benchmark where local_irq_save() is > more expensive than a preempt_disable(). There is no evidence that it is > visible in a real-world workload and there are CPUs where the opposite is > true (local_irq_save() is cheaper than preempt_disable()). > > Based on micro benchmarks, the optimisation makes sense on PREEMPT_NONE > where preempt_disable() is optimized away. There is no improvement with > PREEMPT_DYNAMIC since the preemption counter is always available. > > The optimization makes also the PREEMPT_RT integration more complicated > since most of the assumption are not true on PREEMPT_RT. > > Revert the optimisation since it complicates the PREEMPT_RT integration > and the improvement is hardly visible. > > [ bigeasy: Patch body around Michal's diff ] > > Link: https://lore.kernel.org/all/YgOGkXXCrD%2F1k+p4@dhcp22.suse.cz > Link: https://lkml.kernel.org/r/YdX+INO9gQje6d0S@linutronix.de > Signed-off-by: Michal Hocko > Signed-off-by: Sebastian Andrzej Siewior Acked-by: Johannes Weiner From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Weiner Subject: Re: [PATCH v2 1/4] mm/memcg: Revert ("mm/memcg: optimize user context object stock access") Date: Mon, 14 Feb 2022 11:23:33 -0500 Message-ID: References: <20220211223537.2175879-1-bigeasy@linutronix.de> <20220211223537.2175879-2-bigeasy@linutronix.de> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=x0S57OtD5YWbc+A1GxyslYvaWYv57bktzT6DJRKKi4o=; b=2KF50jQJOk201/VzTxLzvo9tjknPWNwu2jq/ZfgmRAUVpqtndEci1YGElVvMe9FLtS GEfQPmOnDIboOy2xW5TOVpQM9OThMYIKu5l0KeXWoW30aMdjupqwujmJ/pRkgFCbrWBn XGeLik/uEYbK2QO5lhy251iXcjVaIbny5gymo5CB+wGit2CHhHKfqyIToIviWlzyTrsA cilVLQw40SsmdtHZq73lUfhv3Skge2BiknSX0i4YI+KGEoZpL78HoSL1R3ahdQrq/c4D JtVmvLR3+a2yrPHIUSb0QlGWoNa9y33b+j8jakbnOySnimEPhzB0aqbdWYdq9UM1buCZ BJ2w== Content-Disposition: inline In-Reply-To: <20220211223537.2175879-2-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Sebastian Andrzej Siewior Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Andrew Morton , Michal Hocko , Michal =?iso-8859-1?Q?Koutn=FD?= , Peter Zijlstra , Thomas Gleixner , Vladimir Davydov , Waiman Long , Michal Hocko On Fri, Feb 11, 2022 at 11:35:34PM +0100, Sebastian Andrzej Siewior wrote: > From: Michal Hocko > > The optimisation is based on a micro benchmark where local_irq_save() is > more expensive than a preempt_disable(). There is no evidence that it is > visible in a real-world workload and there are CPUs where the opposite is > true (local_irq_save() is cheaper than preempt_disable()). > > Based on micro benchmarks, the optimisation makes sense on PREEMPT_NONE > where preempt_disable() is optimized away. There is no improvement with > PREEMPT_DYNAMIC since the preemption counter is always available. > > The optimization makes also the PREEMPT_RT integration more complicated > since most of the assumption are not true on PREEMPT_RT. > > Revert the optimisation since it complicates the PREEMPT_RT integration > and the improvement is hardly visible. > > [ bigeasy: Patch body around Michal's diff ] > > Link: https://lore.kernel.org/all/YgOGkXXCrD%2F1k+p4-2MMpYkNvuYDjFM9bn6wA6Q@public.gmane.org > Link: https://lkml.kernel.org/r/YdX+INO9gQje6d0S-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org > Signed-off-by: Michal Hocko > Signed-off-by: Sebastian Andrzej Siewior Acked-by: Johannes Weiner