From: Michal Hocko Subject: Re: [PATCH 1/9] memcg: accounting for allocations called with disabled BH Date: Wed, 10 Mar 2021 10:42:29 +0100 Message-ID: References: <18a0ae77-89ff-2679-ab19-378e38ce2be2@virtuozzo.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1615369350; 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=8qLZFJropWuTtqmng7j/uyvEO07U2wdIf80qxM4muyg=; b=lSDSOY1L1zj619JWFQuby2KTVCU26IkluUftoipiD8kBZ1LPFlwt1muJ5NEedjn9QC6ilf rWkTetl8hkNmE3ozGWCjgdUIlKwqEPldWEixmPPq2A/sY+d96fK2bhje1TWQD+3g5v7th+ c/t0DM9sMHrxxJW3Ni07ZgbOalDRRtA= Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Roman Gushchin Cc: Shakeel Butt , Vasily Averin , Cgroups , Linux MM , Johannes Weiner , Vladimir Davydov On Tue 09-03-21 12:18:28, Roman Gushchin wrote: > On Tue, Mar 09, 2021 at 11:39:41AM -0800, Shakeel Butt wrote: > > On Tue, Mar 9, 2021 at 12:04 AM 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 > > > > > > Signed-off-by: Vasily Averin > > > > In that file in_interrupt() is used at other places too. Should we > > change those too? > > Yes, it seems so. Let me prepare a fix (it seems like most of them were > introduced by me). Does this affect any existing in-tree users? -- Michal Hocko SUSE Labs