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=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1, USER_IN_DEF_DKIM_WL autolearn=unavailable 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 822A9C433DF for ; Mon, 20 Jul 2020 04:48:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C69C207EA for ; Mon, 20 Jul 2020 04:48:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Orx+a9RB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726301AbgGTEsJ (ORCPT ); Mon, 20 Jul 2020 00:48:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726076AbgGTEsI (ORCPT ); Mon, 20 Jul 2020 00:48:08 -0400 Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24FD7C0619D4 for ; Sun, 19 Jul 2020 21:48:08 -0700 (PDT) Received: by mail-ot1-x341.google.com with SMTP id n24so11164658otr.13 for ; Sun, 19 Jul 2020 21:48:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=6Nps254wO3Vku/AMs/COcTPJnAHzxFnu9/tet83Jczo=; b=Orx+a9RBBcSgVIEOHFVB374CoAHh0H+dcciHwze7bjd/evrRLoNHoEeHX6AUUXAWPE rlEZJuyYrLtfrbxBEr1f6tOk1hUCeuxitWVtbHQSm1gD5eBMeQnnQmiecOui/n+Wy+CH lVR+yKJxXOVRAwcOkkKdPQDX9l0WSRYT55r6M1O9qVGNeakNm5eWCBq/poyfEr+Mh+xO fvXDBer896r9lWpDPRKLzlOfw7HMuYx8YhXqqDQ9X/jiqcowwnnertv+u6tOMyTf4L6x VhxLTL6Tuzj5Wcb/bIoRfQ7SJeG3OQOLcWf9uL2ccqf9yxAULz7Zp0JITwEJl9p0MruI UiVg== 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:in-reply-to:message-id :references:user-agent:mime-version; bh=6Nps254wO3Vku/AMs/COcTPJnAHzxFnu9/tet83Jczo=; b=i8aBqb6nRavNnqcYOyQtLNfBkTn2r3HCxebxOIU8e20KKUcocVBED1TVD4TA1EDp4A MpFkmIXshxqfwDYl0QVCYvcy5+VGSxrhnegITBmbOT7SjeXBRuaWBQulpW7DO4JES0TE ehzIvuMt/oP45bmQsBczigfgksMJXLsp2YrXhu6vf5EZHhWdu7+jjiUF9iGRvbvJYuH4 dKTOcFgkrkdwoc9R07730RoKYuKZ1IU3uXOxu8+FschosMPumzo75WadGXRMHSSYyVZm agaLbNwjRE8oDFLy8n/K3CWchYVuX8pogtlko0OxRhAOn1LfP34apxBc2fq+YkJXxxW2 EQ+Q== X-Gm-Message-State: AOAM5302AFbECBNsehfehdoLoOII6sx0zXuHi7dMo/3QWwiCOgW+bd0V mnZZBkAlfzjcb6zVkaH3KbW9dA== X-Google-Smtp-Source: ABdhPJyxUSbYws6hgiXi/FXNrgA6DQiqHyVhJ/vCcW5ZcJVVBJfAngGkSI4Kx13zzYcqaz/Mipp0kQ== X-Received: by 2002:a9d:480d:: with SMTP id c13mr18932515otf.224.1595220487215; Sun, 19 Jul 2020 21:48:07 -0700 (PDT) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id w17sm3914020oia.16.2020.07.19.21.48.04 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Sun, 19 Jul 2020 21:48:06 -0700 (PDT) Date: Sun, 19 Jul 2020 21:47:49 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Alex Shi cc: Hugh Dickins , Alexander Duyck , Andrew Morton , Mel Gorman , Tejun Heo , Konstantin Khlebnikov , Daniel Jordan , Yang Shi , Matthew Wilcox , Johannes Weiner , kbuild test robot , linux-mm , LKML , cgroups@vger.kernel.org, Shakeel Butt , Joonsoo Kim , Wei Yang , "Kirill A. Shutemov" Subject: Re: [PATCH v16 00/22] per memcg lru_lock In-Reply-To: <5f2401d3-dd4f-cbc6-8cb4-4e92fc64998c@linux.alibaba.com> Message-ID: References: <1594429136-20002-1-git-send-email-alex.shi@linux.alibaba.com> <57c619e7-da7e-198e-3de8-530bf19b9450@linux.alibaba.com> <5f2401d3-dd4f-cbc6-8cb4-4e92fc64998c@linux.alibaba.com> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1916823428-1595220486=:1478" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1916823428-1595220486=:1478 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 20 Jul 2020, Alex Shi wrote: > =E5=9C=A8 2020/7/19 =E4=B8=8B=E5=8D=8811:23, Hugh Dickins =E5=86=99=E9=81= =93: > > I noticed that 5.8-rc5, with lrulock v16 applied, took significantly > > longer to run loads than without it applied, when there should have bee= n > > only slight differences in system time. Comparing /proc/vmstat, somethi= ng > > that stood out was "pgrotated 0" for the patched kernels, which led her= e: > >=20 > > If pagevec_lru_move_fn() is now to TestClearPageLRU (I have still not > > decided whether that's good or not, but assume here that it is good), > > then functions called though it must be changed not to expect PageLRU! > >=20 > > Signed-off-by: Hugh Dickins >=20 > Good catch! >=20 > Thanks a lot, Hugh!=20 > except 6 changes should apply, looks we add one more in swap.c file to st= op > !PageRLU further actions! Agreed, that's a minor optimization that wasn't done before, that can be added (but it's not a fix like the rest of them). >=20 > Many Thanks! > Alex >=20 > @@ -649,7 +647,7 @@ void deactivate_file_page(struct page *page) > * In a workload with many unevictable page such as mprotect, > * unevictable page deactivation for accelerating reclaim is poin= tless. > */ > - if (PageUnevictable(page)) > + if (PageUnevictable(page) || !PageLRU(page)) > return; >=20 > if (likely(get_page_unless_zero(page))) { --0-1916823428-1595220486=:1478-- 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=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1, USER_IN_DEF_DKIM_WL autolearn=unavailable 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 A2A09C433DF for ; Mon, 20 Jul 2020 04:50:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 440AB20758 for ; Mon, 20 Jul 2020 04:50:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Orx+a9RB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 440AB20758 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 5E93F6B0003; Mon, 20 Jul 2020 00:50:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 59ABC6B0005; Mon, 20 Jul 2020 00:50:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 48A836B0006; Mon, 20 Jul 2020 00:50:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0216.hostedemail.com [216.40.44.216]) by kanga.kvack.org (Postfix) with ESMTP id 314136B0003 for ; Mon, 20 Jul 2020 00:50:14 -0400 (EDT) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B990A182888C8 for ; Mon, 20 Jul 2020 04:50:13 +0000 (UTC) X-FDA: 77057227506.04.trip75_13085c826f22 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin04.hostedemail.com (Postfix) with ESMTP id 950A0800B4F8 for ; Mon, 20 Jul 2020 04:48:08 +0000 (UTC) X-HE-Tag: trip75_13085c826f22 X-Filterd-Recvd-Size: 5717 Received: from mail-ot1-f65.google.com (mail-ot1-f65.google.com [209.85.210.65]) by imf26.hostedemail.com (Postfix) with ESMTP for ; Mon, 20 Jul 2020 04:48:08 +0000 (UTC) Received: by mail-ot1-f65.google.com with SMTP id 18so11175545otv.6 for ; Sun, 19 Jul 2020 21:48:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=6Nps254wO3Vku/AMs/COcTPJnAHzxFnu9/tet83Jczo=; b=Orx+a9RBBcSgVIEOHFVB374CoAHh0H+dcciHwze7bjd/evrRLoNHoEeHX6AUUXAWPE rlEZJuyYrLtfrbxBEr1f6tOk1hUCeuxitWVtbHQSm1gD5eBMeQnnQmiecOui/n+Wy+CH lVR+yKJxXOVRAwcOkkKdPQDX9l0WSRYT55r6M1O9qVGNeakNm5eWCBq/poyfEr+Mh+xO fvXDBer896r9lWpDPRKLzlOfw7HMuYx8YhXqqDQ9X/jiqcowwnnertv+u6tOMyTf4L6x VhxLTL6Tuzj5Wcb/bIoRfQ7SJeG3OQOLcWf9uL2ccqf9yxAULz7Zp0JITwEJl9p0MruI UiVg== 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:in-reply-to:message-id :references:user-agent:mime-version; bh=6Nps254wO3Vku/AMs/COcTPJnAHzxFnu9/tet83Jczo=; b=YylBeXuGuxHY/AQ5NgR6u4tSnGtB6wvpGZlWpou32d5P6sF+wtgjTcZAqaTnJzlCt1 6qGrmJRyA1azkFM/STniafNKsNWiSUwFmM71ufQvLYEXm5cHfG44oJdQZdmm9XW5Punl TXpFQkoG9igrhy+bhHR7/kA6HBLecGe4sJqRcLNFfT9IxV1tpoxFQ/mawwKlXs3A1gKH 1CIBKEaer9keLaToU8GjFh3aL9X2ZryS9pVmAWUA0INYotMLhEY+jBJY1HAJ3b8MQp6J I68QHrLStk2bfoY6219jqf4O2rEaoakxOyPfUEHDK+li9Lig+RZcVvA4pClPP9iUukw1 ETRQ== X-Gm-Message-State: AOAM532aAQHSGaqwBCn656ptZRhgKLXy2RM07krG208fgEdGvauOePPz grcSoCXpdsCnUCZqGwpiA1MYBg== X-Google-Smtp-Source: ABdhPJyxUSbYws6hgiXi/FXNrgA6DQiqHyVhJ/vCcW5ZcJVVBJfAngGkSI4Kx13zzYcqaz/Mipp0kQ== X-Received: by 2002:a9d:480d:: with SMTP id c13mr18932515otf.224.1595220487215; Sun, 19 Jul 2020 21:48:07 -0700 (PDT) Received: from eggly.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id w17sm3914020oia.16.2020.07.19.21.48.04 (version=TLS1 cipher=ECDHE-ECDSA-AES128-SHA bits=128/128); Sun, 19 Jul 2020 21:48:06 -0700 (PDT) Date: Sun, 19 Jul 2020 21:47:49 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Alex Shi cc: Hugh Dickins , Alexander Duyck , Andrew Morton , Mel Gorman , Tejun Heo , Konstantin Khlebnikov , Daniel Jordan , Yang Shi , Matthew Wilcox , Johannes Weiner , kbuild test robot , linux-mm , LKML , cgroups@vger.kernel.org, Shakeel Butt , Joonsoo Kim , Wei Yang , "Kirill A. Shutemov" Subject: Re: [PATCH v16 00/22] per memcg lru_lock In-Reply-To: <5f2401d3-dd4f-cbc6-8cb4-4e92fc64998c@linux.alibaba.com> Message-ID: References: <1594429136-20002-1-git-send-email-alex.shi@linux.alibaba.com> <57c619e7-da7e-198e-3de8-530bf19b9450@linux.alibaba.com> <5f2401d3-dd4f-cbc6-8cb4-4e92fc64998c@linux.alibaba.com> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1916823428-1595220486=:1478" X-Rspamd-Queue-Id: 950A0800B4F8 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1916823428-1595220486=:1478 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 20 Jul 2020, Alex Shi wrote: > =E5=9C=A8 2020/7/19 =E4=B8=8B=E5=8D=8811:23, Hugh Dickins =E5=86=99=E9=81= =93: > > I noticed that 5.8-rc5, with lrulock v16 applied, took significantly > > longer to run loads than without it applied, when there should have bee= n > > only slight differences in system time. Comparing /proc/vmstat, somethi= ng > > that stood out was "pgrotated 0" for the patched kernels, which led her= e: > >=20 > > If pagevec_lru_move_fn() is now to TestClearPageLRU (I have still not > > decided whether that's good or not, but assume here that it is good), > > then functions called though it must be changed not to expect PageLRU! > >=20 > > Signed-off-by: Hugh Dickins >=20 > Good catch! >=20 > Thanks a lot, Hugh!=20 > except 6 changes should apply, looks we add one more in swap.c file to st= op > !PageRLU further actions! Agreed, that's a minor optimization that wasn't done before, that can be added (but it's not a fix like the rest of them). >=20 > Many Thanks! > Alex >=20 > @@ -649,7 +647,7 @@ void deactivate_file_page(struct page *page) > * In a workload with many unevictable page such as mprotect, > * unevictable page deactivation for accelerating reclaim is poin= tless. > */ > - if (PageUnevictable(page)) > + if (PageUnevictable(page) || !PageLRU(page)) > return; >=20 > if (likely(get_page_unless_zero(page))) { --0-1916823428-1595220486=:1478-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hugh Dickins Subject: Re: [PATCH v16 00/22] per memcg lru_lock Date: Sun, 19 Jul 2020 21:47:49 -0700 (PDT) Message-ID: References: <1594429136-20002-1-git-send-email-alex.shi@linux.alibaba.com> <57c619e7-da7e-198e-3de8-530bf19b9450@linux.alibaba.com> <5f2401d3-dd4f-cbc6-8cb4-4e92fc64998c@linux.alibaba.com> Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1916823428-1595220486=:1478" Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=6Nps254wO3Vku/AMs/COcTPJnAHzxFnu9/tet83Jczo=; b=Orx+a9RBBcSgVIEOHFVB374CoAHh0H+dcciHwze7bjd/evrRLoNHoEeHX6AUUXAWPE rlEZJuyYrLtfrbxBEr1f6tOk1hUCeuxitWVtbHQSm1gD5eBMeQnnQmiecOui/n+Wy+CH lVR+yKJxXOVRAwcOkkKdPQDX9l0WSRYT55r6M1O9qVGNeakNm5eWCBq/poyfEr+Mh+xO fvXDBer896r9lWpDPRKLzlOfw7HMuYx8YhXqqDQ9X/jiqcowwnnertv+u6tOMyTf4L6x VhxLTL6Tuzj5Wcb/bIoRfQ7SJeG3OQOLcWf9uL2ccqf9yxAULz7Zp0JITwEJl9p0MruI UiVg== In-Reply-To: <5f2401d3-dd4f-cbc6-8cb4-4e92fc64998c-KPsoFbNs7GizrGE5bRqYAgC/G2K4zDHf@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: To: Alex Shi Cc: Hugh Dickins , Alexander Duyck , Andrew Morton , Mel Gorman , Tejun Heo , Konstantin Khlebnikov , Daniel Jordan , Yang Shi , Matthew Wilcox , Johannes Weiner , kbuild test robot , linux-mm , LKML , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Shakeel Butt , Joonsoo Kim , Wei Yang , "Kirill A. Shutemov" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1916823428-1595220486=:1478 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 20 Jul 2020, Alex Shi wrote: > =E5=9C=A8 2020/7/19 =E4=B8=8B=E5=8D=8811:23, Hugh Dickins =E5=86=99=E9=81= =93: > > I noticed that 5.8-rc5, with lrulock v16 applied, took significantly > > longer to run loads than without it applied, when there should have bee= n > > only slight differences in system time. Comparing /proc/vmstat, somethi= ng > > that stood out was "pgrotated 0" for the patched kernels, which led her= e: > >=20 > > If pagevec_lru_move_fn() is now to TestClearPageLRU (I have still not > > decided whether that's good or not, but assume here that it is good), > > then functions called though it must be changed not to expect PageLRU! > >=20 > > Signed-off-by: Hugh Dickins >=20 > Good catch! >=20 > Thanks a lot, Hugh!=20 > except 6 changes should apply, looks we add one more in swap.c file to st= op > !PageRLU further actions! Agreed, that's a minor optimization that wasn't done before, that can be added (but it's not a fix like the rest of them). >=20 > Many Thanks! > Alex >=20 > @@ -649,7 +647,7 @@ void deactivate_file_page(struct page *page) > * In a workload with many unevictable page such as mprotect, > * unevictable page deactivation for accelerating reclaim is poin= tless. > */ > - if (PageUnevictable(page)) > + if (PageUnevictable(page) || !PageLRU(page)) > return; >=20 > if (likely(get_page_unless_zero(page))) { --0-1916823428-1595220486=:1478--