Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3728519ybz; Mon, 4 May 2020 08:37:05 -0700 (PDT) X-Google-Smtp-Source: APiQypJHjJBYAx9QTwxDEiMdvuFjfnNKViSy7F0wwWUVHNLc1P19/TA8nziLoRe3snMNUCt44Ufm X-Received: by 2002:a17:907:43c2:: with SMTP id i2mr15521701ejs.185.1588606624956; Mon, 04 May 2020 08:37:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588606624; cv=none; d=google.com; s=arc-20160816; b=TnuxInk8+B1y8IYK4hg+hraijC6onl8pUi398euOIpnUzcEMuVuFt2RRTO8ht9B9vy zj+eCaAmt/vCllUhv48AkoUxgBucY/sNUVun61jKJc1p8JVz9GYrp0a1NakFwvQqRu+Q +iY4RtDkMt+hlFNJUmGgQ/dmdLDTp/WyWJqEdU6aNsBoN2Q707muIa90kLIOiq2ErJG5 w0CkHzVyGjggwkBZz4YA5XcrBopGRl/p7yhXLfvvhRm9l/+bQAUPpqkcNxIjZ6JWu25Y k5d9aV5DRq//4bhgfR/cR2ODGV7G5OJhCQUlaAzTvLv0rR6uazmPni9jy3zxi7GvE3aw s9+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=AVPv2LAbt7wmA5kWc++1J9l4HLKstsdqEI4FHdj19rM=; b=aWIQ9PWwKQAwptVrZFLfPvtLKR3rM67dWyF+ENl3/AKdyQFZAs86VvQFPDGJysIdq4 l5KBWQMVQR3fdTPEI8QDF3CFAGwAKFe+9/oxIWJy7hRLJF/IEwOiaRnhMJK3S6BbwjfU zg10hAT89MSYCIaSEVVli10KkK7cuZ8NeN47IQLGvi1OZJnomwjVA7wsdDUmTx5Mpq+H AWJUFwqLckpEvgbf50YMq7R6A9kn/qxbsGxiCyletNxk2E3yceVIzUq6hPGvOMoETEU1 Lt6mfTW1yQViCd0lpwVmwh10ZUa5r4CAEzNot0gAHvyA9XcNPiRhJjGyoOuTdLMnNgJQ BT/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=izahuf1w; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt18si6892503edb.139.2020.05.04.08.36.35; Mon, 04 May 2020 08:37:04 -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=@kernel.org header.s=default header.b=izahuf1w; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729352AbgEDPbs (ORCPT + 99 others); Mon, 4 May 2020 11:31:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:49854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726908AbgEDPbs (ORCPT ); Mon, 4 May 2020 11:31:48 -0400 Received: from paulmck-ThinkPad-P72.home (50-39-105-78.bvtn.or.frontiernet.net [50.39.105.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 79C2B206B9; Mon, 4 May 2020 15:31:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588606307; bh=A+Wg6eINNCOwpBUPq6wuAXpzjxrFpdtTuyxWoRzfZWo=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=izahuf1wNxw8JN6DemPEtNR3xVeeHd63bAVZyT9L5CIqVtDcAx7CQ/kmV8aA2tZCh zDNhnDvK3YBK+9+xaaJnanfjpmZ0qKkFv6mw/vpRCifUB8ToVoY85fUVjQYKGnYMXD jNZ88FZMBQSrq9ZYfYoWtNm0DG78g+cIsG6/c5ZQ= Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id 53FB835226F4; Mon, 4 May 2020 08:31:47 -0700 (PDT) Date: Mon, 4 May 2020 08:31:47 -0700 From: "Paul E. McKenney" To: Uladzislau Rezki Cc: Joel Fernandes , LKML , linux-mm@kvack.org, Andrew Morton , "Theodore Y . Ts'o" , Matthew Wilcox , RCU , Oleksiy Avramchenko Subject: Re: [PATCH 19/24] rcu/tree: Support reclaim for head-less object Message-ID: <20200504153147.GL2869@paulmck-ThinkPad-P72> Reply-To: paulmck@kernel.org References: <20200428205903.61704-1-urezki@gmail.com> <20200428205903.61704-20-urezki@gmail.com> <20200501223909.GF7560@paulmck-ThinkPad-P72> <20200504001258.GD197097@google.com> <20200504002855.GF2869@paulmck-ThinkPad-P72> <20200504003237.GD212435@google.com> <20200504142153.GG17577@pc636> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200504142153.GG17577@pc636> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 04, 2020 at 04:21:53PM +0200, Uladzislau Rezki wrote: > > > > > > > > If we are not doing single-pointer allocation, then that would also eliminate > > > > entering the low-level page allocator for single-pointer allocations. > > > > > > > > Or did you mean entry into the allocator for the full-page allocations > > > > related to the pointer array for PREEMPT_RT? Even if we skip entry into the > > > > allocator for those, we will still have additional caching which further > > > > reduces chances of getting a full page. In the event of such failure, we can > > > > simply queue the rcu_head. > > > > > > > > Thoughts? > > > > > > I was just trying to guess why you kept the single-pointer allocation. > > > It looks like I guessed wrong. ;-) > > > > > > If, as you say above, you make it go straight to synchronize_rcu() > > > upon full-page allocation failure, that would be good! > > > > Paul, sounds good. Vlad, are you also Ok with that? > > > OK, let's drop it and keep it simple :) > > BTW, for PREEMPT_RT we still can do a page allocation for single > argument of kvfree_rcu(). In case of double we just revert everything > to the rcu_head if no cache. > > For single argument we can drop the lock before the entry to the page > allocator. Because it follows might_sleep() anotation we avoid of having > a situation when spinlock(rt mutex) is taken from any atomic context. > > Since the lock is dropped the current context can be interrupted by > an IRQ which in its turn can also call kvfree_rcu() on current CPU. > In that case it must be double argument(single is not allowed) kvfree_rcu() > call. For PREEMPT_RT if no cache everything is reverted to rcu_head usage, > i.e. the entry to page allocator is bypassed. > > It can be addressed as a separate patch and send out later on if we > are on the same page. > > Paul, Joel what are your opinions? I strongly prefer that it be removed from the series. I do understand that this is a bit more hassle right now, but this does help avoid confusion in the future, plus perhaps also avoiding issues with future bisections. Thanx, Paul