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=-8.4 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 6286BC433DF for ; Mon, 8 Jun 2020 22:23:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1CB502068D for ; Mon, 8 Jun 2020 22:23:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Fkp+65jh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1CB502068D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A67B06B0002; Mon, 8 Jun 2020 18:23:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A196C6B0005; Mon, 8 Jun 2020 18:23:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 92E556B0006; Mon, 8 Jun 2020 18:23:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0028.hostedemail.com [216.40.44.28]) by kanga.kvack.org (Postfix) with ESMTP id 7B0956B0002 for ; Mon, 8 Jun 2020 18:23:36 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 2B589181ABEA5 for ; Mon, 8 Jun 2020 22:23:36 +0000 (UTC) X-FDA: 76907472432.09.books04_2b0c7c226dbd Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 08BE718014D30 for ; Mon, 8 Jun 2020 22:23:36 +0000 (UTC) X-HE-Tag: books04_2b0c7c226dbd X-Filterd-Recvd-Size: 3504 Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Mon, 8 Jun 2020 22:23:35 +0000 (UTC) Received: by mail-il1-f194.google.com with SMTP id b5so18457661iln.5 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=fqmF6MiC5nPHNquU+t41QiMWRyyS6oLHKRNV1AM99ZQ1lz4uJgUwTaPn/Sj99fYZ4q B9XJcByILU9r6f1JbNKHllQLj2a5+mEWjVvzxUea8xhM7Gyo2xJoTpfFd/JYXruj2lzJ h1jqww9p59pff24ZbJxMtnpbsa/+Gq2sXlB7bTcVNGj2ONRhj27uzS6uVHPK2J63jeHg 8zdK14ss9MoRKZrdzeesyE5C5rUYn6U9tgubI7SXBXKioUcybS8pJPii9bmyRf6Cdmb9 o6QaqHigxaSgpUMj/9bCtYEbpMresaK/9W2OXwgdJu+hWeTb2sOBm1Vpi8HCrch+617v fU7A== X-Gm-Message-State: AOAM530hLUMZgwdEREMo9bMgM9PIwIhsDZT+Tc/rGwTb7uxdD4i9HIvx xru82kKOZVGZhl3bw1+Z4jM2dDxzylQ4r1mXoeDBUg== X-Google-Smtp-Source: ABdhPJzsZ9TDVgDy3gIz3iyJ4NkEHSDSi7Yj5G4NoSs+wvihQTtx2FHPNlKzSR0PDqTRe+hISmuO9fUvRw7w4Ihe2cQ= 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" X-Rspamd-Queue-Id: 08BE718014D30 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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: 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!