Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2519696ybb; Mon, 30 Mar 2020 07:44:35 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuA9sed83ZkwDm0csDqgQUM6MjPOIpSQKPKrt8XfxNDrtNuzFePIiWn0fL2FUQZBzOBaYYr X-Received: by 2002:a05:6830:10a:: with SMTP id i10mr9712788otp.190.1585579475091; Mon, 30 Mar 2020 07:44:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585579475; cv=none; d=google.com; s=arc-20160816; b=Tqpj0z2CbAW0Rk6vxCZ0c4akH+4OONYkNqJAJnWrVbhLGWJTzccPr5BUvC4xrC2Zm/ NptE45EI62A3UZEhcw9gG4ZPH3O1Cjz3h4foVwj+JLpeAORaP5jBTBdIsnxy4NoaOISN phVR9+kLMGvFGPUKcBARArz2yxmfSxC301u9e3gGpR0OoL6k9gWmI1gIL0SPsHc2SOn7 +93vsTn70YMHt7ogu5iOhXc5/mhqfI+xFZsLIUGoJxA88WHDPgzRxlZ7gzgRmtByBSh7 DBm7sedZxR8AOEc6RJX4R1YNXHB/orK9f+glHskwaUxVBbJHc3KH0SXYCsOrd2aqjAvo i14g== 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:message-id:subject:cc :to:date:from:dkim-signature; bh=zZl8DGHxKfW9Vu36ePmFE8gP/ULjjF5tAO2pNWgNfJ8=; b=RXF8zo0LY6/Ucp2wHrdW0Gtg5rHxOm6otKTERP1LJuqCfA/fi5N846mnvNN09NdTcO rAcUUeRJqlau9kqrZE5RMOOTDPRqFrwUSMx+h+mTG5o7oqHSZWEPGtp/93oUa1kThRue mh4Kq0y43Ojbh9j6vBp79IgV4SeTk8y4hzcjbD8ntD9imCxX01KMigUplmir/MmIvpZO KZwa9FlSU6JtPjfTvB/xSgOa9PCQ5TX5ZnLVWtm1d4rrX6CUPxSc1ufriJbtsSOCzlI8 xwCxZqXHLpKEt/Ar/IFxHyIGBNEEKwEbY6LFW67dSmXnGF6aK8qN/JGszyLJu0ns53Jy TglQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=h3Kc8KDH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i124si6037325oib.172.2020.03.30.07.44.22; Mon, 30 Mar 2020 07:44:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=h3Kc8KDH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727973AbgC3Omi (ORCPT + 99 others); Mon, 30 Mar 2020 10:42:38 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:41847 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726769AbgC3Omh (ORCPT ); Mon, 30 Mar 2020 10:42:37 -0400 Received: by mail-lj1-f195.google.com with SMTP id n17so18360915lji.8; Mon, 30 Mar 2020 07:42:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=zZl8DGHxKfW9Vu36ePmFE8gP/ULjjF5tAO2pNWgNfJ8=; b=h3Kc8KDHcLiXfTCe9KLFRZw8NC3uNi76b2bvj8c5PfQqsPu3mTsnwZHSVXXMF+M57R aCZ1Yfa80MsCs0jly+WB/q5zh0bMdinYZ8efN7zr2VXsvNNhAdVLcGycLNRvwA+ITI5w Iu9nWHpV4YhgBBcAofo+4dW7YzLWCNCnblGhYo/cMra3um6S+d8ic31+9ibO/v8RhCez bGR6LAi0zzGWgXstRGtTSRCX3AgWBPN9iNVlYAritB1dFd93zUGps8o+Cb6ClXLEqZbw P1CCbhLNL8U9f45/x88HVfqQILzHaE1WvOBUW38y6VgTjKEk3/yTNassbR7dW4XyiLxE 65RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=zZl8DGHxKfW9Vu36ePmFE8gP/ULjjF5tAO2pNWgNfJ8=; b=iaqL3mhNDyXQzfhwruWQuJt4vbIP/o7T0bSBGsS2pjus7alLo9uMsn3V277CcwjmdH WKHjtsHqJHLeEbaO383LmJTTuoNwC5gu+uLHSO18WSlzCbfwiQBS04NsWTW0M/1nFigl +7ZrEwVJuFq0cQXANJ8ket8C9cu0sAtNM555HFsx8daLtJl3o4z1EMiZQuTKgmKxu1nz c6Rs0qlWfM5rXvVldA9W1ZAF5PHcwbjOJK4gAd5XhsSaMk2MUYUgwlT+eiBYTboVcqRL lm95G2lV9xxAjD+5nKv86a8mzLjPY6vm0TUdiDTxuKma+AWg9kEOmcBhgggAwyJIo9RM oCJQ== X-Gm-Message-State: AGi0PuYd7A8XT06xdEBQr32TxFrw8T16FuTaLk/VlKisghrIYQXXBE8U 3p3YPpBGOOYcqQ+dPQuHcoM= X-Received: by 2002:a2e:854e:: with SMTP id u14mr7198364ljj.95.1585579354883; Mon, 30 Mar 2020 07:42:34 -0700 (PDT) Received: from pc636 (h5ef52e31.seluork.dyn.perspektivbredband.net. [94.245.46.49]) by smtp.gmail.com with ESMTPSA id r141sm7832506lff.58.2020.03.30.07.42.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 07:42:34 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Mon, 30 Mar 2020 16:42:27 +0200 To: Joel Fernandes Cc: "Uladzislau Rezki (Sony)" , LKML , "Paul E . McKenney" , RCU , Andrew Morton , Steven Rostedt , Oleksiy Avramchenko Subject: Re: [PATCH 6/7] rcu/tiny: support reclaim for head-less object Message-ID: <20200330144227.GA16651@pc636> References: <20200323113621.12048-1-urezki@gmail.com> <20200323113621.12048-7-urezki@gmail.com> <20200330005637.GA138004@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200330005637.GA138004@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Hmm, Ok. So on -tiny, if there's any allocation failure ever, we immediately > revert to call_rcu(). I guess we could also create a regular (non-array) > queue for objects with an rcu_head and queue it on that (since it does not > need allocation) in case of array allocation failure, however that may not be > worth it. So this LGTM. Thanks! > > For entire series: > Reviewed-by: Joel Fernandes (Google) > (I will submit a follow-up to fix the tagging, please let me submit Vlad's > entire series with some patches on top -- I also did a bit of wordsmithing in > the commit messages of this series). > Thank you, Joel, for your review and help! > > Loved the might_sleep() idea btw, I suppose if atomic context wants to do > kvfree_rcu(), then we could also have kfree_rcu() defer the kvfree_rcu() to > execute from a workqueue. Thoughts? We can then allow poor insomniacs from > calling this API :) > Not sure if i understand you correctly. Could you please some code for illustration? As far as i understand, it should be done then synchronously. We can defer and queue some work to do it in worqueue context. But i am not sure how to proccess next coming request, i.e. busy waiting until we manage to push a new ptr. to free? But in that case it would not work if there is only one CPU available. Thanks! -- Vlad Rezki