Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4132034rdh; Tue, 28 Nov 2023 12:44:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IHPvpGS08QlS/R9y617b069mfmpcdIqwqqisA989buEI3HipJId7fuypzbMXAu2qhdl6MOV X-Received: by 2002:a05:6a20:7d81:b0:18b:d31d:c460 with SMTP id v1-20020a056a207d8100b0018bd31dc460mr19261821pzj.2.1701204241153; Tue, 28 Nov 2023 12:44:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701204241; cv=none; d=google.com; s=arc-20160816; b=c6tnWHd9mAgQzV1mS5vT0UnfcoSrdvbcr6kqzt+ox1UN7dJ/lZdVUpHBRX6kL2Eqnq iUyyzUbfKtWGHUQuediQm2/MZy8y+0hGLClZJ0ZvOH9lkUuxDS6Wt+UvHoKPxD6ltvjE IFLKjHqWuHwLrBKkAPxTid3QUhLTFlX4kRxkDl1vtIRdG0rvKWOUB/q5ke2eCngrNnLp Xt0/dZztjt7F8AMnka1HnT3yLGGhVSWK3AenoGJ3OytihX0gJ3l41qZyMNCgu6Lt3dh0 nDXSX10wuCfMkYDcHIb2OI7+xLnGxA/J2kj9PNyk8vGUOD6KVHPBZXHEtdkqAPBsrlPy V2yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=zluw2DC70GYX/P7l0aEPrLembQ/h05W1n/NwO/xNCpM=; fh=Y93EpIdNcse5hTVfx1UhKMssGMBalCUyCBFLQzuAhVo=; b=ZTpXeZa8zheazHLMVCmlogs3SNmMD1rInSS0ly+7v92EwiR+NINJvm0kBCZGnVc1X/ YVlkIgQWfZjrXWIYsB33f+1N4jZVPKZHwY54KUQC+yPSWl57IubWG0UsvHSgRYujSqaK iMW3mzLDFMfQDqDFnS6cCMlr1YjAAqMAJwsQOXP+ni5D8s5FNOxEhji83ld3lepM5+9X VQyys/8/QVKsuhfhhRiou4RfmTBG8pIP8y5Ae5ROCcxWkbthut/7D4ZJpDVNq4EqVUdR Hpj2GxWICjeDfJNauJ267PyZZHLedOQAL/Ct906yWMuQxLS8hrv2T9lJ8qxwgZ6mZXQV hypA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MXoOpnZe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id o2-20020a17090aac0200b00285a910661esi8083798pjq.10.2023.11.28.12.44.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 12:44:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MXoOpnZe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 5CB3E80AE834; Tue, 28 Nov 2023 12:43:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229586AbjK1Unk (ORCPT + 99 others); Tue, 28 Nov 2023 15:43:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230050AbjK1Und (ORCPT ); Tue, 28 Nov 2023 15:43:33 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0398F19B2 for ; Tue, 28 Nov 2023 12:43:40 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1CA3C433C9 for ; Tue, 28 Nov 2023 20:43:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701204219; bh=dUgTGnBvyni9rwICv+SXPMmCh79rCf51zZBSe5UWymw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=MXoOpnZevWjE8Ej+PcA0NUdIprGWk8COluDTOPxY5vvD/35dH7lL4yQgP+1a0epn3 cLv9EFzXR23yWIphtyB3KqIKX/ZlS/GyDAdwsDAXBcIojxUTX69fnl/eDYAtze4U8A s+LfUz6ZtYh5SZcnr/tX56VCz8KLToMZX72eFdlJUvhhqyB/nErRRnvZWFCYWWFlcQ Ouo3ODf6ueRK2mAVBgAukLt5Q7suXlaFQfqzWY4UrGJcDaNNNjejSulWeOO0RmSXO/ D2HM2zwhMsmXSYiU5bIC2vj8wOepDIGJAK9x3VQy4x9vy0GKZsx/y316mJ+wkKU9HI MDovjx3nfpfmw== Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-5c5ff5a69f0so242200a12.1 for ; Tue, 28 Nov 2023 12:43:39 -0800 (PST) X-Gm-Message-State: AOJu0YyTGBvwseAOqiAfeBNDb342reJmiuQyWdfAuCtNLUiCJcgJBFm/ kyBTO8M8/fAAtj9SDWdUhHH2+NMQX+fvSxZrkEJQdQ== X-Received: by 2002:a17:90b:3946:b0:285:be73:45ae with SMTP id oe6-20020a17090b394600b00285be7345aemr7679655pjb.49.1701204219017; Tue, 28 Nov 2023 12:43:39 -0800 (PST) MIME-Version: 1.0 References: <20231127160058.586446-1-fabio.maria.de.francesco@linux.intel.com> In-Reply-To: From: Chris Li Date: Tue, 28 Nov 2023 12:43:26 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] mm/zswap: Replace kmap_atomic() with kmap_local_page() To: Matthew Wilcox Cc: "Fabio M. De Francesco" , Seth Jennings , Dan Streetman , Vitaly Wool , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ira Weiny , Nhat Pham Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 28 Nov 2023 12:43:58 -0800 (PST) Hi Matthew, On Tue, Nov 28, 2023 at 6:09=E2=80=AFAM Matthew Wilcox wrote: > > > > >From the performance perspective, kmap_local_page() does less so it > > has some performance gain. I am trying to think would it have another > > unwanted side effect of enabling interrupt and page fault while zswap > > decompressing a page. > > The decompression should not generate page fault. The interrupt > > enabling might introduce extra latency, but most of the page fault was > > having interrupt enabled anyway. The time spent in decompression is > > relatively small compared to the whole duration of the page fault. So > > the interrupt enabling during those short windows should be fine. > > "Should" is the famous last word. > > Interrupts are enabled with kmap_atomic() too. The difference is > whether we can be preempted by a higher-priority process. > You are right, thanks for the clarification. Hi Fabio, Acked-by: Chris Li (Google) Chris