Received: by 2002:a17:90a:3541:0:0:0:0 with SMTP id q59csp85769pjb; Mon, 8 Jun 2020 15:27:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7fKlGIeGZ3+X8AssLaWkG2rutiKcNZsTHNBs3U0kyJqfX1stRWY2L5hch3CGOojHERcDV X-Received: by 2002:aa7:ce10:: with SMTP id d16mr24391484edv.116.1591655264236; Mon, 08 Jun 2020 15:27:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591655264; cv=none; d=google.com; s=arc-20160816; b=wnkTxtw/q+1AflapH3YCmUS5adDAXpSco18PfOZsP1BAU9eO31NEImOUha4HuEtUrm DyQKmcmXUWTl/EE77CgHiuisj6XfpZ3QAH+LD8Sm+mm2kNSovmTtBE57pl7wdyK6B9Q/ 0dhpc2vssAh3uNGrm5glrIH+K07XqW7Ii7UTo+xbxQ0y87g2PCs9QA5+THbKXfkA+/sT ZJPO5HfIDkx06TKCdq/V5b+utYVDokj4VN1KaFtvZ6yywchcaMzbeoI0ykTGewBGkdKW GwWJ4QTMwvTFHZmjgWbh9vV1LBoE3oizztGuJLweNuyTFrDSna50fLI7T52LfEvE0YT5 3VgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :mime-version:dkim-signature; bh=IOyE3fBHvQo+Zh3CkzprspTxqYRTQ3yhT6gGhhPfw24=; b=cZJHD+HyJY6/pK7RIZE0eYZxmuM4I4A+NdZAsFdFhVd5LnTkp368OW9N6g/LQSfZvG WD4mhlURydgXAzX0TH6aBMe0eI0bvN42ZefL/cNe6yoFs6CRsd06L9zjzE9Eui+fx6TL 7P8D9+LeSerPn35GIdw2X31YYXTqW+zX6JxOfAVClCO9WE7fFT64rmSkj3s1fUxm3dGc 38aRhbhMOliJYeb06yueCNDQcSbECk49KyJjxxD3/rRbM8HY7xr2+CNOeZpO0Se8l4Me +MF3zyfomtWkzPU6Glta0C2JLjHJlKqWqhTfLeZXuPHXC9DHlJ+ot369wEL+CTBnT049 39lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Fkp+65jh; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n6si9726961ejy.140.2020.06.08.15.27.21; Mon, 08 Jun 2020 15:27:44 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=Fkp+65jh; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726725AbgFHWXg (ORCPT + 99 others); Mon, 8 Jun 2020 18:23:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726723AbgFHWXf (ORCPT ); Mon, 8 Jun 2020 18:23:35 -0400 Received: from mail-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C600AC08C5C2 for ; Mon, 8 Jun 2020 15:23:35 -0700 (PDT) Received: by mail-il1-x143.google.com with SMTP id p5so18428208ile.6 for ; Mon, 08 Jun 2020 15:23:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=IOyE3fBHvQo+Zh3CkzprspTxqYRTQ3yhT6gGhhPfw24=; b=Fkp+65jhAAgZa79YFMGfjElTF9GgmQcCScA2uqf0Ea6WUTRgOtscQZjGHo9fd4wmpi Wi+XgtegOPCLMu4T4NJX8TS3Ls38Po3hPSvtU0wtkN9UEM+89lMjAqEPVjDdU96S42Rb Q5JUczLAHWtvX/KddbxK2X7/opnC8sAwNAXLHF4ragapUS9oHytChcBrM6PRvDVY324f f7TAGf684QnrHiCZUDV1reAJ6XXM9B5vEAz0B6hvUe6RLSHG+vM2JZrTXca7vuuI9NVz 1hriAp3TTaViEg3nX1q9mXlkdij6mn6XtvZ/ftTlFCh12ODjYr5yn0NGdOvzM7K8dYps xwRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=IOyE3fBHvQo+Zh3CkzprspTxqYRTQ3yhT6gGhhPfw24=; b=bD8P10BckknWUeZ0OaQoGV4FS3QEwSHh0jjJToyfCGR4qOKNk6Mn2Yy1tILKqPzhOF PB+WoKzut5IwtbZ4+AJODKYcNqpKe+C7zcS2ZcPIyJZL0MRIlCXzarC1D6Cqm+Mn4Ira AyXajlFQm8bC6bSUpWb8pnM6OHjDegVsyT8FF/ECpan3iLvGn7El7+Y18/POPvPU4e9g hoF2doyA+GYWx9/H8Ye+XDnhiRRGJq9BWzijO0VIwgCBt9rta5+ibZwd1wKK6wwYlSBb ivM53Us73nIO+kHzvXTtjsoIHlX5tbDObbcSgRanduxd+vfe6ZqGGoN1zO/+3BDFZbfq 0x2Q== X-Gm-Message-State: AOAM531lAi5R9vkwMdQ83K7Jvmf+ApbLDoNqPPUpvbQGFaIaxoTYS5XO AkxfajXqH66Jb1z3vqH/boCCmjXj8ZQ8t+sT79oUog== X-Received: by 2002:a92:cd11:: with SMTP id z17mr23379483iln.55.1591655014745; Mon, 08 Jun 2020 15:23:34 -0700 (PDT) MIME-Version: 1.0 From: Luigi Semenzato Date: Mon, 8 Jun 2020 15:23:22 -0700 Message-ID: Subject: Re: [RFC PATCH 2/2] PM: hibernate: introduce opportunistic memory reclaim To: Andrea Righi Cc: Pavel Machek , linux-kernel , Linux Memory Management List , Linux PM , Andrew Morton , Len Brown , "Rafael J . Wysocki" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrea, 1. This mechanism is quite general. It is possible that, although hibernation may be an important use, there will be other uses for it. I suggest leaving the hibernation example and performance analysis, but not mentioning PM or hibernation in the patch subject. 2. It may be useful to have run_show() return the number of pages reclaimed in the last attempt. (I had suggested something similar in https://lore.kernel.org/linux-mm/CAA25o9SxajRaa+ZyhvTYdaKdXokcrNYXgEUimax4sUJGCmRYLA@mail.gmail.com/). 3. It is not clear how much mm_reclaim/release is going to help. If the preloading of the swapped-out pages uses some kind of LIFO order, and can batch multiple pages, then it might help. Otherwise demand paging is likely to be more effective. If the preloading does indeed help, it may be useful to explain why in the commit message. Thanks!