From: Michal Hocko Subject: Re: [PATCH v5 2/6] mm/memcg: Disable threshold event handlers on PREEMPT_RT Date: Thu, 2 Mar 2023 08:45:54 +0100 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=suse.com; s=susede1; t=1677743155; 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=7SZzZlo51hCIHj63LTnZFCuHCo+OU2sc9qkPk8oTs2I=; b=PoUWiCcNQHCkdj583LO/FEOzanT+eGRGNnnMQXkh+OfyWi2LsHSbfwSozqB15GQI/8Ri8X P1l5KOj4fAx4C4zxe/Ae5eUXN4hUaYsonTKFaVqDtPYn9rtvdPEnvrE9IC+m2V3QvabOV9 NI7eTsquRnQMQeYbffgmB0EYO7eD2Yo= Content-Disposition: inline In-Reply-To: List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Valentin Schneider Cc: Sebastian Andrzej Siewior , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, Andrew Morton , Johannes Weiner , Michal =?iso-8859-1?Q?Koutn=FD?= , Peter Zijlstra , Thomas Gleixner , Vladimir Davydov , Waiman Long , Roman Gushchin , Shakeel Butt On Wed 01-03-23 18:23:19, Valentin Schneider wrote: > On 26/02/22 21:41, Sebastian Andrzej Siewior wrote: > > During the integration of PREEMPT_RT support, the code flow around > > memcg_check_events() resulted in `twisted code'. Moving the code around > > and avoiding then would then lead to an additional local-irq-save > > section within memcg_check_events(). While looking better, it adds a > > local-irq-save section to code flow which is usually within an > > local-irq-off block on non-PREEMPT_RT configurations. > > > > Hey, sorry for necro'ing a year-old thread - would you happen to remember > what the issues were with memcg_check_events()? I ran tests against > cgroupv1 using an eventfd on OOM with the usual debug arsenal and didn't > detect anything, I'm guessing it has to do with the IRQ-off region > memcg_check_events() is called from? I would have to look into details but IIRC the resulting code to make the code RT safe was dreaded and hard to maintain as a result. As we didn't really have any real life usecase, disabling the code was an easier way to go forward. So it is not the code would be impossible to be enabled for RT it just doeasn't seam to be worth all the complexity. > I want cgroupv1 to die as much as the next person, but in that specific > situation I kinda need cgroupv1 to behave somewhat sanely on RT with > threshold events :/ Could you expand on the usecase? -- Michal Hocko SUSE Labs