Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1485113ybz; Sat, 18 Apr 2020 01:55:40 -0700 (PDT) X-Google-Smtp-Source: APiQypIsCzRodCFCKYX6tIao6g+i+jz5io0rquFZ8WzsSbii4a5yz5i/Yi1rdwMJK4x1l+f35+Sc X-Received: by 2002:a50:9ea1:: with SMTP id a30mr6705805edf.318.1587200140510; Sat, 18 Apr 2020 01:55:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587200140; cv=none; d=google.com; s=arc-20160816; b=HrscSNl1TMJUKc/ECzd4Gw4TJuRg73vImMyoYnuWGOk5gqDk/mkQ6cBJ1kquhnhYCE xpdLEHns0ntHpYXrNENj+ZBNinXVDz0oc1uPr7KjGorbhvhfzw+okKEYJFfosGaCb1Ee wVqyGSdIfViNKneUSbHVvWe5YO+Nl2hbM351KDlW16k7XOLVvueKXlID+XuvizxVZcQJ VdfGZd0AyUOVIy8aVCufpu8+sjyaqlL/647Y2KLhtL/WGU/rxOF0Gt7Wdfk1syOxRn1n h3yAGwfMgFDaefdwiMSmrKgyymU9L0vCdhXkvY+7mA7TBSrBJD5wWfqwP3+2XG38VI9I Zg6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=l865sM20dUV5dn9goNLRc6hzgJt0NJq8dymVntQWufM=; b=07PlJfq+t0jYkZecHGxrrga8RTh/zmkHWz4jJiq+Qj5ARGCIBNfhGK25LR48LRhErQ y5KQZkLOYR+dQ3BvB6GtuV+ZDdHKGrwbRByx438d//sXybo/S96ejFOwtOl+q8HpjXk5 usL1WBSyrMsbFKhgI4fQ15CkfNjjLFbgP37079p9ZHjAfd08GFKhh2iwexQBDrjX2I9y Va6TJKt53sKC2Htn1Q0pjjjWlyD4HRbStMkyT5bpRpZgyKA8aSpvBLTRp+bpo7sOzoef ToVIpOUly06XmIG43bfrgU7rOmNvUuVaCTOIBaLBc/hQQx+ewOooIeWuUi/fbSug+qCM fVdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rs10si14727787ejb.288.2020.04.18.01.55.18; Sat, 18 Apr 2020 01:55:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725914AbgDRIvu (ORCPT + 99 others); Sat, 18 Apr 2020 04:51:50 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:39046 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725801AbgDRIvt (ORCPT ); Sat, 18 Apr 2020 04:51:49 -0400 Received: from mail-wr1-f71.google.com ([209.85.221.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jPjCW-00076H-1U for linux-kernel@vger.kernel.org; Sat, 18 Apr 2020 08:51:48 +0000 Received: by mail-wr1-f71.google.com with SMTP id r17so2365344wrg.19 for ; Sat, 18 Apr 2020 01:51:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=l865sM20dUV5dn9goNLRc6hzgJt0NJq8dymVntQWufM=; b=BPOG61I1AFmMPoiEFA4bqHQlpQdJlacJLkTtfj7OejhkJ6WM8WeGcUHiPa4YlNwimG asB8PY3SiU1b1usM7X+KO2f48peIOVNgov+vUuOvj1Sp6tWZWlQn4IfLWd3HIvJ/Gfo9 pQVcDpx9UlyJ6V9y67giG4Qm2YXLrdTjRWBF1ROkWTkttftF87itcUmiNg/4ZgLF98SM W1Pfc5VJFThs2r0/SfT6RqzijSV6d75ZNy2fSsDUxICJ7eQlMOsAWj+3k46Tnia9hzWd 47KCXGcR/St07n3YuLJWF2qvqSh3DUJE8Nqke5+QP1U7eU9wfERHbIA4TMVDsnrQif/m 0Jqw== X-Gm-Message-State: AGi0Puaz6zTWJUphLxCLx1olJFX9HImnlm8Y6Wc6bhhI/zAJs/+5rnJE lT6fcsbR6rJWBa8DoLyhj0AELlXJbmND31L6LrWcNvkXsYqgLHIwZ/MYb074KYj2YVhXtMr/nlj AUUVaNozD1kZpBEH6q+83gernFsWQHBEi1GiE4R/qGA== X-Received: by 2002:a5d:65d2:: with SMTP id e18mr8262391wrw.104.1587199907684; Sat, 18 Apr 2020 01:51:47 -0700 (PDT) X-Received: by 2002:a5d:65d2:: with SMTP id e18mr8262370wrw.104.1587199907386; Sat, 18 Apr 2020 01:51:47 -0700 (PDT) Received: from localhost (host123-127-dynamic.36-79-r.retail.telecomitalia.it. [79.36.127.123]) by smtp.gmail.com with ESMTPSA id t2sm10854409wmt.15.2020.04.18.01.51.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Apr 2020 01:51:46 -0700 (PDT) Date: Sat, 18 Apr 2020 10:51:45 +0200 From: Andrea Righi To: "Huang, Ying" Cc: Andrew Morton , Minchan Kim , Anchal Agarwal , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] mm: swap: properly update readahead statistics in unuse_pte_range() Message-ID: <20200418085145.GA147473@xps-13> References: <20200416180132.GB3352@xps-13> <871romvmrh.fsf@yhuang-dev.intel.com> <20200416210646.774bae8c321e3a44d6ffa8c3@linux-foundation.org> <87sgh2u1ua.fsf@yhuang-dev.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87sgh2u1ua.fsf@yhuang-dev.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 17, 2020 at 01:18:37PM +0800, Huang, Ying wrote: > Andrew Morton writes: > > > On Fri, 17 Apr 2020 11:01:22 +0800 "Huang\, Ying" wrote: > > > >> Andrea Righi writes: > >> > >> > In unuse_pte_range() we blindly swap-in pages without checking if the > >> > swap entry is already present in the swap cache. > >> > > >> > By doing this, the hit/miss ratio used by the swap readahead heuristic > >> > is not properly updated and this leads to non-optimal performance during > >> > swapoff. > >> > >> It's more important to describe why we need this patch in the patch > >> description. So, please add some information about your use case. And > >> please focus on the technical part instead of the business part. > > > > Confused. I thought the changelog was quite good. If "business part" > > means "end user effect of the patch" then that's a very important > > thing. > > Previously, Andrea has described their use case in the cloud environment > to hiberate the guest and swapoff after resuming. So swapoff > performance is important for them. I think that should be included. > For the business part, I mean something like "Ubuntu used in AWS EC2", I > think that isn't important for the patch description. I just sent a v4 of this patch adding "conclusion" section in the description to better explain the purpose of this patch. Let me know if you have any comment on that. Thanks, -Andrea