Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2894585rdg; Mon, 16 Oct 2023 20:00:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHLaDVD8tQUrO2p6FfwcLT5yIQmFVTUXpy3wkZlvMAayvt0ez0xloPyb2TujMpbrBX1Dma0 X-Received: by 2002:a05:6359:5e02:b0:142:dfc2:a441 with SMTP id pw2-20020a0563595e0200b00142dfc2a441mr1199724rwb.8.1697511655207; Mon, 16 Oct 2023 20:00:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697511655; cv=none; d=google.com; s=arc-20160816; b=Z2iF/sNn76lbGcaNv21AYnpaIxW+pPqboqRLR9FbmchdH96KWd49Yl8BalWlwEOJN8 PA/DhU+Tce0FECO+Z8Q9LmHp1eYbLLkuQENMXEbpSmEi5oRwfjnniOWxrIBDWpysUKh2 8KePwDBIns2WV93BGVf1A3msowKeL97DuVXMo7tTXgfuWwHPi+Iw7kf1vO1invjSv5OJ 3ngxweYKQPPIhnorXgxZUHk7JA/YD1t/+krrt2C5l4Js6KVwyCj7FuDDAmozLYYdFmpN Pgw3Py+rllb8+hRQ3DV2P08a35gR9pwznn57BniztmbhY3hRC4sQNjtBQgYBIMI0NIH8 ADjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fg5u4Ni/fJPhlXtP8RuU5gJThlc0Dsqdf5DWdaCP7Uo=; fh=zoy0YDCDJofQiy+vSiAH9IIGBoA3rzqmkqrd5n0ZZhI=; b=THP81r8Evvnzc4E3cbYLmbzujXFpz2yrTcASXWRbtbWfyJgwcX2JYoHccx8/TO+DrP n6uGVWqNkN81PeOlWIuCZxvxAHWrKh4yp11num1w3XVC3Dytf/SufsNmgcSlDT58bXQx cNj3P2e+S7v3be97osnczzGAnXcDX3usIttczzYHW9mGFJOQXNULb0nLAsPhVLUCXRm/ uBTLxD7eGQ8iYeTt8YVQnHxMTjgWNVvbfLDWhYjfOjECixW2MSMT4mp6SVkSzLIxJl3l t69MXqncLtlgywaJpOq3e2Yl1UCXxQKHFIKRGwNc6JIFMASDEVaqmlevI9ya6Igwegvx gnFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=OTc3hkTS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id c30-20020a056a00009e00b006b5273b8d14si635426pfj.72.2023.10.16.20.00.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 20:00:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=OTc3hkTS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id C829180A1E3B; Mon, 16 Oct 2023 20:00:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234363AbjJQDAr (ORCPT + 99 others); Mon, 16 Oct 2023 23:00:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229666AbjJQDAo (ORCPT ); Mon, 16 Oct 2023 23:00:44 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4331A8F for ; Mon, 16 Oct 2023 20:00:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fg5u4Ni/fJPhlXtP8RuU5gJThlc0Dsqdf5DWdaCP7Uo=; b=OTc3hkTSBgADddbhne7CT/aF2H 8b5+MvzRTNqsZElplGNgkesxKdue7rxgYjjIefnxhIfIH6lL4HffbkEhZxmHzLqRLolVEacFdq7Wq KvbXwCcg4dE4oUBuiQvnGtTAlxmIAIs5vQLfbvUbIPs/SiPMGxc8FBeXSskvl79mYTxci8VqkI+Dn BgMCZgH3dwGIU9PPgq6oYg/oinrEH/ACLIA6IFsfXq5jlklHR9bTv9JZfli4Ff4UKdhYC7M0JD8n/ 4jwQzqcGEDD7HO0+E/QpTxc4hOSzWXnUpDYkchuIn7GB56s6bLjac4yzgMMeDi6+GrnPJ2vvKo/dN mi0e9MHg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qsaJb-009qU7-3o; Tue, 17 Oct 2023 03:00:15 +0000 Date: Tue, 17 Oct 2023 04:00:15 +0100 From: Matthew Wilcox To: Kairui Song Cc: linux-mm@kvack.org, Andrew Morton , "Huang, Ying" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/swap: avoid a xa load for swapout path Message-ID: References: <20231017011728.37508-1-ryncsn@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231017011728.37508-1-ryncsn@gmail.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 16 Oct 2023 20:00:52 -0700 (PDT) On Tue, Oct 17, 2023 at 09:17:28AM +0800, Kairui Song wrote: > From: Kairui Song > > A variable is never used for swapout path (shadowp is NULL) and compiler > is unable to optimize out the unneeded load since it's a function call. > > Signed-off-by: Kairui Song Reviewed-by: Matthew Wilcox (Oracle) Possibly worth adding a reference to 3852f6768ede ("mm/swapcache: support to handle the shadow entries") Not sure it's worth a Fixes:, but that's where it was introduced.