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 2D019C433FE for ; Mon, 14 Mar 2022 12:57:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 903A18D0005; Mon, 14 Mar 2022 08:57:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 88B368D0003; Mon, 14 Mar 2022 08:57:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 705C38D0005; Mon, 14 Mar 2022 08:57:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.26]) by kanga.kvack.org (Postfix) with ESMTP id 5D7258D0003 for ; Mon, 14 Mar 2022 08:57:13 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 27396246E8 for ; Mon, 14 Mar 2022 12:57:13 +0000 (UTC) X-FDA: 79242992346.13.6815765 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf29.hostedemail.com (Postfix) with ESMTP id 8D6C0120024 for ; Mon, 14 Mar 2022 12:57:12 +0000 (UTC) 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-out2.suse.de (Postfix) with ESMTPS id 3DEED1F391; Mon, 14 Mar 2022 12:57:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1647262631; 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=rDnjmno3RNaHoqZQk8WStttjohZNlh5HTFSnG4DmMuc=; b=mY8tCJ8kdj2//VBcpDAmvBBhExrUmqIb9QskcfqVQbsBuGJos52kN/oZy8yP8s3R3YkMAT 55/zyV4NfDXeabMudRc7XBOL6SWU7OgUWrhN5/gRR9UioEoI1goBUSum1ejzdOss6B/OHt 9gluR5EzP1m6EZGprUljPNBmw0yLXtU= 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 1825D13ADA; Mon, 14 Mar 2022 12:57:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Ua8+Bac7L2KtTgAAMHmgww (envelope-from ); Mon, 14 Mar 2022 12:57:11 +0000 Date: Mon, 14 Mar 2022 13:57:09 +0100 From: Michal =?iso-8859-1?Q?Koutn=FD?= To: Shakeel Butt Cc: Johannes Weiner , Michal Hocko , Roman Gushchin , Ivan Babrou , Frank Hofmann , Andrew Morton , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Daniel Dao , stable@vger.kernel.org Subject: Re: [PATCH] memcg: sync flush only if periodic flush is delayed Message-ID: <20220314125709.GA12347@blackbody.suse.cz> References: <20220304184040.1304781-1-shakeelb@google.com> <20220311160051.GA24796@blackbody.suse.cz> <20220312190715.cx4aznnzf6zdp7wv@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220312190715.cx4aznnzf6zdp7wv@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 8D6C0120024 X-Stat-Signature: t11w38sf8qex4z9mt1ws88bbaho6rahp Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=mY8tCJ8k; spf=pass (imf29.hostedemail.com: domain of mkoutny@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mkoutny@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-HE-Tag: 1647262632-207636 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: Hi 2. On Sat, Mar 12, 2022 at 07:07:15PM +0000, Shakeel Butt wrote: > It is (b) that I am aiming for in this patch. At least (a) was not > happening in the cloudflare experiments. Are you suggesting having a > dedicated high priority wq would solve both (a) and (b)? > [...] > > We can't argue what's the effect of periodic only flushing so this > > newly introduced factor would inherit that too. I find it superfluous. > > > Sorry I didn't get your point. What is superfluous? Let me retell my understanding. The current implementation flushes based on cumulated error and time. Your patch proposes conditioning the former with another time-based flushing, whose duration can be up to 2 times longer than the existing periodic flush. Assuming the periodic flush is working, the reader won't see data older than 2 seconds, so the additional sync-flush after (possible) 4 seconds seems superfluous. (In the case of periodic flush being stuck, I thought the factor 2=4s/2s was superfluous, another magic parameter.) I'm comparing here your proposal vs no synchronous flushing in workingset_refault(). > Do you have any strong concerns with the currect patch? Does that clarify? (I agree with your initial thesis this can be iterated before it evolves to everyone's satisfaction.) Michal