Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2700496rdb; Tue, 12 Sep 2023 09:27:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFzFoWfQ3dEjYZHHXqzwWU+mrw43Km3/V4vV3X++7x7qDgR/ObpRSnlMIFx2AYoO64x2Ybl X-Received: by 2002:a17:902:ea0f:b0:1bc:56c3:ebb6 with SMTP id s15-20020a170902ea0f00b001bc56c3ebb6mr137671plg.8.1694536063537; Tue, 12 Sep 2023 09:27:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694536063; cv=none; d=google.com; s=arc-20160816; b=mjF9RxPYig5jPZghmbI241xssNj4FXPlfruEilAOxxlhjgXIOghV28vFesycUb+W5h EEMAnlH9RlIq7/U3vvlPyoJiAIaGU45tlg2RVv42n40vcjgsiEK5sCAEdaEtV4Bd+8Gw +NqQmjCvrqzqsXjGHmnj/BuADYfQsXDd8uhJGMBU67V+bxuUZ3B+R0XgnqHsGQ053Ul1 Eyb+NH5RTRoPzSHEKpkZpysuX/4RpWKjLCwekjab/qOqP39zoR68kib7dIZ9XErEwg9n H6fXj5ND8S5W91/yoCwAzFDXG3TXNR6zu23dsPq/D3HJ9G5d7X/iZP06CaLnwFs4fnTX qfQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=PlNpuPSqWIqOE0DwsvfoNnsmeYOzW02ShwOmRdVvGGY=; fh=djplMUzSZSEbIy8PO+n/aQW964e923vv+qgHKYxSmu4=; b=f0YkyKqqWgJd2ntmUAbWAFOeuLvE33+9j22PiddE6dNub4G1uUFn85ypd7bQRIYGVz yFfyzd87EcEPmRQ8/4VlhlN0rJlY4Fx6PhTM09Ci6FVzLQteMY0gURjUCugvNdoTSseU ijhkuEmJMW8wg02XqeP1+T2cuGwf6mRTXlwnwesBNbMm0WB6d5U5jEOpfTlBm9mWG56x swgVwjjOpdUdS+dO26D7dK+nxs4Rl5+p6gMqxkOrZwLQ9qpHJKCEWRcRQm6W0apReaQD 8IbQIs7iweoUv7uqTVBtRPA7k8BePonpQbaP7ChWXdiaSiAzdJdaQ+3UmltnNXhOjnmb guuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=MhPUvXVF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id cp9-20020a170902e78900b001bc079974dbsi8314067plb.355.2023.09.12.09.27.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 09:27:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=MhPUvXVF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 872C480E4FCA; Tue, 12 Sep 2023 04:03:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.8 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234249AbjILLDo (ORCPT + 99 others); Tue, 12 Sep 2023 07:03:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233867AbjILLD1 (ORCPT ); Tue, 12 Sep 2023 07:03:27 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93F2F9F; Tue, 12 Sep 2023 04:03:22 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4CB7F212AE; Tue, 12 Sep 2023 11:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1694516601; h=from:from:reply-to: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=PlNpuPSqWIqOE0DwsvfoNnsmeYOzW02ShwOmRdVvGGY=; b=MhPUvXVFP4OmyPGqhryRQRDMUAdVx6IyQ77oN9SuE0NTFREpi/Hr63l8a46k1tz1U6gLxS spIv8n4MmEY/r1mNnpLOYB6XQ9CYXFhXwTf5u7t1Eg6gr5jSeOSbdW+0fZMDkMZuCfz0OC TIHai/JH/h+g3ExVXULDJaSjK/ypAhI= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 3B49A13A39; Tue, 12 Sep 2023 11:03:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Ks1SDXlFAGUfaAAAMHmgww (envelope-from ); Tue, 12 Sep 2023 11:03:21 +0000 Date: Tue, 12 Sep 2023 13:03:20 +0200 From: Michal Hocko To: Yosry Ahmed Cc: Michal =?iso-8859-1?Q?Koutn=FD?= , Andrew Morton , Johannes Weiner , Roman Gushchin , Shakeel Butt , Muchun Song , Ivan Babrou , Tejun Heo , Waiman Long , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 3/4] mm: memcg: let non-unified root stats flushes help unified flushes Message-ID: References: <20230831165611.2610118-1-yosryahmed@google.com> <20230831165611.2610118-4-yosryahmed@google.com> <6tne52ip62ucev7nmnim3m7fhcydnwcytyxynrlxxgaf4cbqea@r4hec425izap> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 12 Sep 2023 04:03:54 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email On Tue 05-09-23 08:54:46, Yosry Ahmed wrote: > On Tue, Sep 5, 2023 at 7:10 AM Michal Koutný wrote: > > > > On Mon, Sep 04, 2023 at 05:41:10PM +0200, Michal Hocko wrote: > > > So it also creates an undocumented but userspace visible behavior. > > > Something that userspace might start depending on, right? > > > > Yes but - > > - depending on undocumented behavior is a mistake, > > - breaking the dependency would manifest (in the case I imagine) as a > > performance regression (and if there are some users, the future can > > allow them configuring periodic kernel flush to compensate for that). > > I think I am missing something. This change basically makes userspace > readers (for the root memcg) help out unified flushers, which are > in-kernel readers (e.g. reclaim) -- not the other way around. > > How would that create a userspace visible behavior that a dependency > can be formed on? Users expecting reclaim to be faster right after > reading root stats? I would guess that would be too flaky to cause a > behavior that people can depend on tbh. Flaky or not, it might cause behavior difference and a subtle one. I can imagine nohz and similar workloads wanting to (ab)use this to reduce kernel footprint. If we really need this then make it obvious in the changelog at least. -- Michal Hocko SUSE Labs