Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp7418394ybh; Thu, 8 Aug 2019 15:36:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxS/JtN/LI1SBSbof5p7EHWt2GOpQ7iPUM5atj0KAqA05HtnCudmayJ2UgXX4XFbH4/occ3 X-Received: by 2002:a63:1f1f:: with SMTP id f31mr14486797pgf.353.1565303762570; Thu, 08 Aug 2019 15:36:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565303762; cv=none; d=google.com; s=arc-20160816; b=Qjue73FXjY5e69wJ69u1HpeXYe7AWObNsnJ7K2OGDDJBgsghZGZ+sGVKDAENSyDuGH Wl1nhEGo/VR4z4xLP4wv3z3ZraKyB1NqjCxojIdDUVBGH1nvW501J1p8z8bDJpo/JOQw ISnMXZhQ1B1Nu80o6Pk1qqxEAqHmLnyjwne05cgQaOjjv1WruCGq9ujlAYSprYj3vleZ Ni1VJEJpkqUZIBDqasbmIvM7NS481Ge98KYFwwRr1VBGwEfDKcTtV5Hgg+mHMj/xUfxk XLCgYx8ROBQ5oaLFDESbHl47InIPHkHTFLRer1rCMOBaO631A+N0LQNn5OjWXdHxB1IJ E0lQ== 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=UaINewt1Z1ub53/fmkpLGlZdbeymE3MiNso4guK0Re4=; b=k64dqO5S6bKPVaBAUtcDNfpl2boLhiRD7Wyvgs3oRm2qn+XG9GS+KeYeED1LirGePV lIkP9QFJij70zf1MwJ1c/YSfrGaFrYBpmiXQVJ8ZH2f7gT8QhE+YDULFBVuOsNdg3+CW n2B7XyrWqR4V372r4dQ2e1x7BePZEsFuA5iPZAy5n1AgkEYN3EMpmsvVNcrQeGyioRI9 +PFnv8Ey1/DceMWYL2FNFz8/ZNhLd6LUpNWrdag+oz3yrtZTE49mVcRd+9AZI93Rec+1 JvivJxXBC7g5FbsirBt52wUHDfX75nqWPHjRSXQqHo1DPhpQGpc7Z97+TBd74UsU5yVD LfsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes.org header.s=google header.b=AXqELdRa; 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 j185si53051135pge.91.2019.08.08.15.35.47; Thu, 08 Aug 2019 15:36:02 -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=AXqELdRa; 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 S2404864AbfHHWeT (ORCPT + 99 others); Thu, 8 Aug 2019 18:34:19 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:38158 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404581AbfHHWeT (ORCPT ); Thu, 8 Aug 2019 18:34:19 -0400 Received: by mail-pg1-f193.google.com with SMTP id z14so7565555pga.5 for ; Thu, 08 Aug 2019 15:34:18 -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=UaINewt1Z1ub53/fmkpLGlZdbeymE3MiNso4guK0Re4=; b=AXqELdRaeuAw4yCtxRvUBT10Nkboh4FKhBWUqSJc4Wg6avMX/RyV/MVVc+MyZeNPaW Rk+B4Gi77tKHuThWNMOXy3hrppnAVEdiqgB2nS7JuET3vvv1hRVMF4ltCMjzMM+F8al6 5ogxHuOCdsJhSvnyHmtqJ5mKv5E2C5Eu3vwiM= 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=UaINewt1Z1ub53/fmkpLGlZdbeymE3MiNso4guK0Re4=; b=D+57Vbjk6UxoQth3OIPXsH9B0mExd0ttDrZ9HHTLELtm7dwXH51Nvs+voH4FACaBff zMgKGmwz3hqaUgZr9ycz+ZOiGUs3d2om0ARWtBWufS98XEmc4k3FDRsda1TB4TswBH9m laAkqpnBydPehO1kVCDdb9YydvStOXRYYV+VBVq28GwQGWGz07ZKBga3IqNj19bgbtI7 V1bNbrL8HowcW7ca7dScy8IjJjIxHOol4+6V86/tIQIMsmVnH7ePXu9QeHWhsDf24Lew QqXxymwoTEi9jSCxBLfqatw88H3mbXlqd+HnlQRqmBL1B4FCmexQw7IRrdJK/ho0PUV2 LjeA== X-Gm-Message-State: APjAAAWRQuFVpxzsyXkaA5praXRNn1V3z+JbjHSc2x30koVhOfhqzNnn e0DGXTP5wAgPE6qbSU7+MF9VdA== X-Received: by 2002:a63:d002:: with SMTP id z2mr15092618pgf.364.1565303658035; Thu, 08 Aug 2019 15:34:18 -0700 (PDT) Received: from localhost ([2620:15c:6:12:9c46:e0da:efbf:69cc]) by smtp.gmail.com with ESMTPSA id x128sm142523949pfd.17.2019.08.08.15.34.16 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 08 Aug 2019 15:34:17 -0700 (PDT) Date: Thu, 8 Aug 2019 18:34:15 -0400 From: Joel Fernandes To: "Paul E. McKenney" Cc: Byungchul Park , linux-kernel@vger.kernel.org, Rao Shoaib , max.byungchul.park@gmail.com, kernel-team@android.com, kernel-team@lge.com, Davidlohr Bueso , Josh Triplett , Lai Jiangshan , Mathieu Desnoyers , rcu@vger.kernel.org, Steven Rostedt Subject: Re: [PATCH RFC v1 1/2] rcu/tree: Add basic support for kfree_rcu batching Message-ID: <20190808223415.GG261256@google.com> References: <20190806212041.118146-1-joel@joelfernandes.org> <20190806235631.GU28441@linux.ibm.com> <20190807094504.GB169551@google.com> <20190808102610.GA7227@X58A-UD3R> <20190808181112.GQ28441@linux.ibm.com> <20190808201333.GE261256@google.com> <20190808205129.GU28441@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190808205129.GU28441@linux.ibm.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 On Thu, Aug 08, 2019 at 01:51:29PM -0700, Paul E. McKenney wrote: [snip] > > Also, I am thinking that whenever we do per-slab optimization, then the > > kmem_cache_free_bulk() can be optimized further. If all pointers are on the > > same slab, then we can just do virt_to_cache on the first pointer and avoid > > repeated virt_to_cache() calls. That might also give a benefit -- but I could > > be missing something. > > A sort might be required to make that work nicely, which would add some > overhead. Probably not that much, though, the increased locality would > have a fighting chance of overcoming the sort's overhead. > > > Right now kmem_cache_free_bulk() just looks like a kmem_cache_free() in a > > loop except the small benefit of not disabling/enabling IRQs across each > > __cache_free, and the reduced cache miss benefit of using the array. > > C'mon! Show some respect for the awesome power of temporal locality!!! ;-) Good point. I will try to respect it more in the future ;-) After all, it is quite a useful concept. thanks, - Joel