From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f199.google.com (mail-qt0-f199.google.com [209.85.216.199]) by kanga.kvack.org (Postfix) with ESMTP id 753936B02C4 for ; Tue, 2 Jan 2018 15:24:28 -0500 (EST) Received: by mail-qt0-f199.google.com with SMTP id j60so39405454qtb.20 for ; Tue, 02 Jan 2018 12:24:28 -0800 (PST) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com. [148.163.156.1]) by mx.google.com with ESMTPS id z50si5538867qtb.99.2018.01.02.12.24.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jan 2018 12:24:27 -0800 (PST) Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w02KJo42039525 for ; Tue, 2 Jan 2018 15:24:26 -0500 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0a-001b2d01.pphosted.com with ESMTP id 2f8d49rnhp-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 02 Jan 2018 15:24:25 -0500 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 2 Jan 2018 15:24:24 -0500 Date: Tue, 2 Jan 2018 12:24:54 -0800 From: "Paul E. McKenney" Subject: Re: [PATCH] Move kfree_call_rcu() to slab_common.c Reply-To: paulmck@linux.vnet.ibm.com References: <1513844387-2668-1-git-send-email-rao.shoaib@oracle.com> <20171221123630.GB22405@bombadil.infradead.org> <44044955-1ef9-1d1e-5311-d8edc006b812@oracle.com> <20171222013937.GA7829@linux.vnet.ibm.com> <106f9cdb-bb0b-539d-547e-18c509ca1163@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <106f9cdb-bb0b-539d-547e-18c509ca1163@oracle.com> Message-Id: <20180102202454.GQ7829@linux.vnet.ibm.com> Sender: owner-linux-mm@kvack.org List-ID: To: Rao Shoaib Cc: Matthew Wilcox , linux-kernel@vger.kernel.org, brouer@redhat.com, linux-mm@kvack.org On Thu, Dec 21, 2017 at 07:17:35PM -0800, Rao Shoaib wrote: > > > On 12/21/2017 05:39 PM, Paul E. McKenney wrote: > >>I left it out on purpose because the call in tiny is a little different > >> > >>rcutiny.h: > >> > >>static inline void kfree_call_rcu(struct rcu_head *head, > >> void (*func)(struct rcu_head *rcu)) > >>{ > >> call_rcu(head, func); > >>} > >> > >>tree.c: > >> > >>void kfree_call_rcu(struct rcu_head *head, > >> void (*func)(struct rcu_head *rcu)) > >>{ > >> __call_rcu(head, func, rcu_state_p, -1, 1); > >>} > >>EXPORT_SYMBOL_GPL(kfree_call_rcu); > >> > >>If we want the code to be exactly same I can create a lazy version > >>for tiny as well. However, I don not know where to move > >>kfree_call_rcu() from it's current home in rcutiny.h though. Any > >>thoughts ? > >I might be missing something subtle here, but in case I am not, my > >suggestion is to simply rename rcutiny.h's kfree_call_rcu() and otherwise > >leave it as is. If you want to update the type of the second argument, > >which got missed back in the day, there is always this: > > > >static inline void call_rcu_lazy(struct rcu_head *head, rcu_callback_t func) > >{ > > call_rcu(head, func); > >} > > > >The reason that Tiny RCU doesn't handle laziness specially is because > >Tree RCU's handling of laziness is a big no-op on the single CPU systems > >on which Tiny RCU runs. So Tiny RCU need do nothing special to support > >laziness. > > > > Thanx, Paul > > > Hi Paul, > > I can not just change the name as __kfree_call_rcu macro calls > kfree_call_rcu(). I have made tiny version of kfree_call_rcu() call > rcu_call_lazy() which calls call_rcu(). As far as the type is > concerned, my bad, I cut and posted from an older release. Latest > code is already using the typedef. Hello, Rao, Perhaps it would be best if you simply reposted the latest patch. ;-) Thanx, Paul -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750989AbeABUY3 (ORCPT + 1 other); Tue, 2 Jan 2018 15:24:29 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:39904 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750726AbeABUY2 (ORCPT ); Tue, 2 Jan 2018 15:24:28 -0500 Date: Tue, 2 Jan 2018 12:24:54 -0800 From: "Paul E. McKenney" To: Rao Shoaib Cc: Matthew Wilcox , linux-kernel@vger.kernel.org, brouer@redhat.com, linux-mm@kvack.org Subject: Re: [PATCH] Move kfree_call_rcu() to slab_common.c Reply-To: paulmck@linux.vnet.ibm.com References: <1513844387-2668-1-git-send-email-rao.shoaib@oracle.com> <20171221123630.GB22405@bombadil.infradead.org> <44044955-1ef9-1d1e-5311-d8edc006b812@oracle.com> <20171222013937.GA7829@linux.vnet.ibm.com> <106f9cdb-bb0b-539d-547e-18c509ca1163@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <106f9cdb-bb0b-539d-547e-18c509ca1163@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18010220-0008-0000-0000-000002B7C34E X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008306; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000244; SDB=6.00969305; UDB=6.00490817; IPR=6.00749279; BA=6.00005764; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00018835; XFM=3.00000015; UTC=2018-01-02 20:24:23 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18010220-0009-0000-0000-000037C33C70 Message-Id: <20180102202454.GQ7829@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-02_16:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801020285 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Dec 21, 2017 at 07:17:35PM -0800, Rao Shoaib wrote: > > > On 12/21/2017 05:39 PM, Paul E. McKenney wrote: > >>I left it out on purpose because the call in tiny is a little different > >> > >>rcutiny.h: > >> > >>static inline void kfree_call_rcu(struct rcu_head *head, > >>                   void (*func)(struct rcu_head *rcu)) > >>{ > >>     call_rcu(head, func); > >>} > >> > >>tree.c: > >> > >>void kfree_call_rcu(struct rcu_head *head, > >>             void (*func)(struct rcu_head *rcu)) > >>{ > >>     __call_rcu(head, func, rcu_state_p, -1, 1); > >>} > >>EXPORT_SYMBOL_GPL(kfree_call_rcu); > >> > >>If we want the code to be exactly same I can create a lazy version > >>for tiny as well. However,  I don not know where to move > >>kfree_call_rcu() from it's current home in rcutiny.h though. Any > >>thoughts ? > >I might be missing something subtle here, but in case I am not, my > >suggestion is to simply rename rcutiny.h's kfree_call_rcu() and otherwise > >leave it as is. If you want to update the type of the second argument, > >which got missed back in the day, there is always this: > > > >static inline void call_rcu_lazy(struct rcu_head *head, rcu_callback_t func) > >{ > > call_rcu(head, func); > >} > > > >The reason that Tiny RCU doesn't handle laziness specially is because > >Tree RCU's handling of laziness is a big no-op on the single CPU systems > >on which Tiny RCU runs. So Tiny RCU need do nothing special to support > >laziness. > > > > Thanx, Paul > > > Hi Paul, > > I can not just change the name as __kfree_call_rcu macro calls > kfree_call_rcu(). I have made tiny version of kfree_call_rcu() call > rcu_call_lazy() which calls call_rcu(). As far as the type is > concerned, my bad, I cut and posted from an older release. Latest > code is already using the typedef. Hello, Rao, Perhaps it would be best if you simply reposted the latest patch. ;-) Thanx, Paul