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 1FD9EC433E0 for ; Wed, 10 Mar 2021 09:40:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9C70664F6F for ; Wed, 10 Mar 2021 09:40:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C70664F6F Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 1F8EE8D018C; Wed, 10 Mar 2021 04:40:52 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1822E8D0148; Wed, 10 Mar 2021 04:40:52 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 04B618D018C; Wed, 10 Mar 2021 04:40:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0112.hostedemail.com [216.40.44.112]) by kanga.kvack.org (Postfix) with ESMTP id DC2C88D0148 for ; Wed, 10 Mar 2021 04:40:51 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 9914D82499A8 for ; Wed, 10 Mar 2021 09:40:51 +0000 (UTC) X-FDA: 77903470302.23.4A6E3F7 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf11.hostedemail.com (Postfix) with ESMTP id 02AD72000382 for ; Wed, 10 Mar 2021 09:40:45 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1615369249; 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=zJQKktVYa3wa84qF+w5uVWbmtWsIJNjcXAKfh49Oeg0=; b=lix1ZQuYOb0cawiXu49zLpcCqr6ijVItGWAnwRq3PyFfThUwOVpiUwq6eEW+kNg4T9R4so BHKv13KSMBBciefgN1EaapJx5D07GRbt4KEcM5FfnYALh/CsujRgwPWSv+iGbf9D9au+pd tCxUlh2ZwnkogyNAYGm/5yBDTwMf+7A= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id BFB5BAE42; Wed, 10 Mar 2021 09:40:49 +0000 (UTC) Date: Wed, 10 Mar 2021 10:40:49 +0100 From: Michal Hocko To: Vasily Averin Cc: cgroups@vger.kernel.org, linux-mm@kvack.org, Johannes Weiner , Vladimir Davydov Subject: Re: [PATCH 1/9] memcg: accounting for allocations called with disabled BH Message-ID: References: <18a0ae77-89ff-2679-ab19-378e38ce2be2@virtuozzo.com> <60275aa1-082e-af13-b048-76c5a5cf18fb@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <60275aa1-082e-af13-b048-76c5a5cf18fb@virtuozzo.com> X-Stat-Signature: mfo9dpzoacodih53ds5jfyixd4mt1umi X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 02AD72000382 Received-SPF: none (suse.com>: No applicable sender policy available) receiver=imf11; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615369245-452261 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: On Wed 10-03-21 12:11:26, Vasily Averin wrote: > On 3/9/21 5:57 PM, Michal Hocko wrote: > > On Tue 09-03-21 11:03:48, Vasily Averin wrote: > >> in_interrupt() check in memcg_kmem_bypass() is incorrect because > >> it does not allow to account memory allocation called from task context > >> with disabled BH, i.e. inside spin_lock_bh()/spin_unlock_bh() sections > > > > Is there any existing user in the tree? Or is this more of a preparatory > > patch for a later one which will need it? In other words, is this a bug > > fix or a preparatory work. > > struct fib6_node objects are allocated by this way > net/ipv6/route.c::__ip6_ins_rt() > ... write_lock_bh(&table->tb6_lock); > err = fib6_add(&table->tb6_root, rt, info, mxc); > write_unlock_bh(&table->tb6_lock); > > I spend some time to understand why properly entries from properly configured cache > was not accounted to container's memcg. OK, that is a valuable information. If there are no other users currently then I would recommend squashing this patch into the one which introduces accounting for fib6_node cache (patch 2, IIUC). -- Michal Hocko SUSE Labs