Received: by 10.192.165.148 with SMTP id m20csp908259imm; Wed, 25 Apr 2018 09:27:10 -0700 (PDT) X-Google-Smtp-Source: AB8JxZodopvBbIHqF/pDUbUw9STIXm6PMFsuI4MvfkLZ3Iv5zV/hFGkYGTY96hQW0lYYUtq98zy3 X-Received: by 2002:a17:902:7c94:: with SMTP id y20-v6mr2909849pll.56.1524673630807; Wed, 25 Apr 2018 09:27:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524673630; cv=none; d=google.com; s=arc-20160816; b=NF+U9sPjMYwcjC0eRH2/l/63zdx/i+zKOxSt+hfszyMDanoqhF5t1Exlth3+h3xrlz WMeg6VQEhO2iUsY1/NtoW2sqcvFVd1jmhLOmiAzdUNcdaUtIl4z2PoYFUPm6mobI7CzG J2l7RYun2pDoGdylpgN221NcTB5aEJ3BON94GkorUCTTNXtJnq+c8uds5uLHcjanpkz7 fP84Yk/tZjN7Jhv+UP9bemsOHpmt3/F5kdzWVS1fTSNHYjJ6mKqs8RQeXxBSqOancf6P XrX33DS3O7nY/9PrfO1C2qU5TdtGNnI4Fi2QmMDtsv08VJI77Ncl2duS0Wt2Qn7Jq+tg 7sOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=oMrcT6KL8TL126U4r/qW718g4n8bsyIoH2o3ibqv/wA=; b=oVNVRILmCxmHyP42LFuDLNKZPMtNfjQ8NCMp+j7SBClunIi/xnufQlm8wFee8oe5m4 Hgrw18ObPtVKuzPmx8kHm9qhLuvXUl7Wkt/AZ7N1S1OKdQHS7Wm0kQ480AYYVG8vJ95b /GDoEhrPVFB++8HR2FHvKXY1yYTiW/X9Ocl/dLIW9OvVTuOOqb46pI/6ZzIxQGQxiXSd oKPfC2ErID6ve3K1aU62XfUZtarXphwK0EvegNxoEAQdR/kjiKTvXdzkdwp5YTNqbitl iVOMoOst1nJFFe7SH9kfQfmdfO1OdTItqKXusZx4I36tHr74n+aWmlrvG3Yl8tv1rgzW PJgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g10-v6si17100769plb.272.2018.04.25.09.26.56; Wed, 25 Apr 2018 09:27:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755688AbeDYQUm (ORCPT + 99 others); Wed, 25 Apr 2018 12:20:42 -0400 Received: from mx2.suse.de ([195.135.220.15]:46054 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755196AbeDYPtc (ORCPT ); Wed, 25 Apr 2018 11:49:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1E217AE73; Wed, 25 Apr 2018 15:49:31 +0000 (UTC) Subject: Re: [PATCH 1/3] mm: introduce NR_INDIRECTLY_RECLAIMABLE_BYTES To: Roman Gushchin , Vijayanand Jitta Cc: vinayak menon , linux-mm@kvack.org, Andrew Morton , Alexander Viro , Michal Hocko , Johannes Weiner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, Linux API References: <20180305133743.12746-1-guro@fb.com> <20180305133743.12746-2-guro@fb.com> <08524819-14ef-81d0-fa90-d7af13c6b9d5@suse.cz> <20180411135624.GA24260@castle.DHCP.thefacebook.com> <46dbe2a5-e65f-8b72-f835-0210bc445e52@suse.cz> <20180412145702.GB30714@castle.DHCP.thefacebook.com> <69b4dcd8-1925-e0e8-d9b4-776f3405b769@codeaurora.org> <20180425125211.GB3410@castle> From: Vlastimil Babka Message-ID: Date: Wed, 25 Apr 2018 17:47:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180425125211.GB3410@castle> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/25/2018 02:52 PM, Roman Gushchin wrote: > On Wed, Apr 25, 2018 at 09:19:29AM +0530, Vijayanand Jitta wrote: >>>>>> Idk, I don't like the idea of adding a counter outside of the vm counters >>>>>> infrastructure, and I definitely wouldn't touch the exposed >>>>>> nr_slab_reclaimable and nr_slab_unreclaimable fields. >>>>> >>>>> We would be just making the reported values more precise wrt reality. >>>> >>>> It depends on if we believe that only slab memory can be reclaimable >>>> or not. If yes, this is true, otherwise not. >>>> >>>> My guess is that some drivers (e.g. networking) might have buffers, >>>> which are reclaimable under mempressure, and are allocated using >>>> the page allocator. But I have to look closer... >>>> >>> >>> One such case I have encountered is that of the ION page pool. The page pool >>> registers a shrinker. When not in any memory pressure page pool can go high >>> and thus cause an mmap to fail when OVERCOMMIT_GUESS is set. I can send >>> a patch to account ION page pool pages in NR_INDIRECTLY_RECLAIMABLE_BYTES. FYI, we have discussed this at LSF/MM and agreed to try the kmalloc reclaimable caches idea. The existing counter could then remain for page allocator users such as ION. It's a bit weird to have it in bytes and not pages then, IMHO. What if we hid it from /proc/vmstat now so it doesn't become ABI, and later convert it to page granularity and expose it under a name such as "nr_other_reclaimable" ? Vlastimil > Perfect! > This is exactly what I've expected. > >>> >>> Thanks, >>> Vinayak >>> >> >> As Vinayak mentioned NR_INDIRECTLY_RECLAIMABLE_BYTES can be used to solve the issue >> with ION page pool when OVERCOMMIT_GUESS is set, the patch for the same can be >> found here https://lkml.org/lkml/2018/4/24/1288 > > This makes perfect sense to me. > > Please, fell free to add: > Acked-by: Roman Gushchin > > Thank you! >