From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) (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 619BE3A3E88 for ; Tue, 11 Aug 2026 17:26:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786469192; cv=none; b=O7UtTEglhkh4Ymynbj9yTPeu4vJ9PEOzZX/4A9my6gCX/1wKI9xrnkxUp/gqbJYTRMUVffgprSY7D0ZEJxQpjeqYSK2hJaqH1ZMGezHig70yZf38fxDU0b+92HNSPLPHZpiu/7a5K1uZ047wmKCR3KzlMzow+QsEXDPEZWlbGN4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786469192; c=relaxed/simple; bh=PGN/23AcG1BdZ95Dbjp/XFqXT+g7ycHtDWwLc+SPRNo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=D6RP5Apz2GtAr0ryffxDufZTqym6X0Ar2nUusIzH0CTKlGmXzq71sYtLkelwMeiO+gJJMdyN+2oHgY1pkq0gXAvTRxiU7I6J/QrGFzIny1+sMUiBUDssYNKBNGMoJx2py+I2hjE/Kmj8VVW4I0pBYegUi1DH8Il82Nya4OHx2Fg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=lvTpFi0B; arc=none smtp.client-ip=209.85.219.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="lvTpFi0B" Received: by mail-qv1-f45.google.com with SMTP id 6a1803df08f44-908934450cdso512526d6.1 for ; Tue, 11 Aug 2026 10:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1786469189; x=1787073989; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=T9Qh79QFCvjYnoGtVduyp1NZZfqwn8kEM0DsabkDFtg=; b=lvTpFi0BIT3IWa9d4EgB0llYeP0dh1ppGbPdy6hHbOh2C5aoyTsrWlL1Yp3RGjxYm2 U6Ek/dJoBIUXUSjuOai7EZb/ptiUeyDI19iw2RsGY5VNOUy+olhtSmngUVkIFUH8aCAB sAT3EP+bAV0ORZr3NUyDMAiKstnNK3yvpQMue0As7Y08uHUcAREwTJFMzJ9dXDAfU/q5 9ciDraZa8yyRamNZE3qj/QeuR/8rZ0sRbWOio7cQSFuatTvvVOB2VmntYD25yVX1wgcC GKadvOXfyE8Y4z3wxKBHPI4MjzbXHTcNol7ejKbqHRhBlGKj/kqVwyz9pnXsTzpC24T9 qgcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786469189; x=1787073989; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=T9Qh79QFCvjYnoGtVduyp1NZZfqwn8kEM0DsabkDFtg=; b=UztAb5VDwGwE8u6OOjAfYODuChwavbhV1KrKB/jWs7ldDCb6sEvZcYL4R/5eD5rxvX LMNrnkvfeAY5mjAA8Trsd5BlzPAH1hrSb44HX4KiPUzwjimgbFwfE1gsk95SKamK/QLt BlVMNGwu/5Z6uu7njWZqxuztM4ycdNETcVACfHmzEqz5y8SamWzt2zrFS13D1f8Sr944 4C5IGojj2SsJqRAUm7AWjsiulrVo/HEA0sj2r7rQKFFhd+RX15LIi/h3pEEnUnF7CekL VjuATDoka0JU8Z9eaNKHy8iA5zKzzy+qfZqmKMKU446rli67Ja6bKgpVxwPAtQJHiRg+ yyEQ== X-Forwarded-Encrypted: i=1; AHgh+RqhLnzUVU99JTvamnn8AA50kOKDjZffFIOAGJSfA0FCXQeLUbfKr1wVALbUp5ZRG1I8coCXx7L3vRRjvR0=@vger.kernel.org X-Gm-Message-State: AOJu0YxCVoX3kZ5owABCqH4g+kub7vEd9wIboGkgWc1V54Drqr4EUgB7 FrcGgib1x+1HZM7kthM5xip8INu0gensIqQTN128M0FK/q5zSz2du+dZyphD88beCkM= X-Gm-Gg: AR+sD119+jIGf1rzgnS75gNCRIT5JBxeJZUNFb2ccEVvjSQns4CvuuBDWK2GKUbCBYS WmUgblF+ioTpMUNFF7lLyDVOF99Fy0VqyPuG2l0wwX4Fci8KwR+JNCUJLou0qtB0VfyYIxBaC6M 7/J5uJLjLgLv1GaXemPbDKK6do9dh3Zm2aEk6Wyz6M22ymcJbr38RphXdWXCgIh6iWFgGUAqms5 jYsZj8C22U8GUCqQJxNi3AU5+sj6bIzUquCyMipA2AryjbORpOiq3cFUfcV8fqUlpf7kcAH7i4s JKPfJwYANtnTU0PHKIauefWzb+7d9gc4ESWGMkR//IGGvMs4MkbXdBnTOVWSBxmMVoRHUt4Ytcq QwDhD1QiTWXh3tt4LHShDKh/rwwHqW4VRajDh/ReiO1gmnxSdpW2LFOtliGEOzkdTAfibNoASLj hbZ+8HS2Zt+iD9UCaOA8JDXxbjV6m9IiswNTjtsg== X-Received: by 2002:ad4:576a:0:b0:907:d9bd:2f8f with SMTP id 6a1803df08f44-90a6694b0d3mr50111416d6.6.1786469189079; Tue, 11 Aug 2026 10:26:29 -0700 (PDT) Received: from ziepe.ca ([142.166.156.215]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-90a6c3c8af4sm3611196d6.39.2026.08.11.10.26.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Aug 2026 10:26:28 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1wtqF9-00000002gAk-2Giq; Tue, 11 Aug 2026 14:26:27 -0300 Date: Tue, 11 Aug 2026 14:26:27 -0300 From: Jason Gunthorpe To: David Woodhouse Cc: akpm@linux-foundation.org, david@kernel.org, mhocko@suse.com, rostedt@goodmis.org, bigeasy@linutronix.de, simona.vetter@ffwll.ch, jglisse@redhat.com, christian.koenig@amd.com, paulmck@kernel.org, seanjc@google.com, pbonzini@redhat.com, linux-mm@kvack.org, kvm@vger.kernel.org, linux-rt-devel@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/mmu_notifier: Remove non_block_start/end() from notifier invocation Message-ID: <20260811172627.GN544626@ziepe.ca> References: <20260811162423.GL544626@ziepe.ca> Precedence: bulk X-Mailing-List: linux-kernel@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: On Tue, Aug 11, 2026 at 06:22:12PM +0100, David Woodhouse wrote: > On Tue, 2026-08-11 at 13:24 -0300, Jason Gunthorpe wrote: > > To be clear you should not be using any synchronize_[s]rcu() primitive > > inside the invalidation callbacks. These are well known to have > > multi-second delays on loaded systems which are a completely > > inappropriate performance characteristic for these mm callbacks. > > > > This statement has nothing to do with deadlock. > > > > RCU is always a trade off, you can make the read side run really fast > > and the write side is ghastly slow. If you can't handle the slow write > > you shouldn't use RCU techniques. > > The multi-second horror stories are about the *global* RCU/SRCU > domains, where the grace period has to wait out arbitrary readers all > over the kernel. > > This is not that. It is a dedicated srcu_struct, private to one VM, > and its entire reader population is a handful of KVM fast paths that > until now were under irqsave rwlocks. Are you sure? I've never heard that srcu has those kinds of properties. If its so fast you should just propose a non-sleeping version and leave the notifiers out of it Jason