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 97979C04A68 for ; Thu, 28 Jul 2022 21:45:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CC5076B0071; Thu, 28 Jul 2022 17:45:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C4D658E0001; Thu, 28 Jul 2022 17:45:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AC6946B0073; Thu, 28 Jul 2022 17:45:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 96D266B0071 for ; Thu, 28 Jul 2022 17:45:27 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 6DB2CC0F9B for ; Thu, 28 Jul 2022 21:45:27 +0000 (UTC) X-FDA: 79737840294.29.ED6505A Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by imf08.hostedemail.com (Postfix) with ESMTP id B342D160032 for ; Thu, 28 Jul 2022 21:45:25 +0000 (UTC) Received: by mail-pl1-f178.google.com with SMTP id o3so2919711ple.5 for ; Thu, 28 Jul 2022 14:45:26 -0700 (PDT) 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=syTibly++ru0N5dyOkn/AFiof+YpFKyPJXjkdOxn6gY=; b=IxHNF2HdPP5m8hF35zGYaUQkvRzZxl/9xBOZeBwahIYB2QogR5X+6t4MVBh/Wrxu8o ncQ9mw/pp9W/5XvVoYwnqzIffpxOJIe4unsiQfQ8HJR2jNFO8JG3i0vsXlOGtvopkl5A yR+xWsJ7e31P0Ubu8Llz+FIIHnWlrOek0ZMXsnM+GeprbTu4+0kmTPRF2fTnyi6kfBjy /Z6qLCD9xjIZ6B3bVnAZTv/fLtG9hMpwjJBRjcl5xajDFzG6vC62/ZKXJcf+Xubgebag IlavG10Rk6cJw8PC3DA1XKglV3y2veezsiCuf7E62Qi6cRYqQ/dkIXlbDmt9T9wLGsEa MRGQ== X-Gm-Message-State: ACgBeo3HUmV+mkDZnlbR5x/U2xd1QBERmPaGaGFvKyxVkzDJAmisrw+Y RqMrD28EMe0BhiNpxYzlwRSiiA== X-Google-Smtp-Source: AA6agR4eChmymv69Y/dyrU+TW7AUx28+KYMTAoj0VCS7id8iD24Ny/uX3oO4MgWwj+9zXsJk8i8qbw== X-Received: by 2002:a17:902:f70d:b0:16c:50a2:78d1 with SMTP id h13-20020a170902f70d00b0016c50a278d1mr784242plo.34.1659044725833; Thu, 28 Jul 2022 14:45:25 -0700 (PDT) Received: from [2620:15c:29:203:7a4b:8126:8bad:d042] ([2620:15c:29:203:7a4b:8126:8bad:d042]) by smtp.gmail.com with ESMTPSA id h131-20020a628389000000b00528d880a32fsm1264930pfe.78.2022.07.28.14.45.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jul 2022 14:45:25 -0700 (PDT) Date: Thu, 28 Jul 2022 14:45:24 -0700 (PDT) From: David Rientjes 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@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v5] mm: vmpressure: don't count proactive reclaim in vmpressure In-Reply-To: <20220721173015.2643248-1-yosryahmed@google.com> Message-ID: <539ddf30-160b-848d-5249-770963cba5ab@google.com> References: <20220721173015.2643248-1-yosryahmed@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=L3hxNosa; spf=pass (imf08.hostedemail.com: domain of rientjes@google.com designates 209.85.214.178 as permitted sender) smtp.mailfrom=rientjes@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1659044727; a=rsa-sha256; cv=none; b=iAj/iflF+m7+Q2uLhbqLs06D32fvTh+bJUOtqMJfDCFPu3tRahUN4gKsdaVwFKKRHcRuC6 utZep8xkqcKQwKJh5HwVw8+Ko49//bkfhEw+/o4jrger841ubCzcFvckGEXM7qLVOsimJA am+eYGGZmd7HqWGna3x8jbw+eaGZ584= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1659044727; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=syTibly++ru0N5dyOkn/AFiof+YpFKyPJXjkdOxn6gY=; b=rgTYs7PnGPndm9JF7YNvF1z+01zY93eFgQSUDiUjJRD5pYvBf7r0csWzZVN4kShy8N+ddQ aJw473ahfoPdsqqAS60HvIC6B+EjHkt5geAMSEz2ZwmrfLy4AfzYkOynCEPswIFlTdW2yf 4AXsni5oNLkNSg6GfgS0R1p+4yWqM94= Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=L3hxNosa; spf=pass (imf08.hostedemail.com: domain of rientjes@google.com designates 209.85.214.178 as permitted sender) smtp.mailfrom=rientjes@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam04 X-Rspam-User: X-Stat-Signature: xmtnfx6ydbtk3ag4tgrbkajotwngwxso X-Rspamd-Queue-Id: B342D160032 X-HE-Tag: 1659044725-992303 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: 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@mail.gmail.com/ > > Signed-off-by: Yosry Ahmed Acked-by: David Rientjes