From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41F2224397A for ; Tue, 13 May 2025 13:05:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747141529; cv=none; b=uIazGBV0mIhkX7NzkmJwsyghRMsSwhWhTDkSkQPAaTFNtkHhajU5j8Ufxs3Lh7eaoWaLIcjhG8MDMEoNgR01aOiQi6dy6OXXu+8J6LH5CSB69WZVw+HVYO4LbAcBTrdNno+Ah/kBI+FCQQ8WGfyTSc90ld4Nq2+6EaOFwQ9fVEQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747141529; c=relaxed/simple; bh=FIJRMeYqArw7tYNudfdvcpb3fyaE5SzBJpqnuTVPs0M=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=u0dQIgNLP7qmQz3B7cYCd5drMqsdomMgYSA+2Ge4ooMS7XVxRILdU7EX8oyvstWuRfN1pmakqRkDt+avkczvGzaIzODyJJaT+iJggRyB/HzbBmjJ5rWG4MSF5d5OOfHyo0kPreDlMpMaE2484qt5liEfcpdBypwJWBK5nQy2+Xg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=kdd3OXEr; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=kTnCzx2N; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=KDOh7/F0; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=WeCsdAM8; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="kdd3OXEr"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="kTnCzx2N"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="KDOh7/F0"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="WeCsdAM8" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 1AF211F792; Tue, 13 May 2025 13:05:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1747141526; 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=iRWUYikOIy/1r7u07D5ZCje1j34KlJyLQzknjjGOicY=; b=kdd3OXErue0VlynjlAhmsosCko1ctbMupCP7zksbeMwhVnc9QOlh2VtmkE9Zt3glm2rPsO Ej+vKj4k6yc7Hrz9Cu+mwD6G/ZJx3Ei/6FBxjxtVh73s0Tv/oNn52KfFUrRMWxYmZRWL+h SQdyEoLqYtiCbfvtxQczOkUfH9QL9GU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1747141526; 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=iRWUYikOIy/1r7u07D5ZCje1j34KlJyLQzknjjGOicY=; b=kTnCzx2NBr9RUocyWdZITzopFDyYszz7wpbGJRMZatBsbtd64JTGImmN/6vcRvY7xAQ7bW nwfqch0H9bcmqVDA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1747141525; 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=iRWUYikOIy/1r7u07D5ZCje1j34KlJyLQzknjjGOicY=; b=KDOh7/F0eM08rczbeQl8PDsy52saiIb5A5bQZff/FYhwX5npXyDzt30hIopKMphMu8JPqR 3VKZpmyTvwxz71/dyenSggvy3Tyh/ExbVNlRH8BD1maJasHhZPFew3G43W2PxLLmlnN6sd XqrRRWwHa3wgLLecx+V2J2GBrkVFT4I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1747141525; 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=iRWUYikOIy/1r7u07D5ZCje1j34KlJyLQzknjjGOicY=; b=WeCsdAM8aKEoA2ktaw+PoaIs0o764iCzfypdOFIZSen0MuyAFeCs9Jwd20uJDN43bNJQrh CyOLcasLEDPiazAQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E6AC1137E8; Tue, 13 May 2025 13:05:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id TqprN5RDI2gjUwAAD6G6ig (envelope-from ); Tue, 13 May 2025 13:05:24 +0000 Message-ID: <44489dcf-2bb1-45f3-a593-ac34da3f9138@suse.cz> Date: Tue, 13 May 2025 15:05:24 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH 6/7] memcg: objcg stock trylock without irq disabling Content-Language: en-US To: Shakeel Butt , Andrew Morton Cc: Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , Alexei Starovoitov , Sebastian Andrzej Siewior , Harry Yoo , Yosry Ahmed , bpf@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Meta kernel team References: <20250513031316.2147548-1-shakeel.butt@linux.dev> <20250513031316.2147548-7-shakeel.butt@linux.dev> From: Vlastimil Babka In-Reply-To: <20250513031316.2147548-7-shakeel.butt@linux.dev> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Level: X-Spam-Flag: NO X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCPT_COUNT_TWELVE(0.00)[15]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[linux.dev:email,imap1.dmz-prg2.suse.org:helo,suse.cz:mid,suse.cz:email] X-Spam-Score: -4.30 On 5/13/25 05:13, Shakeel Butt wrote: > There is no need to disable irqs to use objcg per-cpu stock, so let's > just not do that but consume_obj_stock() and refill_obj_stock() will > need to use trylock instead to keep per-cpu stock safe. One consequence I'd rather say "to avoid deadlock". > of this change is that the charge request from irq context may take > slowpath more often but it should be rare. > > Signed-off-by: Shakeel Butt Acked-by: Vlastimil Babka