From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13915C433DF for ; Thu, 18 Jun 2020 20:36:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CAAC420890 for ; Thu, 18 Jun 2020 20:36:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dU3A/PvK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CAAC420890 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 52FAE8D005D; Thu, 18 Jun 2020 16:36:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4E0838D0052; Thu, 18 Jun 2020 16:36:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3CED28D005D; Thu, 18 Jun 2020 16:36:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0132.hostedemail.com [216.40.44.132]) by kanga.kvack.org (Postfix) with ESMTP id 1CD278D0052 for ; Thu, 18 Jun 2020 16:36:08 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 6508C3A497C for ; Thu, 18 Jun 2020 20:36:06 +0000 (UTC) X-FDA: 76943489532.29.pets51_29178fd26e13 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 29959180301C5 for ; Thu, 18 Jun 2020 20:36:04 +0000 (UTC) X-HE-Tag: pets51_29178fd26e13 X-Filterd-Recvd-Size: 5600 Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Thu, 18 Jun 2020 20:36:04 +0000 (UTC) Received: by mail-lj1-f195.google.com with SMTP id y11so8900685ljm.9 for ; Thu, 18 Jun 2020 13:36:04 -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=lPjzYKmFxpCIl/6k8qDfJKjGnyJ7TqaRBfjBqulm7Z0=; b=dU3A/PvK2RT1lFGNoK/imuUGTYCoZiSQSlHAe2kEjsR7yOIXw/jBtEK5z68u4SAPys HKqJqTAuPmfGh1HgFtsfJ2qnYMIra2421Hn0YdSupKq6RAlS6Bp1bzDLd/I3pUDMlMtn 919SGgtOsJaxe/hNjTt2KH8LJ9xMQWfICRHV3BwSWP2/n2boc65Zlz1eGDsQ0WyJily3 YxuBaTjYQaPVK0wOm0NDr3vVN08MDmG8MmUcL9avcu+HJxbDkdU8tZPhJh81nqibuosT I9YeAT+8dtxSMRuGHwjAr01ugkgqjL9yEIeiPU8MW2d1ff0MGG0LNLprQ6Iwh9gU0iJ/ +BMw== 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=lPjzYKmFxpCIl/6k8qDfJKjGnyJ7TqaRBfjBqulm7Z0=; b=WIdSLyyDAjvHvM79tgXcYHzix4R2Rv2bZ6Jmto8O4PI3lStkN8qM8xfSTyNiYCGCEP ovTVOvRqoVRywiIB69YmGkEek5Huh5/bUeFSlvnc5ct7TmeYPaoMLgjVwSXJEGD0ovoU uk8yI29J6laZ3XaLBM7RPiG8jGQ6LKNDRioL0Q3ep1iqa8PCq0vdF/8VEfvKq2O/jODd /NisyFoNMgABHgHGDkiMCFWJ/WSptQP/7JGgftYMZhsw3rczLkgOfYgdCWTRaSEReJSr j8HSwafKPWRVwNJ+Gsk2rB/T8bXV5g81he4dLvbASSlAftYdq7rXXztRRQVRD1gjaWl8 hZpg== X-Gm-Message-State: AOAM530jgT9VaZfQeHX6gDe01XZli0fr+JxgqMWIqxlccQHrHUyFGCvU dS17QZSXMTk822oDMwyq81c= X-Google-Smtp-Source: ABdhPJxfDMzQP6gevWeG/xCkKb8cDPxM5Gw108KOF56FBjSwJiRU0LUffgkgMIt9ASDjL2bE4IiyPw== X-Received: by 2002:a2e:96c2:: with SMTP id d2mr74290ljj.439.1592512562803; Thu, 18 Jun 2020 13:36:02 -0700 (PDT) Received: from pc636 (h5ef52e31.seluork.dyn.perspektivbredband.net. [94.245.46.49]) by smtp.gmail.com with ESMTPSA id t4sm970097lfp.21.2020.06.18.13.35.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2020 13:35:59 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Thu, 18 Jun 2020 22:35:57 +0200 To: "Paul E. McKenney" , Matthew Wilcox Cc: Uladzislau Rezki , Matthew Wilcox , LKML , linux-mm@kvack.org, Andrew Morton , "Theodore Y . Ts'o" , Joel Fernandes , RCU , Oleksiy Avramchenko Subject: Re: [PATCH v2 09/16] rcu/tree: Maintain separate array for vmalloc ptrs Message-ID: <20200618203557.GB16976@pc636> References: <20200525214800.93072-1-urezki@gmail.com> <20200525214800.93072-10-urezki@gmail.com> <20200617234609.GA10087@paulmck-ThinkPad-P72> <20200618005214.GN8681@bombadil.infradead.org> <20200618031823.GQ2723@paulmck-ThinkPad-P72> <20200618173520.GC14613@pc636> <20200618175719.GT2723@paulmck-ThinkPad-P72> <20200618183448.GA15136@pc636> <20200618190359.GU2723@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200618190359.GU2723@paulmck-ThinkPad-P72> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 29959180301C5 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Jun 18, 2020 at 12:03:59PM -0700, Paul E. McKenney wrote: > On Thu, Jun 18, 2020 at 08:34:48PM +0200, Uladzislau Rezki wrote: > > > > > > > > > > I suspect that he would like to keep the tracing. > > > > > > > > > > It might be worth trying the branches, given that they would be constant > > > > > and indexed by "i". The compiler might well remove the indirection. > > > > > > > > > > The compiler guys brag about doing so, which of course might or might > > > > > not have any correlation to a given compiler actually doing so. :-/ > > > > > > > > > > Having a vfree_bulk() might well be useful, but I would feel more > > > > > confidence in that if there were other callers of kfree_bulk(). > > > > > > > > > Hmm... I think replacing that with vfree_bulk() is a good idea though. > > > > > > In other words, get rid of kfree_bulk() in favor of vfree_bulk()? > > > > > kfree_bulk() does not understand vmalloc memory. vfree_bulk() should > > be implemented to release vmalloc's pointers. On i high level it will > > be used the same way as kfree_bulk() but for vmalloc ptrs. only. > > Ah, I thought that you guys were proposing something that did bulk > free of both kmalloc and vmalloc memory. > I see your point. We could introduce something like: kvfree_bulk(slab_arra, vmalloc_array); but i do not have a strong opinion here, even though i tend to say that it would be odd. Having just vfree_bulk(), i think would be enough, as a result the code will look like: trace_rcu_invoke_kfree_bulk_callback( rcu_state.name, bkvhead[i]->nr_records, bkvhead[i]->records); if (i == 0) kfree_bulk(bkvhead[i]->nr_records, bkvhead[i]->records); else vfree_bulk(bkvhead[i]->nr_records, bkvhead[i]->records); Matthew, what is your thought? Thanks! -- Vlad rezki