From: David Rientjes Subject: Re: [PATCH v5] mm: vmpressure: don't count proactive reclaim in vmpressure Date: Thu, 28 Jul 2022 14:45:24 -0700 (PDT) Message-ID: <539ddf30-160b-848d-5249-770963cba5ab@google.com> References: <20220721173015.2643248-1-yosryahmed@google.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=syTibly++ru0N5dyOkn/AFiof+YpFKyPJXjkdOxn6gY=; b=L3hxNosa6HA4NUd9AdAGbBt8zqIgmzSokN+t1MndZ5DH+YwDHtTfwjQ7ysWwnOQu6U egZdf6+7EyjXaFe8p/GKWXn8F0H28Ca6aTuWXhOncQugzVRY7tt/l0KTPDx4j1yBxsWK E49Vyt/Z8IBHE1uHPCIvfiV1tH2r9WVENn9uiVQuLzc8vunUHnqf3qUrNj44eE2rLws6 RXyOv6WOCR3tsS0OuyVcYEdEBXqUUFr6v9FxyaOwGAg4Y8XlWcfUYCSq/vk6Y6jhZG/u Mz1IGyYWm+1WWkTEwb3VTI5ZrVMF7ALXOpCZQrvhwaQWGQHwpSFM5L43t3BqBH4+BmTG ymew== In-Reply-To: <20220721173015.2643248-1-yosryahmed-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Yosry Ahmed Cc: Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Andrew Morton , Matthew Wilcox , Vlastimil Babka , David Hildenbrand , Miaohe Lin , NeilBrown , Alistair Popple , Suren Baghdasaryan , Peter Xu , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org On Thu, 21 Jul 2022, Yosry Ahmed wrote: > memory.reclaim is a cgroup v2 interface that allows users to > proactively reclaim memory from a memcg, without real memory pressure. > Reclaim operations invoke vmpressure, which is used: > (a) To notify userspace of reclaim efficiency in cgroup v1, and > (b) As a signal for a memcg being under memory pressure for networking > (see mem_cgroup_under_socket_pressure()). > > For (a), vmpressure notifications in v1 are not affected by this change > since memory.reclaim is a v2 feature. > > For (b), the effects of the vmpressure signal (according to Shakeel [1]) > are as follows: > 1. Reducing send and receive buffers of the current socket. > 2. May drop packets on the rx path. > 3. May throttle current thread on the tx path. > > Since proactive reclaim is invoked directly by userspace, not by > memory pressure, it makes sense not to throttle networking. Hence, > this change makes sure that proactive reclaim caused by memory.reclaim > does not trigger vmpressure. > > [1] https://lore.kernel.org/lkml/CALvZod68WdrXEmBpOkadhB5GPYmCXaDZzXH=yyGOCAjFRn4NDQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org/ > > Signed-off-by: Yosry Ahmed Acked-by: David Rientjes