Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp1151765lqs; Fri, 14 Jun 2024 18:06:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV0+EOZ3w1PgLKRmsDSZ+TPDAKWK3MMEJROItHjZWQ1EEAxLQMssBTQNT8vzgHxZG20nMxT+D+V/jL/XZ0QC+hQGB+rnPgtU+ax6vzcfA== X-Google-Smtp-Source: AGHT+IEZ2QPX4wq2c25ZOQxDALh0EZlrYvaN0F0vflL9vY56GNKznHTxrmSXjXWF5J2BbpjasF/i X-Received: by 2002:ac2:5f70:0:b0:52c:7f25:dbac with SMTP id 2adb3069b0e04-52ca6e65214mr2103034e87.20.1718413575688; Fri, 14 Jun 2024 18:06:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718413575; cv=pass; d=google.com; s=arc-20160816; b=Gum3pNiB+2vgsPWxjlUyLBPVPzHLCS7OwNiDewoi1XJU9vUhzGatdR48AD8B+PstkK D96HTQLAmC178qYglCJhukwRSatpFF2HWgAbD7rld3gGytDBkfgiZqgs1ryH8JwARFJm DD0z0Rt9qWhhXor2ynk6jxKgecsEYFk5oTiYj1nKQJjowFbTggVHEzMipLFrZ9sFzQi1 F75gy3k8Mh/DBTPusDQC9sK+KIYPHpVpz5Xj/Akdv6cZVTIppLQFSDOq9CRD3rYouioR 1spwaZavrut6W9U1XjTk0mrf3HDC7uuQn6+5hM7tI+K/l29x/WlALXxJJtiWS5Hc4gNg WDjQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=xeC3BY/vXFKnCMR5i3o8brrnuTNXU8e5l8kf2qUgNK8=; fh=cB0ARDoyBDj2uwKFAdgs/cUmfEbyxRcHL/OcIjC3n3A=; b=eNfrKNu4cHvIw3AEDE3bp7lCaC03Ds12GfAVJ6md1vJ26pkOXr3wgPIlzDs3jMfeEP mbNs+X+3D1zzcZuUeyZs8qLT//EdK56ApDJJ4qabcDdkCw/2Q4lkwBXUfuH1qSZAAm+K t2zacyV76rf+TS6RoB4XX4iGwDbY4YrwLwRMHJrLxj7CwH1sPV1h/DMmMryB/5nfkQ31 Vu+TpPI4yCD5vB/k8XEk9uPI/am6oH/Am0hVL2IkBlhXwYOR+fIGbqo7IDrA2Y9fOvw6 yqpd95UmkyKbBmf805wB6vZykQxO9hQpR3mWM0IbfRUmUXG9Xr4IQFB3Fo6M+MEItr9+ NkDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=GDHJsqqX; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-215625-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215625-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f56e269c7si220854066b.719.2024.06.14.18.06.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 18:06:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-215625-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=GDHJsqqX; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-215625-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-215625-linux.lists.archive=gmail.com@vger.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 3AB3F1F21F70 for ; Sat, 15 Jun 2024 01:06:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E12E3C17; Sat, 15 Jun 2024 01:06:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="GDHJsqqX" 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 07A65173 for ; Sat, 15 Jun 2024 01:06:07 +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=1718413568; cv=none; b=AGJOUNwA6xCDo3+LnexVwrzmlUKIGxrnNhu4a10LQX0V8vW8v9u/7bdWdr506GDneI0DfjAfNXcJ4UFRT43AQ6rM5f6ObHzKm9Ss3IG4Z9l/aJgoGTZrUHCH7x+ho1nC+8vXG3BsI5g+CDQgm7K09jxfMzBqWfiPYekbJdHpBEo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718413568; c=relaxed/simple; bh=p6aOtYtkbORj0hMDbmAroxIU3spCCQRUJKAqIfMaykA=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=gtzFgjbQoHrEZmuT3QqOer+a7tMRBTwlg6e+aUEnhNLUsEoCHh1lbNcDmiP0+v+or3VU7Gox0hI7PFvXilqImu/UgkpYv9wkUgaOZIs7/40rMg2/GhDTnjcEFJBeYdHjzWoJbKH3uDCYBAlV79gJ+IsWLkuQrdI7PYTgwr0TELc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=GDHJsqqX; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25E59C2BD10; Sat, 15 Jun 2024 01:06:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1718413567; bh=p6aOtYtkbORj0hMDbmAroxIU3spCCQRUJKAqIfMaykA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GDHJsqqXC0SCtMdHFAy+v86br28YCKasbXSHTK8hMIvTU3opU7Ni1rqIAjj+qKfCC xCatwH+3sGEuQjGF4IpQrUvZGHWgNFEhyHoE/t+mxaJFXXWDhNKpTCRDaTE478pvJ9 dNsflkm5sqt3iPbDuAwjQV3hgZ8T3V1MJiZEPV5k= Date: Fri, 14 Jun 2024 18:06:06 -0700 From: Andrew Morton To: Chris Li Cc: Kairui Song , Ryan Roberts , "Huang, Ying" , Kalesh Singh , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Barry Song Subject: Re: [PATCH v2 0/2] mm: swap: mTHP swap allocator base on swap cluster order Message-Id: <20240614180606.5f3b6f4a6cd515df30b7a0e4@linux-foundation.org> In-Reply-To: <20240614-swap-allocator-v2-0-2a513b4a7f2f@kernel.org> References: <20240614-swap-allocator-v2-0-2a513b4a7f2f@kernel.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 14 Jun 2024 16:48:06 -0700 Chris Li wrote: > This is the short term solutiolns "swap cluster order" listed > in my "Swap Abstraction" discussion slice 8 in the recent > LSF/MM conference. > > When commit 845982eb264bc "mm: swap: allow storage of all mTHP > orders" is introduced, it only allocates the mTHP swap entries > from new empty cluster list. It has a fragmentation issue > reported by Barry. > > https://lore.kernel.org/all/CAGsJ_4zAcJkuW016Cfi6wicRr8N9X+GJJhgMQdSMp+Ah+NSgNQ@mail.gmail.com/ > > The mTHP allocation failure rate raises to almost 100% after a few > hours in Barry's test run. > > The reason is that all the empty cluster has been exhausted while > there are planty of free swap entries to in the cluster that is > not 100% free. > > Remember the swap allocation order in the cluster. > Keep track of the per order non full cluster list for later allocation. > > This greatly improve the sucess rate of the mTHP swap allocation. > I'm having trouble understanding the overall impact of this on users. We fail the mTHP swap allocation and fall back, but things continue to operate OK? > There is some test number in the V1 thread of this series: > https://lore.kernel.org/r/20240524-swap-allocator-v1-0-47861b423b26@kernel.org Well, please let's get the latest numbers into the latest patchset. Along with a higher-level (and quantitative) description of the user impact. I'll add this into mm-unstable now for some exposure, but at this point I'm not able to determine whether it should go in as a hotfix for 6.10-rcX.