Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2358172lqt; Mon, 22 Apr 2024 08:35:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUCscV5mNn+EBOfPynC/n+zaJkhy+o3pErjUBWl0iplcG5hZ8IH37WPqtpWoaqd+EYbgvEp3Gdqkn4WyQ0oN0B8o6W02Gx1gnsRDJIfpw== X-Google-Smtp-Source: AGHT+IG+qALBx/Q9t+u1/EnZeiT9kE8EjJgDW95NrO2CjXZlhzXZ8uaqKBkXkQrvez7FZCcVM44b X-Received: by 2002:a17:902:ce8c:b0:1e7:e7ed:7787 with SMTP id f12-20020a170902ce8c00b001e7e7ed7787mr13328155plg.51.1713800111744; Mon, 22 Apr 2024 08:35:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713800111; cv=pass; d=google.com; s=arc-20160816; b=JIs17sI3LHo3YyI5yIXIw760CAMkLIMlFwm4YZR4K8Cpc26XFUheQfRv3w87knWSMN XaYCwOOAQ2Zw+f926lnjIDOowUJBOTdSZGp6vKtDL/5JHGRnCRCBOjd6U/jX123tkjiJ 35N7xofvb6QPonQAe0FuAzZq7c29LKZSnTqirZ7wC03Jc53iCkU3QGk9sphDoJn5hRGn 8+TNafUMcdXwZfCM1I9RNkSNfGqwJ5femOcciXUEAZ3lQAuBBbgBkXeRLd0UxuPmCPs/ o6nF6pWObfxrtV1osNTiX/YCIQM57MJ9tGYfABWuKTPlWcnTfoaLPQ764hZMqroQRtnm A3jA== 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=wN70iPYr3n9W1U+WIrHwJM/MMTxEMvnw8AZRwUzGnOI=; fh=nESWFU3C7knifuyQRngs18m8PydYusiofkIod7CJyZM=; b=Cxoh7AsbJtgiS+z08+rtUzTH5ouG0tKWjjCenDWXJA37qzPpyWbRXngO8h78F2c93Q WMBdtWJyTLg7fl1ig2Gs63ai4THwUmQH4gJDVud8zPdEwSmdbpfZDc/lW8j+bfcgggzw DEC0tyDeRObYpJ7pNKPTWS8c+gbf4n5vvahaWtDsCzQoOCJK807haK+8L6TrJRLmMbQJ h4TqVR1zz7ECBjI6eWeFulSgZCk4hS3b8SLCDQ3dgPl6cFRMOcgwtqdC41wstA3nKHdT vEiIVFtKtB0l8/fut/miqmOE+QIejQjLSNt4mFFGwEESHmQkzWO+9WIjuB79LoX69Ugk p4tQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="gGiVSfI/"; 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-153642-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153642-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id h5-20020a170902f70500b001e039a37289si8265390plo.613.2024.04.22.08.35.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 08:35:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153642-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; dkim=pass header.i=@gmail.com header.s=20230601 header.b="gGiVSfI/"; 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-153642-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153642-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5A95428CF7C for ; Mon, 22 Apr 2024 15:35:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 40840153562; Mon, 22 Apr 2024 15:35:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gGiVSfI/" Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (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 DABDC152523; Mon, 22 Apr 2024 15:34:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713800101; cv=none; b=l5j3uJARGOk3Y0KtwF+QvavWD0dgrcpRCx/iwax/e6Rq0kVo6oexHMYRdDhuYMp3o1Q9qV8eDdkHcmzOZx0kUW4tibA0macx0tIWKW1EBaI5nt653quKdRiER7MLBhi/kbWLtzr9F5OfM02+YmbgBEZIEiYh4WzEJ5Gf2cFopa4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713800101; c=relaxed/simple; bh=k+hbCfeBQPRpXXeKDg3W6ZAq2kwbOldMPCT7MKeU7xA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=iWUoin+6i1tPvpPa5U5yTGvslnTvMKvvPH4k6X8K3brb7WfVvPmOmvyyss6acJYqHlMzJ2QdRb7OGmsLtTZetqJi4Jq1Tt+XRDEMqjrAQ6BynJwTuaCWUnoFX1sHtrDdpz41gWMU2U34SNEk0B0/Oc0qWBSMpnKIdk32Aw5i2v0= 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=gGiVSfI/; arc=none smtp.client-ip=209.85.208.176 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-lj1-f176.google.com with SMTP id 38308e7fff4ca-2d872102372so42289411fa.0; Mon, 22 Apr 2024 08:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713800098; x=1714404898; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=wN70iPYr3n9W1U+WIrHwJM/MMTxEMvnw8AZRwUzGnOI=; b=gGiVSfI/J/bKvPkIxlMn4IXC37a3foRqSwz8mGuQkE2dW6J5TpcgoM8LvVpzGtW2mw CMGYG4WBR2tPXkl8ndggSz6nTBqlHr7A2VNV4mKGby1JSolLELa2yfDZun4ytfFuiLmK L/0v1+3i47yJ4ojOPK8+AVQeCDDNrFVtdkZ5gXoxHyE8PoKTIlqIcCF2nBqUuJzNBTBz m5kDn/OM6u23MIMtrvn9ttCJIcY5g4O+BNwQNzbnPKd+j9pBNsdiI1JUqVf1BjDTNzzm Hf5aM69xQ5PA3zATxtOJE5XJIxsSWDTi/TLWA++I4/YS+hrJ9XbSjZ5HU5tRtAneKuyR 1M8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713800098; x=1714404898; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wN70iPYr3n9W1U+WIrHwJM/MMTxEMvnw8AZRwUzGnOI=; b=XREIp95U6huwDAIKiwhoWggc5bSnBN0tiGlH8hV86Cec1tlBoqonV0zFdaoozWm4zj dP87ouBMZh5DyXzmUwluIAn9QHXV10yblgCvtAx3uzr73NAAabCxr+muoz0OaMJI7gzS npY/Sta0fZJZunCwDNgO4zypPGJsjVFOfUyK6ISkVbgImDG1t/k+KTMVFHTYIMPwV8ex 68YsKPxvCZam9o8+3sy3MXLj7w+3S/yt/OAuV0x6WDXy3psEpTStlSAMCLsEr4L+frIT IY4sjDUqnToQY5UlXUMB9NmxkSqRCIbrhiCZcIM7acsDhxYBONSJBcDNsrIty33VCWV3 juqA== X-Forwarded-Encrypted: i=1; AJvYcCVlpQcHZQ2GPtZxVj3Pf1dzYqjj78iQlBiR+RuIP08ZcgOwBgZMo7m0OilnRYRA0BdC+JOqtFJ/VkeyoYiIVlEAaGnVRes8LA/X6Y2dw1w22lYBz9teoP8CXOFoOncrTEZUbo+nC7SQ5YUQD1lTTz5EO8G6jbvxmTOIo8FZUci0phcpd/V+2vM= X-Gm-Message-State: AOJu0Yw+Sh4l6qO0w7z8Q7zmC6NnW6uGsr4CYyJM3jVd9yzRpt+p+i95 yDN6WoEG/H+FKEZeKz8J676LAYlgmcb7RnKiIsgg509fVberDqSuzsi4s0IB42DrG8Wd8oAHfKn PCYc7v4N79Oj2xQySWd4fwTmsWL4= X-Received: by 2002:a2e:86ca:0:b0:2d8:606d:c797 with SMTP id n10-20020a2e86ca000000b002d8606dc797mr7960ljj.10.1713800097720; Mon, 22 Apr 2024 08:34:57 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240417160842.76665-1-ryncsn@gmail.com> <20240417160842.76665-5-ryncsn@gmail.com> In-Reply-To: From: Kairui Song Date: Mon, 22 Apr 2024 23:34:40 +0800 Message-ID: Subject: Re: [PATCH 4/8] ceph: drop usage of page_index To: Xiubo Li Cc: Matthew Wilcox , linux-mm@kvack.org, Andrew Morton , "Huang, Ying" , Chris Li , Barry Song , Ryan Roberts , Neil Brown , Minchan Kim , Hugh Dickins , David Hildenbrand , Yosry Ahmed , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Ilya Dryomov , Jeff Layton , ceph-devel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 18, 2024 at 9:40=E2=80=AFAM Xiubo Li wrote: > On 4/18/24 09:30, Matthew Wilcox wrote: > > On Thu, Apr 18, 2024 at 08:28:22AM +0800, Xiubo Li wrote: > >> Thanks for you patch and will it be doable to switch to folio_index() > >> instead ? > > No. Just use folio->index. You only need folio_index() if the folio > > might belong to the swapcache instead of a file. > > > Hmm, Okay. > > Thanks > > - Xiubo > Hi Xiubo Thanks for the comment, As Matthew mentioned there is no need to use folio_index unless you are access swapcache. And I found that ceph is not using folios internally yet, needs a lot of conversions. So I think I'll just keep using page->index here, later conversions may change it to folio->index.