From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA46DC2BA19 for ; Sat, 18 Apr 2020 08:51:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A73EF21D7E for ; Sat, 18 Apr 2020 08:51:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A73EF21D7E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=canonical.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 557AD8E0005; Sat, 18 Apr 2020 04:51:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5083D8E0003; Sat, 18 Apr 2020 04:51:50 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 41D008E0005; Sat, 18 Apr 2020 04:51:50 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0110.hostedemail.com [216.40.44.110]) by kanga.kvack.org (Postfix) with ESMTP id 2799C8E0003 for ; Sat, 18 Apr 2020 04:51:50 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id CB3C3613E for ; Sat, 18 Apr 2020 08:51:49 +0000 (UTC) X-FDA: 76720357938.10.drain64_845860069e506 X-HE-Tag: drain64_845860069e506 X-Filterd-Recvd-Size: 4477 Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by imf48.hostedemail.com (Postfix) with ESMTP for ; Sat, 18 Apr 2020 08:51:49 +0000 (UTC) Received: from mail-wr1-f72.google.com ([209.85.221.72]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jPjCW-00076Q-9o for linux-mm@kvack.org; Sat, 18 Apr 2020 08:51:48 +0000 Received: by mail-wr1-f72.google.com with SMTP id e5so2348341wrs.23 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=EXHXQsEXFqQ2j5eZqwZ5jWxJDECiVU3Xbr53c/L4JFW7ESyJpu3yD4xYzMTL+as2o1 Z84Odv75D8dwVB/ulz7RoTL02OwR/L1SwZfM7/Ownxf9TDp/4ocNDyRcVB9xqlZqSjQn t52LAQyJ0ZLgGpDJTW6wXH3BOTx0EGArvcV9jKjHgQ3AZArDsDbS/uKUff0x1MthKoKN JQmQ6qWsx4UWmo4xXk/A6uwx3eOt1slIZl905JQDW2oh5d+hpwhQmWDtaalaTAm8HRRd aiQlByXKWsU1dQ8peFJxF8ylQXTL5T48yR9u7Qhfs11pF7N7xyPnsOOckWH5mluQflOA iroQ== X-Gm-Message-State: AGi0PubqadOT5C+zKLNMgk5rb8TqX41uEeKMP1UQCD4AibQz3IX6fAC7 45pJHTqFWJWMBPIcmBFs9i7TAM4D++QL5/qhD54J6+njokQq/xrabHow3NivksYA7XLHuomfyjF f4dVw1kMmmrvsaDW46A+ZBGNgxHzY X-Received: by 2002:a5d:65d2:: with SMTP id e18mr8262387wrw.104.1587199907679; Sat, 18 Apr 2020 01:51:47 -0700 (PDT) X-Google-Smtp-Source: APiQypLv1ZraJ0vX3wBvGgtLOoNjxem2hSJ1DucR2xU+S8+PGnbBOimyc7wWOjg6UpfYkXbhAiuB/g== 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> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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