Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp204027lqg; Wed, 10 Apr 2024 23:08:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXx0af7n7WSpvFb1EwJC5ONDw5RjCVKTYEwp2HpmdrmWOOcoSTh+rDyFrcj1gDchZVBz3X3b3aYQiSJlzVY7aHzAxi/m8gLho2JYs2JEA== X-Google-Smtp-Source: AGHT+IHREC1/nRNOXQ7K+SUncrrAdjRLpN6bzdx8dpFA0nlHD9oqHC/O5XYNp4mLhMRI4ffcAnJ4 X-Received: by 2002:a17:906:d0d8:b0:a51:b0ac:373f with SMTP id bq24-20020a170906d0d800b00a51b0ac373fmr1248654ejb.23.1712815698982; Wed, 10 Apr 2024 23:08:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712815698; cv=pass; d=google.com; s=arc-20160816; b=xrRVH5Xfu6nY75+q4rWcSr6yT6In/4McnxL9iNLcI7KWFJnlU4ss8+zqixXsxxUU/g nnzJ40aEk6o83R9mP+NDfiwjovNMMKVkMPySfktv6KKKfigT5wcVsrlCsrjAv4xDc0a3 vDfWMcexmStZSJLm2SMvBxxv6vVbnAAmTDYooeXKc0WmYTjeJmbHM7Zh+iAeBHm4hscs L+zb2UX1BXH95uaQUhSE8fZmwXwCokIMKLQ2siMchgePPNFG7Yd64DPJXPbJ35OUGH7c OMl7JmaDOVwWX9ShgbjeVtTwvJ3M9qmla80GvUf9zZIXgBIAy7Bw6EUCwqlfce7wC9aV 7VrA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=/iT9IlAymUCb2pC4/RBQKOmj3d7dpo0oLb02XVtYzR4=; fh=A6QcVv0Whme85qQOgjgUrQ9hcebaP32O5U55xRuqFUM=; b=QAIlzyimDTfg49udhKy8ZT81v9d2N9Sv+2TI0UX6gWcM2mJuWUAfoVM3YULQp1DaR3 nVBLM9g3SwpuzbK04jZV3pJG3L7xojAZfgIvyRPpoflZKeL1ELQnKDyBmLQZAg42N2F7 xiHn6C5ixwSrgV/U/gu7ProyLpNpw9P+K8fV8XbweSju6cub3T5Zt2KNsnhWP5cnb05R PTXxYRf5lqlAYsizRIOeuUwd/QpgktCdGmzBA4ndq/8Fi0CZbRs1FPMTcSqiawsrwFgl 6SVbeOTfXBfj/LlmKwygoCXhugvNuMVjR4J0kC/O93adgEwuy7I3+ev+kd4/f9ic2RWP fKFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Qv3f7mk1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-139816-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139816-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d26-20020a50cd5a000000b0056bfa25550asi409245edj.302.2024.04.10.23.08.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 23:08:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139816-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=@gmail.com header.s=20230601 header.b=Qv3f7mk1; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-139816-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139816-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 am.mirrors.kernel.org (Postfix) with ESMTPS id B27E01F23586 for ; Thu, 11 Apr 2024 06:08:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5285413CA8D; Thu, 11 Apr 2024 06:08:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Qv3f7mk1" Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2322C13C3ED for ; Thu, 11 Apr 2024 06:08:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712815690; cv=none; b=gVO4JfOsua8Hh2i3zKhpKrXZL05W1PDOGvl1vzs6yDI/IupkkyPcgWi7MevriMOX3FVKaAITTEzT0bl1OlzgEoemLiCZxlBl5dtsHasPuSmuaGdab0dJwAUp9EVig4DOrgE7JNOfEoj+7T8TdpWWJigCJDBLeh6cJFTP6og3HnQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712815690; c=relaxed/simple; bh=58UvdS8ZfA6eWD25sHs7xxDVreHwP8mfoOfe+ZM66Mg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ihdioSyM4k4nH12kHNeNaE82PG9Da8OY+BzgOQKrRBF4qtjP0Y3ejVuJq0alRoH+h1q0xCSBoenuPSe97JdkzBb6/Uk7cMXj7tRyxxTKLUCrZLZ66mKtoM/0eRg6WXN/dZk5mRaPj1nHYy0O+BPmJE3qCUawaQqtM+XQ31Y3IJU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Qv3f7mk1; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1e411e339b8so31740335ad.3 for ; Wed, 10 Apr 2024 23:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712815688; x=1713420488; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=/iT9IlAymUCb2pC4/RBQKOmj3d7dpo0oLb02XVtYzR4=; b=Qv3f7mk1hUIoX1zPUs4xwOoZQADW+Tek1qArgx0KpZMwr6iObjYa2Z2J0oGGNgQ+mR RmArN6L6BiR9TGLWvdw1KZyy4GN6ZhPCOsXeXddu+oxqwt0uoSTeEi/4uOIHQ6pCISz6 T1rpaWJxmEhk61TtkOsdB+R/60xxMxmb0pIfma+HSpOcwTPbf/xR+wtlY/bteMZdlL/k 4hBatvuSp21ZsairAAiJ3hVBOaZrpymRyvixOxbA9tt8dcWhoLP7IL2hVX8zbjksbGkq nOe1uZcS0cqDVm40iHiauOCq7rky/M8WIvUEYN2Tfj4ymbq1ynxv18sJAjubB29042By m/jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712815688; x=1713420488; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/iT9IlAymUCb2pC4/RBQKOmj3d7dpo0oLb02XVtYzR4=; b=IHdLcZcCCR0olYGOYagsnQSrKedzkjZLWbTxDW/mKZp6xgL+P35ACO/I01Uf6Wsrrh KP9Cho3PXSrnFrvzSTy9EQfVx0bDhAbSmCfl4g4UlrEms9/okv3ERaFa+n5uwObQIok7 USzH9/BKrqW6TG//SzgfsggbMP9tPRdTBmb8IOaWfYQ6jHMATJ4pKLa47pueD1DfwCgS YByz6Htjq7SkGtjfGvIMjp+FLCNjoU8IDKAzUy4QsiiidoYRth4iC26sKL0kclaZeMV9 z16ZCJprkcbwHusUuaXj7Jz4kMxCkrsPYTzzZecGnJdmcwD2j22wCX5VibXa8OepAU3V IXyQ== X-Forwarded-Encrypted: i=1; AJvYcCX0mXJTCRWvvmneQuVSeiroM7lAy9Lex+KJoBdo+bvfblJMBw4gMdEsag99UfKv0blpfqQtDFqE/j/ibC82Cq9xXS83Gdz+lfKHz5/C X-Gm-Message-State: AOJu0YwAG4uA/J/pG4L+8ACkqliPA7KOV0N3TonpwknweS365MPZl74b k50IHwZomLsHz+VEyeB3zyMRzIChOhna6I8nyxBOPA8RHRR7a7bK X-Received: by 2002:a17:903:98b:b0:1e2:817b:460a with SMTP id mb11-20020a170903098b00b001e2817b460amr5668725plb.34.1712815688354; Wed, 10 Apr 2024 23:08:08 -0700 (PDT) Received: from [192.168.255.10] ([43.132.141.20]) by smtp.gmail.com with ESMTPSA id w14-20020a170902e88e00b001e0af9928casm510549plg.55.2024.04.10.23.08.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Apr 2024 23:08:07 -0700 (PDT) Message-ID: <235b35c2-159c-48b1-a522-654f5ccc2faf@gmail.com> Date: Thu, 11 Apr 2024 14:08:03 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/9] mm/ksm: add ksm_get_folio To: David Hildenbrand , alexs@kernel.org, Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Izik Eidus , Matthew Wilcox , Andrea Arcangeli , Hugh Dickins , Chris Wright References: <20240409092826.1733637-1-alexs@kernel.org> <20240409092826.1733637-2-alexs@kernel.org> <81c1de48-1e31-449d-8f5a-9342634cea27@redhat.com> Content-Language: en-US From: Alex Shi In-Reply-To: <81c1de48-1e31-449d-8f5a-9342634cea27@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 4/10/24 4:34 PM, David Hildenbrand wrote: > On 09.04.24 11:28, alexs@kernel.org wrote: >> From: "Alex Shi (tencent)" >> >> The ksm only contains single pages, so we could add a new func >> ksm_get_folio for get_ksm_page to use folio instead of pages to save a >> couple of compound_head calls. >> >> After all caller replaced, get_ksm_page will be removed. >> >> Signed-off-by: Alex Shi (tencent) >> To: Andrew Morton >> Cc: Izik Eidus >> Cc: Matthew Wilcox >> Cc: Andrea Arcangeli >> Cc: Hugh Dickins >> Cc: Chris Wright >> Reviewed-by: David Hildenbrand >> --- >>   mm/ksm.c | 40 ++++++++++++++++++++++++---------------- >>   1 file changed, 24 insertions(+), 16 deletions(-) >> >> diff --git a/mm/ksm.c b/mm/ksm.c >> index 8c001819cf10..ac080235b002 100644 >> --- a/mm/ksm.c >> +++ b/mm/ksm.c >> @@ -915,10 +915,10 @@ enum get_ksm_page_flags { >>    * a page to put something that might look like our key in page->mapping. >>    * is on its way to being freed; but it is an anomaly to bear in mind. >>    */ >> -static struct page *get_ksm_page(struct ksm_stable_node *stable_node, >> +static struct folio *ksm_get_folio(struct ksm_stable_node *stable_node, > > Just realized that you should adjust the function name in the comment above this function in this patch. > Right, will resend with your suggestion.