Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp6329779rwl; Tue, 4 Apr 2023 10:55:28 -0700 (PDT) X-Google-Smtp-Source: AKy350Y7J3lW7OzYiSiRGYdtrqvzypWfmOES50fBQJXuMD91llQveWcXoTOrgWkcsYml2zx38qnq X-Received: by 2002:a05:6a21:869f:b0:da:a06f:7e91 with SMTP id ox31-20020a056a21869f00b000daa06f7e91mr2461844pzb.44.1680630928535; Tue, 04 Apr 2023 10:55:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680630928; cv=none; d=google.com; s=arc-20160816; b=u7Aipz2zjjesm9Gb/4WeKkjvDqt/yWmpqVwlSW74fFA1jjLPylK5q3uCMppNBdzQ1D L/VDavwB5FjlwKUMLToLcHiyurHgNxTPT/GIsIJB7EbjDwhtp1tl2Ly7PFLGEeJ7rfuJ x898fAS4mE3km1PU39jxqQZ9fTgRp1KX7lZK/qu8+EWr4V8DHln/X6H7DC3ZF1PRjcQ/ mSJoKvmMaiuK8bL+rQGhVlEMFSHaCZmEbjRhOwhHBqR5EYaDyCmaWTi30f322qRTmi9K huF5miTkcNLAlQ5D2vmmAVstFtteJpq+yvVisBWG+BtQed0TYnyjoMYxgOb8vuSoW6Ol B0tQ== 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=ZDEd2ByE3RJ/GX+wDkyEgy/kSR273UEz9enEYcMy1b8=; b=WoZZQFP5PMWlo2z06ducfF28PWbbBgYO9ZLb59972byGgywT44D9xLyqkZIUHtivbd clvJw+9N9uuD6bwmnIncO5VeqYLVNjLauS37aOEuwD8/rhghbSY0UFYlM+q47XLRSDbw 1wxde2zcPUL8vhRTlYEpkd6azjcrQBeJu0pFJ+2C23RftULtB7aUjotp5h8wXXt3pVso neQ+8Nnnj2fgPbQM2LOprI+ihLgf8qtkWHpuqi0kacJ0NbzX1iNR62BdVo2E5931LDWD D7bTahzlxV8IaULl9eaQq9ACWkMS2VXhITqyv/QSgogrP38c60zFdgTziq8oAI2yOOkU +ntg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Rh0Y4PUm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y1-20020a633201000000b0051344de5b95si10572556pgy.428.2023.04.04.10.55.16; Tue, 04 Apr 2023 10:55:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Rh0Y4PUm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236289AbjDDRda (ORCPT + 99 others); Tue, 4 Apr 2023 13:33:30 -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: X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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--