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=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 A81CEC432BE for ; Mon, 9 Aug 2021 22:31:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3744E60F8F for ; Mon, 9 Aug 2021 22:31:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3744E60F8F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 6762E6B0071; Mon, 9 Aug 2021 18:31:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 626226B0072; Mon, 9 Aug 2021 18:31:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 514BE8D0001; Mon, 9 Aug 2021 18:31:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0037.hostedemail.com [216.40.44.37]) by kanga.kvack.org (Postfix) with ESMTP id 358726B0071 for ; Mon, 9 Aug 2021 18:31:30 -0400 (EDT) Received: from smtpin39.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id DF8A118233551 for ; Mon, 9 Aug 2021 22:31:29 +0000 (UTC) X-FDA: 78456989898.39.C0FE9EF Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf21.hostedemail.com (Postfix) with ESMTP id 99654D019628 for ; Mon, 9 Aug 2021 22:31:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628548289; 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=h0IrbGHuas1nNnO8JBZWCL0Gr/6ftbCs5KjGl2Z6+gw=; b=hpp/Pb9cB12r+fwxuDpIl4mAA9ZQztr7otwPMk1AQl2T1fSinrP6ZiL+TCsdEtSWQJUKbi lqtzl0ORzG8kPBKRSfeIf2Tr9As9FYZiNdY7EMEL5W3EAy+ARSxPeAsqTm9SEXyuufIkrK DlMSCg4dmEyWH14edNDfx92lv1JU6ks= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-100-_kFR7pQBOPuh1AaFcbDb8w-1; Mon, 09 Aug 2021 18:31:27 -0400 X-MC-Unique: _kFR7pQBOPuh1AaFcbDb8w-1 Received: by mail-qk1-f200.google.com with SMTP id w2-20020a3794020000b02903b54f40b442so13886053qkd.0 for ; Mon, 09 Aug 2021 15:31:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=h0IrbGHuas1nNnO8JBZWCL0Gr/6ftbCs5KjGl2Z6+gw=; b=OwLJISBCkyutbdKLVjjUv0HO+j54egCV9K6g3imBlGSKlXJzwsmchTczVlqwLsG3J1 PLlryTEcyDO7OvUp7ugtK3630Xpa6EDhLYdgaUhuFac10NnyvvrfmgpjqTZN1qonnkDm MJHUjNusr8/XrLFcMmQPgU3PGyLbT/HxKcKh/u2QoD/9BSEfE9tH63MqhTKWNUibiD3s rmgNI/2hV+IFWOZ1FCwVT9T+hQ5+hV2ySvRHxmwFYdXi6XPwlvsQE1/anCatg6vXeRzI qnqPS+lPA34XxuBT/qub78u2EHkRzMCeAvsl1sMXPPhPxja2D4avCGIYBdKJS0NUm7/x L8dA== X-Gm-Message-State: AOAM531dzYRwweGybRf2c3UPQyOHX/8clAfQzDxh6CakpuKQSsoc2HUd mZeG897kXlyxtBKSkjbAGudOO4937ypiPWj3nTUD4UoI7xZAmAahIZEUqXGKY2Vc7en6E7kX4rb ytOQ7E0Ha3B0= X-Received: by 2002:a05:622a:1106:: with SMTP id e6mr21967277qty.172.1628548287327; Mon, 09 Aug 2021 15:31:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPycnDHiYPL6a31SVTX6Z6ed2srcb++34DmueTwq0TlFWbTo44l36FO7A/a/2h7olBKZh6Eg== X-Received: by 2002:a05:622a:1106:: with SMTP id e6mr21967256qty.172.1628548287114; Mon, 09 Aug 2021 15:31:27 -0700 (PDT) Received: from ?IPv6:2601:184:4180:af10::540e? ([2601:184:4180:af10::540e]) by smtp.gmail.com with ESMTPSA id m197sm9910149qke.54.2021.08.09.15.31.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Aug 2021 15:31:26 -0700 (PDT) Subject: Re: [PATCH] vm_swappiness=0 should still try to avoid swapping anon memory To: Shakeel Butt Cc: Linux MM , Andrew Morton , LKML , Johannes Weiner , Rafael Aquini , Waiman Long , mhocko@suse.com References: <20210806231701.106980-1-npache@redhat.com> <91605888-e343-2712-c097-bcade4cb389d@redhat.com> From: Nico Pache Message-ID: <7301b496-d2fd-b5d1-8159-6613c958f487@redhat.com> Date: Mon, 9 Aug 2021 18:31:25 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 99654D019628 Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b="hpp/Pb9c"; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf21.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: mq6otc1isocgjumg7dyhjsy9acwhn6wt X-HE-Tag: 1628548289-902956 Content-Transfer-Encoding: quoted-printable 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: > First, the shrink_list() will not be called for anon LRU if get_scan_co= unt() > has decided to not scan the anon LRU. get_scan_count() will decide to scan the anon LRU if(sc->is_file_tiny) wh= ich is set in shrink_node(). =C2=A0In shrink_node() the MAY_DEACTIVATE/DEACTIVATE_ANON allows this the= be activated. > Second, I would like to get your attention to the following comment in > get_scan_count(): > > "Global reclaim will swap to prevent OOM even with no swappiness" AFAIK my patchset doesn't prevent any of the OOM cases. It only prevents = the anon workingset refaults from challenging the anon if swappiness=3D0.=C2=A0 > It seems like the behavior you are seeing is actually working as intend= ed. > You may decide to change that behavior but you will need to motivate th= e > change. My V3 has a lot more in the commit log. Hopefully it will clear up my mot= ivation. I will post that now.