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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 1427FC35240 for ; Tue, 28 Jan 2020 03:50:12 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C3D5B2467E for ; Tue, 28 Jan 2020 03:50:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C3D5B2467E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=otago.ac.nz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 477896B0006; Mon, 27 Jan 2020 22:50:11 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4281A6B0007; Mon, 27 Jan 2020 22:50:11 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 33E496B0008; Mon, 27 Jan 2020 22:50:11 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 12F546B0006 for ; Mon, 27 Jan 2020 22:50:11 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id BA85C2478 for ; Tue, 28 Jan 2020 03:50:10 +0000 (UTC) X-FDA: 76425664980.08.brain81_3a8a26e843f35 X-HE-Tag: brain81_3a8a26e843f35 X-Filterd-Recvd-Size: 3480 Received: from mailhub2.otago.ac.nz (mailhub2.otago.ac.nz [139.80.64.247]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jan 2020 03:50:01 +0000 (UTC) Received: from mailhost.staff.otago.ac.nz (its-mail-p08.registry.otago.ac.nz [10.67.0.92]) by mailhub2.otago.ac.nz (8.13.8/8.13.8) with ESMTP id 00S3M34n032585; Tue, 28 Jan 2020 16:22:04 +1300 Received: from its-mail-p04.registry.otago.ac.nz (10.67.0.68) by its-mail-p08.registry.otago.ac.nz (10.67.0.92) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 28 Jan 2020 16:22:03 +1300 Received: from its-mail-p04.registry.otago.ac.nz ([fe80::bd4c:10f5:161d:7ae6]) by its-mail-p04.registry.otago.ac.nz ([fe80::bd4c:10f5:161d:7ae6%18]) with mapi id 15.00.1473.005; Tue, 28 Jan 2020 16:22:03 +1300 From: Chris Edwards To: Johannes Weiner , Michal Hocko CC: "linux-mm@kvack.org" Subject: Re: Paging out when free memory is low but not exhausted (and available memory remains high) Thread-Topic: Paging out when free memory is low but not exhausted (and available memory remains high) Thread-Index: AQHV0LyBCtvAwW5mKUqLnvAArvZ8Baf3VqmAgAH26UX//3JUgIAEt6kAgAH29qk= Date: Tue, 28 Jan 2020 03:22:02 +0000 Message-ID: <1580181722920.30551@otago.ac.nz> References: <20200123123127.GK29276@dhcp22.suse.cz> <1579844599463.32567@otago.ac.nz> <20200124100423.GP29276@dhcp22.suse.cz>,<20200127100646.GA203985@cmpxchg.org> In-Reply-To: <20200127100646.GA203985@cmpxchg.org> Accept-Language: en-NZ, en-US Content-Language: en-NZ X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.64.32.126] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Thank you both for the assistance and the patch. I'm afraid the problem rem= ains with the patch applied, when exercising either the block buffer cache = and the filesystem page cache. Is there anything I can do to try to pinpoin= t the problem? Tweaking some kernel vm.* parameters, perhaps? I wonder if o= thers are able to reproduce the behaviour.=0A= =0A= (Sorry for top-posting - lousy Outlook Web Access!)=0A= --=0A= Chris=0A= =0A= ________________________________________=0A= From: Johannes Weiner =0A= Sent: Monday, 27 January 2020 23:06=0A= To: Michal Hocko=0A= Cc: Chris Edwards; linux-mm@kvack.org=0A= Subject: Re: Paging out when free memory is low but not exhausted (and avai= lable memory remains high)=0A= =0A= Just to confirm, Chris, would you be able to test whether the=0A= following patch fixes the problem you are seeing?=0A= =0A= diff --git a/mm/vmscan.c b/mm/vmscan.c=0A= index 74e8edce83ca..1f1403681960 100644=0A= --- a/mm/vmscan.c=0A= +++ b/mm/vmscan.c=0A= @@ -2744,7 +2744,7 @@ static bool shrink_node(pg_data_t *pgdat, struct scan= _control *sc)=0A= * anonymous pages.=0A= */=0A= file =3D lruvec_page_state(target_lruvec, NR_INACTIVE_FILE);=0A= - if (file >> sc->priority && !(sc->may_deactivate & DEACTIVATE_FILE)= )=0A= + if (file >> sc->priority && !inactive_is_low(target_lruvec, LRU_INA= CTIVE_FILE))=0A= sc->cache_trim_mode =3D 1;=0A= else=0A= sc->cache_trim_mode =3D 0;=0A=