Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2226781pxy; Tue, 3 Aug 2021 00:29:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwx1636IYKDkuK7wIcTaYnJThuh2oYOEDwpvhzgHsp44Jjp3TbvnUMJQbEwZqbZNaDCcgSL X-Received: by 2002:a02:b798:: with SMTP id f24mr9735702jam.14.1627975742675; Tue, 03 Aug 2021 00:29:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627975742; cv=none; d=google.com; s=arc-20160816; b=gX2WQNGnGpO3FZUq4c9AJ6gZyWpJpyRUM6p7do87yFxkcanconVSC9dEAJw0QTdbas Nwo42E45Di6Brf017Yl9ZblHTv7k6+F/booqW1gdsNI5q0lLWFrtDbhcQTNy/ILc579B vaY3N0w1CBrHr9uHylxhyEqcZ4oA+GM30bx8BoAIZWOErANia7fOk/3K+8+LSsyVusIJ /iu5KT8WiXfttXKttPFA/2o/5d2fYoHJ5NFEC0z4fkdXlOhEU/WGSEAAcsY1qEdBS/Xr JnaWOXn+LsNhSiXSAPw5Q+AHXZ4aZSOhylKWzWWxeUjTKvuDyAujMgnH/z5v0zsbXLqH qiBg== 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=wuIGTu+T5iM4gV2NreSfqAlufJJUZ957ha88L+oyogc=; b=oVQ+7vOob31eihUWjpPb6yz72K7t+9aA6UJ576UD30f3S9yNP3ple7z+sEH6t7ZrhY ca57OMbHVxTCwKr+PfzIISlTaKcll6CVE0pOPu5QFXO54beP3feiN1zIoETRV/ixBtOi 0w0tQZb/XngVwd+6Fu2oG1I47s6NOqL/Mpgd2+02FfYPsQuCuhmUPbT6/zq2IieZD4fh pBWR67fu1Wh5zIJT5MrYVgjnhE4mOOC6Dl3bWQfZqjXjiVvNYw3cLNmR8Jx+zlCNAeZY P6796y5C+BMjG3XEvMZOb1ojoKMof8qyPXUnjDyakSjylN1VKP2CDwSzwQSD/Qwq4zCA QkRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=ffPnT6IT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l11si14631544ilo.83.2021.08.03.00.28.51; Tue, 03 Aug 2021 00:29:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=ffPnT6IT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234199AbhHCH2J (ORCPT + 99 others); Tue, 3 Aug 2021 03:28:09 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:42468 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234108AbhHCH2G (ORCPT ); Tue, 3 Aug 2021 03:28:06 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id B490C20010; Tue, 3 Aug 2021 07:27:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1627975674; 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=wuIGTu+T5iM4gV2NreSfqAlufJJUZ957ha88L+oyogc=; b=ffPnT6IT5q1xKUJXVgjcL901Ov2a69NYiPyHx1+Bs4Cbr4VGwvsntpN35cb37aoIkc3Ve7 XCP50BxcQfHCaDDVkfzq2BtntlqQVlQJxBA6jMJ8GH4XRw8lbKAoPq8r0B4SWLIiS5PFQ1 Mc+vR8f9wGNEVeByrJnEV2bgBgs2Z6I= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 9D9ADA3BC9; Tue, 3 Aug 2021 07:27:53 +0000 (UTC) Date: Tue, 3 Aug 2021 09:27:52 +0200 From: Michal Hocko To: Roman Gushchin Cc: Miaohe Lin , "hannes@cmpxchg.org" , "vdavydov.dev@gmail.com" , "akpm@linux-foundation.org" , "shakeelb@google.com" , "willy@infradead.org" , "alexs@kernel.org" , "richard.weiyang@gmail.com" , "songmuchun@bytedance.com" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "cgroups@vger.kernel.org" Subject: Re: [PATCH 2/5] mm, memcg: narrow the scope of percpu_charge_mutex Message-ID: References: <20210729125755.16871-1-linmiaohe@huawei.com> <20210729125755.16871-3-linmiaohe@huawei.com> <4a3c23c4-054c-2896-29c5-8cf9a4deee98@huawei.com> <95629d91-6ae8-b445-e7fc-b51c888cad59@huawei.com> <898130C3-FDF2-41C2-81DD-D33721C977C6@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <898130C3-FDF2-41C2-81DD-D33721C977C6@fb.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 03-08-21 07:13:35, Roman Gushchin wrote: > I’d go with atomic_dec(). which is not implying memory barriers either. You would need atomic_dec_return or some other explicit barrier IIRC. -- Michal Hocko SUSE Labs