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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21CB1C433EF for ; Tue, 19 Apr 2022 19:37:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A4F516B0071; Tue, 19 Apr 2022 15:37:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9FF636B0073; Tue, 19 Apr 2022 15:37:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8790D6B0074; Tue, 19 Apr 2022 15:37:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 738626B0071 for ; Tue, 19 Apr 2022 15:37:56 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3BBDD2280C for ; Tue, 19 Apr 2022 19:37:56 +0000 (UTC) X-FDA: 79374638952.14.797E32C Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf20.hostedemail.com (Postfix) with ESMTP id 6EE361C0017 for ; Tue, 19 Apr 2022 19:37:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650397075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pHJ6JYSZrPnS83IlVv7F04EuoAhV9PC6zDA2k04Zvpg=; b=dmMVH3TqiFlUFb/wNMWv66jpkRLjsmpvO6GuG3F9oCweeEEjIpZyAkyrTgVUhdnsU+mRF4 xBMILgM6a68XzLn6jo0zc43OaNkKybItP0U6FxwVvkqSCuDRLMdvzBYzD6e8DqPEmZy7vg fwysDW6rCHybr9mtSI1Fg0D4QFcFfm0= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-546-asot9TrrNH6QAdr7-S23oQ-1; Tue, 19 Apr 2022 15:37:54 -0400 X-MC-Unique: asot9TrrNH6QAdr7-S23oQ-1 Received: by mail-qk1-f197.google.com with SMTP id bl27-20020a05620a1a9b00b0069994eeb30cso13137772qkb.11 for ; Tue, 19 Apr 2022 12:37:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=pHJ6JYSZrPnS83IlVv7F04EuoAhV9PC6zDA2k04Zvpg=; b=Ge4FkAgBkmfx5snW08FejFLJ7Mzs5Zq9kzqpWRBzJidododPTO6mPOOQiCxcFQMeGc OE7VRYQfIO74xUloc5+AjPM5/CKExibkWD+4lGcBkTn9fC//J1mHms/SErAfxkkmXbQ4 mo1sbLFRgpMG9+C6+ZdKH3ir3HRMn2gP2L9lJ/wg0t7letZokX0eWic0HYsd2ixELi1d GjSuPJ+0xaOapyL6kW/d0evskppO/J0FARpvx/IdA5mE0PyVAnMk9XTm21G12xyG+q8w TD/sfTcqwRXgI9vTX8Avd2JSnWmBPe/CTjJXE192E0klVi6ENisZRAoUhLxFJwJMHdpB +GZQ== X-Gm-Message-State: AOAM53283uVKcMc6A+SKdydUpM15j0N9cZ4IY+Bgtp/6AuCb081nKoxh H9jXsfTbxKVNGYylYPE/JEvERrDO+RfRUjLERoHProYepmRFZr5Ql/2DJmSJCNFOGOqNZ72Zfna lLePSKQUXZ1w= X-Received: by 2002:a05:620a:bc8:b0:67a:fe6a:22ac with SMTP id s8-20020a05620a0bc800b0067afe6a22acmr10464717qki.28.1650397073513; Tue, 19 Apr 2022 12:37:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPR/4hMJhEkQZAK8sWQ4QvNqTqWHMQhWrOUoy3NWsF2eMMzhOhOiaFoCcKUdcxu6ZIGFqM4g== X-Received: by 2002:a05:620a:bc8:b0:67a:fe6a:22ac with SMTP id s8-20020a05620a0bc800b0067afe6a22acmr10464708qki.28.1650397073307; Tue, 19 Apr 2022 12:37:53 -0700 (PDT) Received: from [192.168.0.188] ([24.48.139.231]) by smtp.gmail.com with ESMTPSA id d126-20020a37b484000000b0067e60283d08sm449538qkf.40.2022.04.19.12.37.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Apr 2022 12:37:52 -0700 (PDT) Message-ID: <001bf379-9026-fd7a-3fff-c1b2cea35348@redhat.com> Date: Tue, 19 Apr 2022 15:37:51 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v3] vm_swappiness=0 should still try to avoid swapping anon memory To: Johannes Weiner Cc: linux-mm@kvack.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, aquini@redhat.com, shakeelb@google.com, llong@redhat.com, mhocko@suse.com, hakavlad@inbox.lv References: <20210809223740.59009-1-npache@redhat.com> From: Nico Pache In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 6EE361C0017 X-Rspam-User: Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dmMVH3Tq; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf20.hostedemail.com: domain of npache@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=npache@redhat.com X-Stat-Signature: 1dnwmfzg8pw47d53sxabcsmqa94bec7q X-HE-Tag: 1650397075-525212 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 Johannes, On 4/19/22 14:46, Johannes Weiner wrote: > Hi Nico, > > On Tue, Apr 19, 2022 at 02:11:53PM -0400, Nico Pache wrote: >> I think its is important to note the issue we are seeing has greatly improved >> since the initial posting. However we have noticed that the issue is still >> present (and significantly worse) when cgroupV1 is set. >> >> We were initially testing with CgroupV1 and later found that the issue was not >> as bad in CgroupV2 (but was still an noticeable issue). This is also resulting >> in the splitting of THPs in the host kernel. > > When swappiness is 0, cgroup limit reclaim has a fixed SCAN_FILE > branch, so it shouldn't ever look at anon. I'm assuming you're getting > global reclaim mixed in. Indeed, I think we can try harder not to swap > for global reclaim if the user asks for that. We aren't actually utilizing the cgroup mechanism; however, switching between the two has a noticeable affect on the global reclaim of the system. This is not a writeback case either-- The reproducer simply reads. So I think we can rule out the v2 writeback controller being involved. My initial patch was also targeting swappiness=0 but this also occurs when >0. > > Can you try the below patch? of course thanks for that :) I'll let you know how it goes! Cheers, -- Nico