Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp425543rdb; Thu, 5 Oct 2023 09:43:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGA7VYnQ4m9WL3lxDAlJh63Tj7ABdGk6FpzkhFtJf1eZBGVhI5doT+v4fvJR6kn5Z9U/Yp2 X-Received: by 2002:a05:6808:20a2:b0:3ae:52f3:ba19 with SMTP id s34-20020a05680820a200b003ae52f3ba19mr7068293oiw.38.1696524232494; Thu, 05 Oct 2023 09:43:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696524232; cv=none; d=google.com; s=arc-20160816; b=i+Om1o96TpXomnn+43xpxlyYVVWtXTITxy4n3ZH2j0RnrG0HgkSuusbqzNLx2lSzHc O2IC07r2ZfZ4vfp0rZUEmKzaxYc8cpNzqUuH1AG0jHssE20nshirli+y9j07pQ78ZZZh M+4DyD4CCXkxL1F+k5sID05b7GNXLwXVWdLGQSsKQOYaaBR2Rd19fFvC7S+vk6qxa5sS UpzvJZx1dkGdaVs+wtYcS06jYw5aUjtxr00QzAmRMtAeRdNoFqectHoTWP1/qmsG5Gvj J3TB5c9IENHezx7JEQ9h9zYi7mCgHvgqC3CD4TzWlRjZpKnWSZr601sb2C07KF6jTk0h rfYg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=sL+tYRULSD7EToNAPlVDPfOq2xfKv5cMBZyMAxFpTd0=; fh=skOs0K2jkfOYz3M4Me6YTTtwfpmM80YZH1mN6TVpMOs=; b=i9ngfY2n8tvu8VxsZKLlbrQVbpzGEBg2ZoYLXFxNBN/c43fc8Fgo0OE33mOm3RtTKx Aufm83q77tDoPV4kQFtZnQmAK/1gtcaDqy9q5w7tvl1Rz1189GAi5/PF9xupZSPqaEUq evtMBYcFu4NAHyf8Xi8FYEKKE4X9AM2jomn08UeJAoHyG9r0w7vYTtOIsVITr3e350FX cxU+lfsXSAADIFAxlBl4GAfuqwJqBWTL11/+zSBA/cc/vJxCI+1cpp4wrOtCjegykZ6K qpV8cO3FEdQe72k6ZVJZ4CVevRUB0nQK0QwdaGm1D6WDNlUYNXnoj5jJ/kWwDS7gje74 Dknw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=UZZ53f4T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id 79-20020a630152000000b0056546b5fef5si1799792pgb.561.2023.10.05.09.43.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 09:43:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=UZZ53f4T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id A087482A2C2C; Thu, 5 Oct 2023 09:43:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229613AbjJEQnc (ORCPT + 99 others); Thu, 5 Oct 2023 12:43:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232409AbjJEQlg (ORCPT ); Thu, 5 Oct 2023 12:41:36 -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 84A1B6700; Thu, 5 Oct 2023 09:30:48 -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 17A2A21891; Thu, 5 Oct 2023 16:30:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1696523427; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sL+tYRULSD7EToNAPlVDPfOq2xfKv5cMBZyMAxFpTd0=; b=UZZ53f4TXC5JQzxPTJ9sLJfQTWS3CHG7J8bELDoeC52FohqWngE6Go84OsbBcs18zx/tPg e5M/41FvvX8womtQdSKsxYi0bFAdB/t+eq3mRTBA07sUbO1T5qNkdIjQGpAjIo6t2LCVYz Oj/tDV+FGnqaWVHlB5JZXOiyCNYR0TM= 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 DB069139C2; Thu, 5 Oct 2023 16:30:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id rTedNKLkHmU4dQAAMHmgww (envelope-from ); Thu, 05 Oct 2023 16:30:26 +0000 Date: Thu, 5 Oct 2023 18:30:25 +0200 From: Michal =?utf-8?Q?Koutn=C3=BD?= To: Yosry Ahmed Cc: Johannes Weiner , Andrew Morton , Shakeel Butt , Michal Hocko , Roman Gushchin , Muchun Song , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] mm: memcg: refactor page state unit helpers Message-ID: <4h5uae72ti6jyiibcyfg2bytooy6d6ggtkrgod5a6rmpateyra@4setu5jmd5kn> References: <20230922175741.635002-1-yosryahmed@google.com> <20230922175741.635002-2-yosryahmed@google.com> <20231004183619.GB39112@cmpxchg.org> <542ggmgjc27yoosxg466c6n4mzcad2z63t3wdbzevzm43g7xlt@5l7qaepzbth6> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tpu3njifk2lp5cu6" Content-Disposition: inline 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 (howler.vger.email [0.0.0.0]); Thu, 05 Oct 2023 09:43:50 -0700 (PDT) --tpu3njifk2lp5cu6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 05, 2023 at 02:31:03AM -0700, Yosry Ahmed wrote: > I am not really sure what you mean here. My "vision" is to treat WORKINGSET_ entries as events. That would mean implementing per-node tracking for vm_event_item (costlier?). That would mean node_stat_item and vm_event_item being effectively equal, so they could be merged in one. That would be situation to come up with new classification based on use cases (e.g. precision/timeliness requirements, state vs change semantics). (Do not take this as blocker of the patch 1/2, I rather used the opportunity to discuss a greater possible cleanup.) > We don't track things like OOM_KILL and DROP_PAGECACHE per memcg as > far as I can tell. Ah, good. (I forgot only subset of entries is relevant for memcgs.) > This will mean that WORKINGSET_* state will become more stale. We will > need 4096 as many updates as today to get a flush. These are used by > internal flushers (reclaim), and are exposed to userspace. I am not > sure we want to do that. snapshot_refaults() doesn't seem to follow after flush and workigset_refault()'s flush doesn't seem to preceed readers Is the flush misplaced or have I overlooked something? (If the former, it seems to work good enough even with the current flushing heuristics :-)) Michal --tpu3njifk2lp5cu6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQpEWyjXuwGT2dDBqAGvrMr/1gcjgUCZR7knwAKCRAGvrMr/1gc jmuCAQDLOZF2u7hvOxa6XliRfkYY1Be/D0QEHOZynh1+OxsDKQD/aGTjJFAWvb5D qEcqxkg0fd9+iYdI1PSQdU3ICEFERAs= =t1Ez -----END PGP SIGNATURE----- --tpu3njifk2lp5cu6--