Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp116885rdb; Wed, 14 Feb 2024 14:54:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXBb+mJpoUQ7rAbS93pcSr85GyvB6+yBp5aiBmkJTVxrT4CReL4eaHdoMwDidtJV1AH9wH7YXpFHn4JoViO8YedPnuN4Xae7cp56LMxOQ== X-Google-Smtp-Source: AGHT+IHeU2AlmIGXcxOUVmQRNasRwysYpTC/JQThi4Z9LdS1ypbjQsqUODBdrTkO5uiDv2fXKgwK X-Received: by 2002:a05:6870:b9ca:b0:219:fcc3:8117 with SMTP id iv10-20020a056870b9ca00b00219fcc38117mr462729oab.23.1707951269329; Wed, 14 Feb 2024 14:54:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707951269; cv=pass; d=google.com; s=arc-20160816; b=olqrjuMDqt3aRBtoFQL0uI6fB0d+4Rzhuqo9hJk9i9hk9aGRAxEfL9dGoeHF9lyM5e rcO6Hj/53+Rox22oCvZYVdn2s3XM0+WtOqndCL0lgJOHUPZ2DO0ApENWqVPre8QjFNRH CIg2Kt6ePRunmQcxQKsI/tOP8ZFCVaMw7kVVnPFQo9rOlWK1sTSMJq0q7X/aL4M6+8ch yHQaVgOfihYfYeWVu5tTry528q5bjroqg8OkhzaDiszDUESx2CygpRlAQXdj2pbd8TUe D7jwdlotGMIhcPPSWPG/UlSFP3//l8eC8qCcHWOROggKBiSYn8GFCW06VxF4iHqMbTQb EVYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=GfoL0pJUNb0n2G++vABkwrKvc/KGYO3bCv1OqN/SiQo=; fh=HYlA/sOwRAdJ6lpfJerIHLIfNwVWT5Q2+32R+JUXoOE=; b=NGuceOZ5y0FwJ8vimapmUefB44Zm93uOmrrpguwqwMNzIw5Ah9jGw8qtjk4SMqeVnn bUPt5jC0iWFN2gCOYa1N832lN8EvQ39TQlraateyMkJlq1xH/kaSzFE3cZlNzxk0ySJc on3K8uQ32Z6jxP1DbAiVKVslCd6vnEQSK4tdnUf08vowiry28qVH5a1rL0O4nzwMxQMV 5zim/GLMogDfAmtUUqMcve3qUbJM5T7G6SVM+nC+UA/gHfg4/r1eUJpaHMmTT2/7esjv Lj+Md63g7cr3hloaOiz2ah9bl6nwBF5KTDO/Xq2yYFbM2Iju7U4CI/AMwrGGZFj4P0Ui Rjgg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ctp8OSO5; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-66082-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66082-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCXF39UbgOLOMbRByjF+jwc06HvLMI80a//a6s9yoZhL/PvX9lYIJHMTyhz8UwAu4+ymkMI9Gr424Q9kK2ZQKpym/QdaO/7Yro6lSe/KUw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id t191-20020a6381c8000000b005dc918631dfsi1796573pgd.122.2024.02.14.14.54.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 14:54:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66082-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ctp8OSO5; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-66082-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66082-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D6A27283E55 for ; Wed, 14 Feb 2024 22:54:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D92325750; Wed, 14 Feb 2024 22:54:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Ctp8OSO5" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E6ED12E72 for ; Wed, 14 Feb 2024 22:54:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707951263; cv=none; b=CRKigDsgFlpl+D43hxRG1fDKeitT18I0f22D74rRoGJzvi5gQF2jE+jY//GGiXVEhZs9th17EHN3/i61k9Xz9dDAXsVArGlbSLJLogcsXavfHyEq8FKXp7jjg9sTEGIOlBkoURRRoAadI05wyhJfJBBx47zdL+OJGgAdBKHA+28= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707951263; c=relaxed/simple; bh=IWhUg7d/C6jHVyCqMtt1pfAI113aqF/StezZi96q7+w=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=fTxY/JLN6q3Kdxy4x6Gy3x+ku/MToCGYMzEb7DOLN1aYWRzgATz+pjlzlFTt/9LpX03SZ3oB4V14Heku2kKzmRDxfE2VHUDmSt15jvR1geH9RVE/hMhAQUiXhian86wIquVHM8/79P9W4JcvlcxxK9fKSXw5xJwXP3RnSkSbkkA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Ctp8OSO5; arc=none smtp.client-ip=192.198.163.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707951262; x=1739487262; h=message-id:subject:from:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=IWhUg7d/C6jHVyCqMtt1pfAI113aqF/StezZi96q7+w=; b=Ctp8OSO5mwZHN83bIpfw5QUJpavtbsV/dDqAhiArqw2a1lmt1gTuJdTY GsqgpQ7K4U7EGOyNLMXvT62t7ot++zoKnJq81/Ys2215ADNRRGm2uWLr/ 3aww0pIxG1iss7C75qN8proGGsSD66QS9+ugAnCZfmBobcI+n4I3afGbL CYpzZsPNzdp10j75f0lk8SE+ESbJAMAZJDnL8bbqirKwQyemc6GcGSUeX tdooVT6bP985U0mh4o1k07Q/btA9F7XblMCxRLbzRXF3soMIY0RxTMeFO zaeicA6ECYrFJW7yXgWD0It8FJF8f/SceZU+MY1xXNLIv0n2gnkwURlRU g==; X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="1895529" X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="1895529" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 14:54:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,160,1705392000"; d="scan'208";a="7966142" Received: from wfaimone-mobl.amr.corp.intel.com (HELO [10.209.29.231]) ([10.209.29.231]) by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 14:54:20 -0800 Message-ID: Subject: Re: [PATCH v3] mm: swap: async free swap slot cache entries From: Tim Chen To: Chris Li Cc: Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Wei Xu , Yu Zhao , Greg Thelen , Chun-Tse Shao , Yosry Ahmed , Michal Hocko , Mel Gorman , Huang Ying , Nhat Pham , Kairui Song , Barry Song Date: Wed, 14 Feb 2024 14:54:19 -0800 In-Reply-To: References: <20240213-async-free-v3-1-b89c3cc48384@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Wed, 2024-02-14 at 10:56 -0800, Chris Li wrote: > On Tue, Feb 13, 2024 at 4:08=E2=80=AFPM Tim Chen wrote: > >=20 > >=20 > > >=20 > > > extern bool swap_slot_cache_enabled; > > > +extern uint8_t slot_cache_async_free __read_mostly; > >=20 > > Why wouldn't you enable the async_free always? > > Otherwise the patch looks fine to me. >=20 > Thanks for the feedback. >=20 > Just in case someone doesn't care about this optimization and wants to > opt out this behavior? > Anyway, I am happy to update the patch without the sysfs control file as = well. >=20 At least I couldn't see a downside to enable it always in the latest patch. I think adding an extra sysfs is unnecessary. Tim