Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1161970ybp; Fri, 4 Oct 2019 10:23:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxseUvlz81bMaDmrubFOzvZaoPOZ5BLvz9t+6iCzXw95Kb7KKDoDCBXCC/d87tkOtA3d3Zn X-Received: by 2002:aa7:d48f:: with SMTP id b15mr16540113edr.159.1570209789015; Fri, 04 Oct 2019 10:23:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570209789; cv=none; d=google.com; s=arc-20160816; b=ivLfp9OSe3p1IZ14MHs64DJ2ckEyQ4pT2pb6FmBkkaP4GdqN+MnyVH5lkI/zJQPR7X Sr6VV1BFwHTeMKXd8XXRVpogjbGsO6idsjO38yzPpspa88x3YQ+Dsnl+pOwN6yb8iIFM Weq7qw1RihyPgIjvrxt6BZXB3xTYr1taipZFunyyroSsxrYetiK2R3wT2Auh6czmx0kv PdhZUFIaMm1JfjBiGguAaqz0rk/aNZBWsBlMVt8VOlJVYN7AJnaYfQxtfxeCVmGcP/La y/rDIXLsRVTVvgwH56xRZRLosJf8Utrx58gtkbkJ7XdtVFG21Up6xSvlX/qbYSK8+EWj XmbA== 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:from:date:dkim-signature; bh=CFABRMz1edgqMZrdkcJ5grQHuov7IQWx4KDvNWdkveo=; b=Jyj9zN6jngwLU8IXTSoAcaVp44qewohRyyjKndbpoxb70XGSqhbLLbDVbea+kO628C eHnQVu+k2z6EQOhdkGeph18L7Vd+OcTKiOQ04fl3e15vv4h7nvAoMkdhMMrpv1Z+exKV cRLSrSn5N8RxfDHSBaRnaafQ9YkkhisMez0DV0RBKdyQkO57nNUP3knFL1irqQtHPuC7 x7+kB7OXFlKy6Mffxlrj2LNpgX+YxKSHBI0t766oezBtulzIAx/9QOuugbH0eiomhqmJ YMMln264kKNTWxIIF9jiaF6B0Wo1zLlzQwqpohrU/wQ1mbEVLDlXI7y/nIgA7ymAfbvD OHtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=DLw0gUoD; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id la20si2175804ejb.73.2019.10.04.10.22.45; Fri, 04 Oct 2019 10:23:09 -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=@joelfernandes.org header.s=google header.b=DLw0gUoD; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388037AbfJDRUm (ORCPT + 99 others); Fri, 4 Oct 2019 13:20:42 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:40184 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729291AbfJDRUl (ORCPT ); Fri, 4 Oct 2019 13:20:41 -0400 Received: by mail-pf1-f194.google.com with SMTP id x127so4274425pfb.7 for ; Fri, 04 Oct 2019 10:20:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=CFABRMz1edgqMZrdkcJ5grQHuov7IQWx4KDvNWdkveo=; b=DLw0gUoDjdWvEBBUV5C8SsFx2SjR7VbPltgBwhUofYZDeym6mWGlcy4pzCTH99BHOv kKM6IrnZhzr87BifF8O22/Xjqa10WR/Uyac9x7SQG4iz4uVReP6nlGz+d6b0T+xjQvPL Z11qFIqBDxRwx+WWICguoP64fiLb15pZr6PQo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=CFABRMz1edgqMZrdkcJ5grQHuov7IQWx4KDvNWdkveo=; b=Lrr22iXboE/UoWUeKs+awtJbnmuTStUK+Lgu8vUFqag83PRelYB1KfanL5az4zewSM tfJsUOYbVQ0ubfYq94txvvbaTelcrz19sNXWi+5aegIHB3xKbkWVNM/sgcIfnS6XUo04 8ANKOO93uYZG5ueZWaTemeCw2rHVaAU0gF52C3Tkagy8xD60d94+gNfCW9qqUarh1OAq 29kBaOYeMjepi8Dk6tmkC9+nBp2ocFdiyYUE4qfsrDvyLOLvYWcdhhb2B7c+IkawJ2GM UUVlRRxx0MHJXbsgwfhamQzn6KPhkWgBv5azz2czSTWBu7PqiE08ASzaqOQuykxu0/k9 lDzg== X-Gm-Message-State: APjAAAWyxROUrW7mAkWJte+HsdoYanPvCye76ZTrjciiPVOYvS5wEN3k bbP9WKsq7DjV5qcY1QgfO9G/8A== X-Received: by 2002:a62:a509:: with SMTP id v9mr17803603pfm.180.1570209640112; Fri, 04 Oct 2019 10:20:40 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id j22sm8832861pgg.16.2019.10.04.10.20.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Oct 2019 10:20:39 -0700 (PDT) Date: Fri, 4 Oct 2019 13:20:38 -0400 From: Joel Fernandes To: Uladzislau Rezki Cc: linux-kernel@vger.kernel.org, kernel-team@android.com, kernel-team@lge.com, Byungchul Park , Davidlohr Bueso , Josh Triplett , Lai Jiangshan , Mathieu Desnoyers , max.byungchul.park@gmail.com, "Paul E. McKenney" , Rao Shoaib , rcu@vger.kernel.org, Steven Rostedt Subject: Re: [PATCH v4 1/2] rcu/tree: Add basic support for kfree_rcu() batching Message-ID: <20191004172038.GG253167@google.com> References: <20190814160411.58591-1-joel@joelfernandes.org> <20190918095811.GA25821@pc636> <20190930201623.GA134859@google.com> <20191001112702.GA22112@pc636> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191001112702.GA22112@pc636> 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 On Tue, Oct 01, 2019 at 01:27:02PM +0200, Uladzislau Rezki wrote: [snip] > > > I have just a small question related to workloads and performance evaluation. > > > Are you aware of any specific workloads which benefit from it for example > > > mobile area, etc? I am asking because i think about backporting of it and > > > reuse it on our kernel. > > > > I am not aware of a mobile usecase that benefits but there are server > > workloads that make system more stable in the face of a kfree_rcu() flood. > > > OK, i got it. I wanted to test it finding out how it could effect mobile > workloads. > > > > > For the KVA allocator work, I see it is quite similar to the way binder > > allocates blocks. See function: binder_alloc_new_buf_locked(). Is there are > > any chance to reuse any code? For one thing, binder also has an rbtree for > > allocated blocks for fast lookup of allocated blocks. Does the KVA allocator > > not have the need for that? > > > Well, there is a difference. Actually the free blocks are not sorted by > the its size like in binder layer, if understand the code correctly. > > Instead, i keep them(free blocks) sorted(by start address) in ascending > order + maintain the augment value(biggest free size in left or right sub-tree) > for each node, that allows to navigate toward the lowest address and the block > that definitely suits. So as a result our allocations become sequential > what is important. Right, I realized this after sending the email that binder and kva sort differently though they both try to use free sizes during the allocation. Would you have any papers, which survey various rb-tree based allocator algorithms and their tradeoffs? I am interested in studying these more especially in relation to the binder driver. Would also be nice to make contributions to papers surveying both these allocators to describe the state of the art. thanks, - Joel > > > > And, nice LPC presentation! I was there ;) > > > Thanks :) > > -- > Vlad Rezki