From: Valentin Schneider Subject: Re: [PATCH v5 2/6] mm/memcg: Disable threshold event handlers on PREEMPT_RT Date: Thu, 02 Mar 2023 19:52:11 +0000 Message-ID: References: <20220226204144.1008339-1-bigeasy@linutronix.de> <20220226204144.1008339-3-bigeasy@linutronix.de> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677786735; 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=KwpX3YFb316Y6Yz0MMigE20cUWOeVNyriSBJ2SDd4TE=; b=GqtNoW/DN3JOJuswvA+ExgNcSfKlgoqRCvLy1rphrdM8pDNLtfrw8Ybrzv5Cylnbug3MJl elJ1Bu3cFQ/4oYhy8CPlr6hytgbFJYrt0+IYqSr/6rBXx3AUIv5r6kCFldnbx8+D1MesRR RoUGcpDz6ACIRgmgwfp7capDbZ+QiW4= In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Michal Hocko Cc: Sebastian Andrzej Siewior , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Andrew Morton , Johannes Weiner , Michal =?utf-8?Q?Koutn=C3=BD?= , Peter Zijlstra , Thomas Gleixner , Vladimir Davydov , Waiman Long , Roman Gushchin , Shakeel Butt On 02/03/23 14:34, Valentin Schneider wrote: > On 02/03/23 13:56, Michal Hocko wrote: >> What I am trying to evaluate here is whether it makes sense to support >> and maintain a non-trivial code for something that might be working >> sub-optimally or even not working properly in some corner cases. The >> price for the maintenance is certainly not free. > > That's also what I'm trying to make sense of. Either way this will be > frankenkernel territory, the cgroupv1 ship has already sailed for upstream > IMO. So, if someone ends up in a similar situation and considers kludging those notifications back in: Don't. Have a look at: memcg_check_events() `\ mem_cgroup_threshold() `\ __mem_cgroup_threshold() `\ eventfd_signal() Having IRQs off, percpu reads, and the the eventfd signal is a nice recipe for disaster. The OOM notification sits outside of that, but any other memcg notification will cause pain.