Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp168874rdb; Wed, 14 Feb 2024 17:04:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXrbDscCsin/82JEwQTFUYl2EhAfT4sNGMiwVZMCuSKTt2Xv2OlgDixLO4lRM4sh7qOkJqdRApaBsPmJGFYonlYL7waceDeNgI3hC64Lg== X-Google-Smtp-Source: AGHT+IGL3SqcHHpNBNsR/cXKq7bTmxS9kcRLVFLKTM4J6VZykRri85AzpqQNOb/uf8B4ROmq+5US X-Received: by 2002:a05:6102:21d3:b0:46e:ca42:28e7 with SMTP id r19-20020a05610221d300b0046eca4228e7mr551819vsg.23.1707959053378; Wed, 14 Feb 2024 17:04:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707959053; cv=pass; d=google.com; s=arc-20160816; b=mkVXYICE+I/gL3Pq/42UTYi4o3hnUkTIG3QxaM8v2zMFz/P8dIMn1spqNXj/bjELaE 4MK4sgIpZv87ucc91FexWCQ6N+3TzRQqU+ka6g2mgPYXj51B9nTD6PbofGADSO2uxwdi 4Wgf5OIUU9LU0rn6HEKWph6loyYK2gu5+7RZXng2S2T2hsDC+xLAQS9ndTqvQFzaxgux HPQJbnQcQX2xXFA9Qe4JO1HMhmFrV2I0wiHCgG9aoL5n3qjGc88KLqqM0I9GALpAZC2w LYiT9qV5JGAhvU+wQ/69iBV4pR5ddfrq4j6qMrrj0s3LdLzrdSUQw5s65ha0K3FGLvRV AWAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=rbE3QPNgWMIaJ1L2TSQ22a+WzhFErTHWiJS3uEgyVrk=; fh=lpLyaaaGzMUYm8ht+bBmJdiKO1DUZyCSl7pvkaJC0Os=; b=SnzocWcEhPq9kLPMJCRh4gzFYxLNeQLP4SX6oNEvMjXVPtLKdHX6A+q5gt0QcJwOvq wzMzCbIZdY+dMJRMC23+c1fmHY4F3++zVnGT9Cb9ohSyFZvYd6qzXbWxbgvtw7mvlRtV 0pFY+3qk8TNb8KQihIowYNKnCbErgQ7/EFLHIuMRpvBwj8oOdQbWj0Qy8yRFVo2c+l2v 6tw4ybHy7Oja3Eou5YTNs8qnHRhciqineceYatdeUzlQNHprTTXLdlW39rf0J1iBt7mA 1Qhdq0f6KQPUc2Cph8JA1Ycrvb2gRKy3WWzyocHegSAxh4y2h/wAPv+9gpUOAWzUyL65 FICQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IsGLiLbz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-66213-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66213-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ie6-20020a0561022c0600b0046d2fb23373si29463vsb.520.2024.02.14.17.04.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 17:04:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66213-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IsGLiLbz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-66213-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66213-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 231C71C265B3 for ; Thu, 15 Feb 2024 01:04:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48CB21392; Thu, 15 Feb 2024 01:04:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IsGLiLbz" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7701EEC7 for ; Thu, 15 Feb 2024 01:04:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707959042; cv=none; b=kU4awFzrtEyfOCGIFLArfcidYDtn8MCi+TNn6IvGKhH0sQHqbMMFnyD48HumL+rApc3PhkWIFj93inttX648QFvpJTFqWgS5g+OOfEqQzdbjklO43+Reg6ZdbQMeV+aLXB2+2O0I75Io74/T6Bx8RG7ZmR+ld0gxTdL45+cp5vw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707959042; c=relaxed/simple; bh=AFIEZrspV5zSanxweZKG4w8pZtq/hNqIYlVJ0DALHqc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=F2XKYNDmd4gCNjv/SkGis/+QEck8ZxYJHtqi7i6wfMltdzuI5aRzmJyVpLZInC31RmqpYcPaJmMxG/zoc2PsEaCTbf0+sQH6fnslvR/3jQwrDca8jk/cajKkFyRoPGy8QIdx1m0667PDPvs2fTQp8TycHkM+QMluSLMUyAfhr2I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IsGLiLbz; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DEE8BC43330 for ; Thu, 15 Feb 2024 01:04:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707959041; bh=AFIEZrspV5zSanxweZKG4w8pZtq/hNqIYlVJ0DALHqc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IsGLiLbzJ+zhnBeG5NmJHr/PpUHwifpxlBZycv2a2cRHUOoo0rkQ2UTcCXORRKVdP fCrY2Bvhcr53qqSM54Oz4V/WhZEbefWmXxhSm7oct3ILAGi2KAQ9M+7mEfGdSchUO4 Qe7s0595qgzhIbrmJkndjGHWoNkQBbE/A6vJUTOFfnHQxND7DxPymHLgSd5Cfqvpui hBDrJ5gxLyVUom1NxmnqQkib6E1b8tArHQbRi1x8udxFA5R8d0B8pbEasP+2SqZ9Rt SyafFj5vTCF8u+OuJBBvLO1WfCEgnUTNIOasrfhw1Vg3aWciikHEF/+SPSdJx3JD3o 8hagbhvi9PrYA== Received: by mail-il1-f169.google.com with SMTP id e9e14a558f8ab-363cd34bf13so1198785ab.0 for ; Wed, 14 Feb 2024 17:04:01 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCV0XoMPCL1RCPxSw87Qv1sRGjC2GXCproJHtX2nW48uA4jXDW1M7l4wGJnUngDl5Niz9tL9CXci0M7gXqp+g8rUWL+yscMY3McFZ54v X-Gm-Message-State: AOJu0YyPWbH3T1SC0CovGkXmOZtThZhFtHAycy2iLM614wnDmQuSVAXC x3D5cd2VFnJJkWOmX6zSk0JpFXlKq6kcsp89amwa6t3f1lQP2Zzf09xiHNfTXyotvpPNuk6TFHm 8MuNsPYPUK3o+6GtZDkwUkEL4GhpqD5boiGLD X-Received: by 2002:a05:6e02:5aa:b0:364:26a6:cca6 with SMTP id k10-20020a056e0205aa00b0036426a6cca6mr211380ils.5.1707959041056; Wed, 14 Feb 2024 17:04:01 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240213-async-free-v3-1-b89c3cc48384@kernel.org> In-Reply-To: From: Chris Li Date: Wed, 14 Feb 2024 17:03:48 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3] mm: swap: async free swap slot cache entries To: Tim Chen 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Feb 14, 2024 at 2:54=E2=80=AFPM Tim Chen wrote: > > 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: > > > > > > > > > > > > > > extern bool swap_slot_cache_enabled; > > > > +extern uint8_t slot_cache_async_free __read_mostly; > > > > > > Why wouldn't you enable the async_free always? > > > Otherwise the patch looks fine to me. > > > > Thanks for the feedback. > > > > 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 a= s well. > > > > At least I couldn't see a downside to enable it always in the latest > patch. I think adding an extra sysfs is unnecessary. Thanks, I just sent out V4 to remove the sysfs control file. Chris