Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1250726ybh; Thu, 16 Jul 2020 07:15:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzx7D8BZ6yT389yFtq7hyWpCL1UWW3+rAUbTrU4fwA0Vn8Xv5VdFBN5Y2X0nYNb0NVtqk/5 X-Received: by 2002:aa7:c3d6:: with SMTP id l22mr4657236edr.148.1594908917028; Thu, 16 Jul 2020 07:15:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594908917; cv=none; d=google.com; s=arc-20160816; b=pLCQzze0wn+vJTsRtjJ2VniBh0L6ehidVCsF5WdVRz72o4E5tF0Zwg3SPR32/AMtne i2cGWpJj6h+JLYb1s3mwG53oreOrFVaJraMsVjQ2pBIHMEnInNzNLXLAtKnhpNqIQ3pq F+Xl3QeGwo+Uscp3IlYTvdTMgt1lwXh5gPkO/MUhePB1+Fy6tYa9k6LXTX2kUnFw55hX ElAYs1kancT/3gDwbv5fHFZsQ/6Ti3v0K62S/0+Jzzno7fpJRs91AsgID7nI++q46QjS bCCQ/6fR0ACo3kKHvKTMfNp5jLDj9p6+/va4QFVTGqpPY5HL9hGevf3LFPaWNpi0PKtT UE+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from :dkim-signature:dkim-signature:date; bh=AAXlecMOFFlUauM/8ONbVZjnpZpBV3pslxC+IrQ6lXU=; b=skqcqi2jPdcrWe0Kv85K6RmVaOAC04sOtuJ4LLrhiBoE5ze0rM4iy/EsK8IdLsOGn1 /h5sPFGqEXUNlEsO7UaUC/78vGXUXX+uWk1JEd+6GUbNBvjeA2yiQFlH7/XmRgKztbRh XRaDZQ7P5iQ9qalCdZCzDzkbJnK4DA2YRKlKBSnOuYm4AAAwxoq9bSkf16aDX/TI2dPZ A9eYX3WGgg3k4+Mw643NUu8RKYkc81CFYshut8i92gVQPM0mMNp80GQjhZez7XUpYIeH OgPQp46R9qReVX5FSIe9VvDMhNtfyd1KHNXPvb8bqXiOdshV/dqO+gbh2fQ95qGr1YGH O4Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=3L7sNJi9; dkim=neutral (no key) header.i=@vger.kernel.org; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w23si3399506eds.47.2020.07.16.07.14.54; Thu, 16 Jul 2020 07:15:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=3L7sNJi9; dkim=neutral (no key) header.i=@vger.kernel.org; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728716AbgGPOO0 (ORCPT + 99 others); Thu, 16 Jul 2020 10:14:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726537AbgGPOOZ (ORCPT ); Thu, 16 Jul 2020 10:14:25 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0AA4C061755; Thu, 16 Jul 2020 07:14:25 -0700 (PDT) Date: Thu, 16 Jul 2020 16:14:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1594908863; 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=AAXlecMOFFlUauM/8ONbVZjnpZpBV3pslxC+IrQ6lXU=; b=3L7sNJi9VXo9Z5SmOslhbPfXNdmNOC/okJbIRApJQOVGSJHYxx3zwEI/NWVJtsP3JGmZud I63zlGcDTBzr7GduXcDlNUUgW8W1HLsbe951Dy5inHl3BnvEczyvua/WyfJTJPnlnIELUz 0alHHrk1IZG/c9MMwTqFXZmUxgC5/SKi70ESzexzdMbcpd8SNAUMrtZQYAy3Vz4mr2RqGF RDt6sMFncZVSXQS4YmcmtESaIQRW2ckHE02Zt5q4IMN3dz2S/pEKXELvpma5Uh4XtW4hgc ALaHYuaZv3QGSyJrZDx04XbDKf+IkhaIVib9AxLiIQylgBb+ShhV6CxaUpuDVg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1594908863; 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=AAXlecMOFFlUauM/8ONbVZjnpZpBV3pslxC+IrQ6lXU=; b=CmaaA0FyUpNJji9awzQD8Ot8BPXYUIJarkWbz1mYy2rj1VmNgJ75ieNKdI2WsJd0IfxG5u xlc/8jOjBf5sFDCQ== From: Sebastian Andrzej Siewior To: "Paul E. McKenney" Cc: Uladzislau Rezki , LKML , RCU , linux-mm@kvack.org, Andrew Morton , "Theodore Y . Ts'o" , Matthew Wilcox , Joel Fernandes , Oleksiy Avramchenko Subject: Re: [PATCH 1/1] rcu/tree: Drop the lock before entering to page allocator Message-ID: <20200716141421.fzwf4tedr6rixd6d@linutronix.de> References: <20200715183537.4010-1-urezki@gmail.com> <20200715185628.7b4k3o5efp4gnbla@linutronix.de> <20200715190243.GA26735@pc636> <20200715193250.axntj7jdt6bw52dr@linutronix.de> <20200715221449.GJ9247@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200715221449.GJ9247@paulmck-ThinkPad-P72> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-07-15 15:14:49 [-0700], Paul E. McKenney wrote: > > My concern is that some critical bug will show up at some point > that requires double-argument kfree_rcu() be invoked while holding > a raw spinlock. (Single-argument kfree_rcu() must sometimes invoke > synchronize_rcu(), so it can never be invoked in any state forbidding > invoking schedule().) So you are saying as of today we are good but in near future the following synchronize_rcu() -> kfree_rcu() may be needed? > Yes, dropping to a plain spinlock would be simple in the here and now, > but experience indicates that it is only a matter of time, and that when > that time comes it will come as an emergency. Hmmm. > One approach would be to replace the "IS_ENABLED(CONFIG_PREEMPT_RT)" > with some sort of check for being in a context where spinlock acquisition > is not legal. What could be done along those lines? I would rethink the whole concept how this is implemented now and give it another try. The code does not look pretty and is looking complicated. The RT covering of this part then just added a simple return because nothing else seemed to be possible. This patch here looks like another duct tape attempt to avoid a warning. > Thanx, Paul Sebastian