From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-172.mta1.migadu.com (out-172.mta1.migadu.com [95.215.58.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06C3F13AA53 for ; Tue, 18 Mar 2025 01:07:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742260059; cv=none; b=IgSVUboAS2gbiD0hHrDLRo3E1Vll6hNFJr5mvknCabXZiFPYAoYpFfirtSpFXS57BuQaEiKdFmUnPOwl6hP1Z7wOJHgxq90L9BvlFCf0Iq0b1tjlaokA3hmnayBF+O3SrISkQJzpBFLkILeacsFy0f9/Koj60yAwZOQp4PuHW4M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742260059; c=relaxed/simple; bh=o3ntH+VyxBbQxuXAIdQdU6Z4EDjFyFPzkvUVQn5XsYc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gyOTqo3MZlcxEfIz3NFpRjBUCfcgDJfMoXNYC1tNuVsUJBvD/7A0N0y7It67BR5jLFEXFPHadVv6QRdajhD9bUjBkpDMyxNeRTCT/yYiijowJLN4Khlc94IMzob7+MarIhhBa5fci0AHL4Zx9T0HajolHqZuq5McHN+EOHhUu+4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=BAxalUnB; arc=none smtp.client-ip=95.215.58.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="BAxalUnB" Date: Tue, 18 Mar 2025 01:07:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1742260046; h=from:from:reply-to:subject:subject: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=9mPeLIacidUCCPqGAAEH/lqRKjMQTyR3oZRrUoAsBGw=; b=BAxalUnByRD9ldhNz0FH+D2OiWjrXYA+0FmMAzx1K8mp1ZMvRk2BimXfnmVvfghjfnlRfO yFMkgKFnWXYFg7rF3TzWlScC79a7uk3NOcz9RRlvmi2XcT7w3G74o4/e/lNigrxoK5COcX iz9PX83xKCCNSrblZ9Ny/rcQiKiwVzs= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Shakeel Butt Cc: Andrew Morton , Johannes Weiner , Michal Hocko , Muchun Song , Vlastimil Babka , Sebastian Andrzej Siewior , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Meta kernel team Subject: Re: [PATCH 6/9] memcg: do obj_cgroup_put inside drain_obj_stock Message-ID: References: <20250315174930.1769599-1-shakeel.butt@linux.dev> <20250315174930.1769599-7-shakeel.butt@linux.dev> Precedence: bulk X-Mailing-List: cgroups@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250315174930.1769599-7-shakeel.butt@linux.dev> X-Migadu-Flow: FLOW_OUT On Sat, Mar 15, 2025 at 10:49:27AM -0700, Shakeel Butt wrote: > Previously we could not call obj_cgroup_put() inside the local lock > because on the put on the last reference, the release function > obj_cgroup_release() may try to re-acquire the local lock. However that > chain has been broken. Now simply do obj_cgroup_put() inside > drain_obj_stock() instead of returning the old objcg. > > Signed-off-by: Shakeel Butt Nice one too! Reviewed-by: Roman Gushchin