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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06FF8C4338F for ; Tue, 3 Aug 2021 07:28:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DFE2260F8F for ; Tue, 3 Aug 2021 07:28:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234212AbhHCH2L (ORCPT ); Tue, 3 Aug 2021 03:28:11 -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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Hocko Subject: Re: [PATCH 2/5] mm, memcg: narrow the scope of percpu_charge_mutex Date: Tue, 3 Aug 2021 09:27:52 +0200 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-Transfer-Encoding: quoted-printable Return-path: 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= Content-Disposition: inline In-Reply-To: <898130C3-FDF2-41C2-81DD-D33721C977C6-b10kYP2dOMg@public.gmane.org> List-ID: Content-Type: text/plain; charset="windows-1252" To: Roman Gushchin Cc: Miaohe Lin , "hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org" , "vdavydov.dev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" , "akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org" , "shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org" , "willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org" , "alexs-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org" , "richard.weiyang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" , "songmuchun-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org" , "linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" On Tue 03-08-21 07:13:35, Roman Gushchin wrote: > I=E2=80=99d go with atomic_dec(). which is not implying memory barriers either. You would need atomic_dec_return or some other explicit barrier IIRC. --=20 Michal Hocko SUSE Labs