From: Tejun Heo Subject: Re: [RFC PATCH 1/7] cgroup: rstat: only disable interrupts for the percpu lock Date: Thu, 30 Mar 2023 15:51:35 -1000 Message-ID: References: <98cb3ce-7ed9-3d17-9015-ef7193d6627@google.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680227498; x=1682819498; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=6XM31ZrRumkictGFOXR0ExRhhRTlkDKTwiG7dCR1Fgc=; b=JBYKiS094xTcv4zZS7qtqmMLeJJI3CBby4kLAUuMziXHD4GQX8kl0rVXktvDBOeoyg kE039cqtRpT4ykTduffb4U40BvtNgW7zV0FAZz2WV0BqlSt5QYJpN8xupFHalEgYBWe2 Mcsh414OYAuBY4FJEwUvve3aBfy2EszbwJEObj//xKUmnHYc/UwK6WW03t6iLjufAyn2 ssTRNhrXIek059u92KiSZc+dkINIxwv0V3n+b0U3qPZgOYecnTJr8KDPd568UBe+Om+Y JRzenMRK0Ov48J93rRexsFGKtXgwJ4lg877M0D9vxz9Zn9cUrB6aoYizchAGUP6OU+k8 mySQ== Sender: Tejun Heo Content-Disposition: inline In-Reply-To: <98cb3ce-7ed9-3d17-9015-ef7193d6627-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Hugh Dickins Cc: Yosry Ahmed , Shakeel Butt , Josef Bacik , Jens Axboe , Zefan Li , Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , Andrew Morton , Vasily Averin , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, bpf-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Hello, Hugh. On Wed, Mar 29, 2023 at 01:38:48PM -0700, Hugh Dickins wrote: > > So, in general, there's a trade off between local irq service latency and > > inducing global lock contention when using unprotected locks. With more and > > more CPUs, the balance keeps shifting. The balance still very much depends > > on the specifics of a given lock but yeah I think it's something we need to > > be a lot more careful about now. > > And this looks a very plausible argument to me: I'll let it sink in. Another somewhat relevant change is that flipping irq on/off used to be relatively expensive on older x86 cpus. I forget all details about when and how much but they should be a lot cheaper now. No idea about !x86 cpus tho. > But I hadn't heard that the RT folks were clamouring for more irq disabling: > perhaps they partition their machines with more care, and are not devotees > of high CPU counts. I think RT folks care a lot more about raw IRQ disables. These shouldn't actually disable IRQs on RT kernels. Thanks. -- tejun