Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp975907lqb; Wed, 17 Apr 2024 17:20:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXniVZHUcienUqhHIoOWe47s3NoletlKZcoW17oB9yk+Fou5l6vx7b+yfba4k31bUWMnWmL9DEmnCIrgjzQIuabI6W+x0uJ3Nbu93yz7g== X-Google-Smtp-Source: AGHT+IGvwaanFQ74yS79dDzthSwdzXib3f2VDntxH8eCb8k4uagJIMJu56y0diMFGHlYBhGqmHtg X-Received: by 2002:a05:6808:1390:b0:3c6:f93d:7107 with SMTP id c16-20020a056808139000b003c6f93d7107mr1647053oiw.10.1713399627795; Wed, 17 Apr 2024 17:20:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713399627; cv=pass; d=google.com; s=arc-20160816; b=rJRZ5N4bOnACYSuzNHVIvmpn8JqWEyXnOk7wXr9k8drXSufnyHhrWjJd8jp1corxSf 3E8yFi+eS4w5hlRMet0shTcPAXfswCV9C/Nm0EfrX3zkp1hgPVVjKO1U37MQlIMdUGXh TFNkb5VtNIBHUsD08wW6rNHXJl+8ANYE1psoXrVrv6///MN5VjpAPBYb33Drsh58hRVz h0VPx2rVgfBZP1/k0PphZ6tIZlZR7YlVY0m3Rz3owZVunVId5DIEZAJjg62p0W95sdeS zwBxRC4ErjysgXi2qIWNpKeKGOpTFQpm/EleusGHPF/JqYYyX6nhIDT3nK3spmuJTSTt q9iA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=kTBhNhV0Pso0hG+RPWPJvZ+cVfxL/lF3iU9LZZw5ug4=; fh=fidF/EA2p1D7HkAKRbQyKWucbMSpRxvfdKc81Fi78dU=; b=1CI2C0y2kfXNO0LEMeWm8sNfZdimowU62a4wnfIL5BWAg4chTKh4+DXCcizM8QxZe9 +hNOFirTw1+rHNUOTT9ndKQehrE5kgeURs/51qnNZi1v6ElTqPJ1W+VzHmUbYC2o+/Oa YWdFhVrLKKcFr2mksewKQFNHSs4/TIPbYRluwrXDZsov6Jc7Gh/Qa1kj9d+Rr2AU25mK 8deMOcdNkljGQuWRuKfv3UuSy5zue2nAHMExlpJVgZQOWr5amLeFjFq7PDlq3sTtZO+U +Zink2UeRXX68ssErDDPc+bxgPP2lM+iPIZ1TkXKy3lnPhIIpfmRG+zqmUGtNuGwgO4z xiFA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-149350-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149350-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id a26-20020a63705a000000b005cee178fe54si314714pgn.222.2024.04.17.17.20.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 17:20:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149350-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=sk.com); spf=pass (google.com: domain of linux-kernel+bounces-149350-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149350-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 61F04282731 for ; Thu, 18 Apr 2024 00:20:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F3D907E8; Thu, 18 Apr 2024 00:20:21 +0000 (UTC) Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A16815C3 for ; Thu, 18 Apr 2024 00:20:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=166.125.252.92 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713399621; cv=none; b=cDZRE+HLci3vFIXMrWoGrkKVO1YwhUTt5A7CdKlMxY5otX+piyz62KJjeZpQUYdqHAZDwFdd1Jw13HrNh5M5za+MO6ukkX+J6hMxDlyPC53FDwqfwK5YpSRXD5uuzZ1G+1qP3CaEG7DNF+zy7SHqHiStCTP6dGKb49I+KoGM50c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713399621; c=relaxed/simple; bh=NFzlsbK07pt2WYy9cHPGToQsa2pus3HKKGJ2e71BD9E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XJ02jvFdWfZnWATUB0qxpq+4kESNQp/OQKipf9OVjr3ztDM1EQ6u7778h5hUsPnqco2xzo+QfbAaMen5+FT/QeWlXDgN24xA84LQNvnDfr67Coes6oqLSlgvcvE15/m+GU1M2KWTSebNnZNGaZH0Eo52ranXszdnMDIGp04RjnQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com; spf=pass smtp.mailfrom=sk.com; arc=none smtp.client-ip=166.125.252.92 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sk.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sk.com X-AuditID: a67dfc5b-d6dff70000001748-5a-6620673d3442 Date: Thu, 18 Apr 2024 09:20:08 +0900 From: Byungchul Park To: Matthew Wilcox Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, kernel_team@skhynix.com, akpm@linux-foundation.org, ying.huang@intel.com, vernhao@tencent.com, mgorman@techsingularity.net, hughd@google.com, david@redhat.com, peterz@infradead.org, luto@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, rjgolo@gmail.com Subject: Re: [PATCH v9 7/8] mm: add folio_put_mgen() to deliver migrc's generation number to pcp or buddy Message-ID: <20240418002008.GA3592@system.software.com> References: <20240417071847.29584-1-byungchul@sk.com> <20240417071847.29584-8-byungchul@sk.com> 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-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRmVeSWpSXmKPExsXC9ZZnka5tukKawdtPKhZz1q9hs/i84R+b xYsN7YwWX9f/YrZ4+qmPxeLyrjlsFvfW/Ge1OL9rLavFjqX7mCwuHVjAZHG89wCTxfx7n9ks Nm+aymxxfMpURovfP4CKT86azOIg4PG9tY/FY+esu+weCzaVemxeoeWxeM9LJo9NqzrZPDZ9 msTu8e7cOXaPEzN+s3jMOxno8X7fVTaPrb/sPBqnXmPz+LxJLoAvissmJTUnsyy1SN8ugStj /p4vjAVnOSuuzr7J1MC4j72LkZNDQsBE4uPnv6xdjBxg9vkPTiBhFgFViRfnrjKC2GwC6hI3 bvxkBikREdCQeLPFCCTMLPCKSeLGCUMQW1ggW6L//BkmEJtXwFxi4ZJjzCC2kEA3o8TWqZEQ cUGJkzOfsED0aknc+PeSCWQks4C0xPJ/HCBhTqADbvdfANsqKqAscWDbcaASLqDDVrFLPNz3 HupiSYmDK26wTGAUmIVk7CwkY2chjF3AyL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Ns5+grKb/ZLnCiJDrS5/QRIfvES79m3qubYi/ff3nxHufK6SqqJa4Lyp8U7NnKviZm 2QWGW75TReMaXs2bMO8q/7zKV0kO8qdTuLlPdn9tU+N+2FZvFV+U9Dz3Q64SS3FGoqEWc1Fx IgAGAOccpAIAAA== X-CFilter-Loop: Reflected On Wed, Apr 17, 2024 at 04:55:55PM +0100, Matthew Wilcox wrote: > On Wed, Apr 17, 2024 at 04:18:46PM +0900, Byungchul Park wrote: > > Introduced a new API, folio_put_mgen(), to deliver migrc's generation > > number to pcp or buddy that will be used by migrc mechanism to track > > need of tlb flush for each page residing in pcp or buddy. > > > > migrc makes decision whether tlb flush is needed or not, based on a > > generation number stored in the interesting page and the global > > generation number, for that tlb flush required has been completed. > > > > For now, the delivery works only for the following call path but not for > > e.g. free_the_page(), __free_pages_ok() and free_unref_page_list() that > > are not for releasing source folios during migration: > > > > folio_put_mgen() > > __folio_put_mgen() > > __folio_put_small() > > free_unref_page() > > free_unref_page_commit() > > free_one_page() > > __free_one_page() > > You're going to want to rebase this on mm-unstable. __folio_put_small() > went away in "mm: combine __folio_put_small, __folio_put_large and > __folio_put" I checked it. Indeed. Thanks for the information. Byungchul