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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B95ADC6FD1D for ; Tue, 4 Apr 2023 17:33:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236220AbjDDRd2 (ORCPT ); Tue, 4 Apr 2023 13:33:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236304AbjDDRdQ (ORCPT ); Tue, 4 Apr 2023 13:33:16 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBDA66E8E; Tue, 4 Apr 2023 10:32:39 -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-out2.suse.de (Postfix) with ESMTPS id 1656F2068F; Tue, 4 Apr 2023 17:32:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1680629531; 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=ZDEd2ByE3RJ/GX+wDkyEgy/kSR273UEz9enEYcMy1b8=; b=Rh0Y4PUmouQ4RsBeXmVM0zyk9aO9dNgz5lgJqiRROymxTIcq8mepaxm62rz47eD78YSCc8 N+f4YDtLQYOmbbnkmJLBZP1k25oDPW/cmNAkStneuDO2Rlp100x2xAs4rxoMS5ADGQHO/1 ESZfTdSKMrdNwWs8pTyYiI7mPWHJeys= 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 C0FC413920; Tue, 4 Apr 2023 17:32:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id cG9ILhpfLGRJQwAAMHmgww (envelope-from ); Tue, 04 Apr 2023 17:32:10 +0000 Date: Tue, 4 Apr 2023 19:32:09 +0200 From: Michal =?utf-8?Q?Koutn=C3=BD?= To: Shakeel Butt Cc: Yosry Ahmed , Tejun Heo , Josef Bacik , Jens Axboe , Zefan Li , Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , Andrew Morton , Vasily Averin , cgroups@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, bpf@vger.kernel.org, Michal Hocko Subject: Re: [PATCH v3 4/8] memcg: replace stats_flush_lock with an atomic Message-ID: <20230404173209.fuw2wdbhbzdgszc6@blackpad> References: <20230330191801.1967435-1-yosryahmed@google.com> <20230330191801.1967435-5-yosryahmed@google.com> <20230404165258.ie6ttxobbmgn62hs@blackpad> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tp4kmk7uybolwv2d" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org --tp4kmk7uybolwv2d Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 04, 2023 at 10:21:33AM -0700, Shakeel Butt wrote: > > Yes indeed it is. Basically we want to avoid unconditional cache > > dirtying. This pattern is also used at other places in the kernel like > > qspinlock. Thanks for confirmation. (I remembered the commit 873f64b791a2 ("mm/memcontrol.c: remove the redundant updating of stats_flush_threshold"). But was slightly confused why would it be open-coded every time.) > Oh also take a look at > https://lore.kernel.org/all/20230404052228.15788-1-feng.tang@intel.com/ Thanks for the link. Michal --tp4kmk7uybolwv2d Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTrXXag4J0QvXXBmkMkDQmsBEOquQUCZCxfFAAKCRAkDQmsBEOq ubDdAP9UYeeNxfHY8xeftxD/DsD9BcOlaSaQPTOhztUjOJOmEwD+PjYu9+lFlKNJ In8lwXw/ZwMTHOjEVMnHwxc+TNnpwQk= =LYWU -----END PGP SIGNATURE----- --tp4kmk7uybolwv2d--