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.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=unavailable 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 8EB2AC10F0E for ; Tue, 9 Apr 2019 19:14:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 678FB2084F for ; Tue, 9 Apr 2019 19:14:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726720AbfDITOO (ORCPT ); Tue, 9 Apr 2019 15:14:14 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:48674 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726628AbfDITON (ORCPT ); Tue, 9 Apr 2019 15:14:13 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x39JAKB1059857 for ; Tue, 9 Apr 2019 15:14:12 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0b-001b2d01.pphosted.com with ESMTP id 2rrxxyphcf-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 09 Apr 2019 15:14:12 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 9 Apr 2019 20:14:11 +0100 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 9 Apr 2019 20:14:06 +0100 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x39JE5SC28901488 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 9 Apr 2019 19:14:05 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5EA36B205F; Tue, 9 Apr 2019 19:14:05 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 491FEB2066; Tue, 9 Apr 2019 19:14:05 +0000 (GMT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.188]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 9 Apr 2019 19:14:05 +0000 (GMT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 933AE16C36C6; Tue, 9 Apr 2019 12:14:06 -0700 (PDT) Date: Tue, 9 Apr 2019 12:14:06 -0700 From: "Paul E. McKenney" To: Mathieu Desnoyers Cc: "Joel Fernandes, Google" , rcu , linux-kernel , Ingo Molnar , Lai Jiangshan , dipankar , Andrew Morton , Josh Triplett , Thomas Gleixner , Peter Zijlstra , rostedt , David Howells , Eric Dumazet , fweisbec , Oleg Nesterov , linux-nvdimm , dri-devel , amd-gfx Subject: Re: [PATCH RFC tip/core/rcu 0/4] Forbid static SRCU use in modules Reply-To: paulmck@linux.ibm.com References: <20190402142816.GA13084@linux.ibm.com> <20190408154616.GO14111@linux.ibm.com> <1489474416.1465.1554744287985.JavaMail.zimbra@efficios.com> <20190409154012.GC248418@google.com> <534133139.2374.1554825363211.JavaMail.zimbra@efficios.com> <20190409164031.GE14111@linux.ibm.com> <1958511501.2412.1554828325809.JavaMail.zimbra@efficios.com> <20190409175549.GG14111@linux.ibm.com> <1445093299.2510.1554833051142.JavaMail.zimbra@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1445093299.2510.1554833051142.JavaMail.zimbra@efficios.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 19040919-0040-0000-0000-000004DE9F03 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010897; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000284; SDB=6.01186711; UDB=6.00621549; IPR=6.00967471; MB=3.00026366; MTD=3.00000008; XFM=3.00000015; UTC=2019-04-09 19:14:11 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19040919-0041-0000-0000-000008E9A514 Message-Id: <20190409191406.GJ14111@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-09_10:,, 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 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904090121 Sender: rcu-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: rcu@vger.kernel.org On Tue, Apr 09, 2019 at 02:04:11PM -0400, Mathieu Desnoyers wrote: > ----- On Apr 9, 2019, at 1:55 PM, paulmck paulmck@linux.ibm.com wrote: > [...] > > The current state is not horrible, so my thought would be to give it > > some time to see if better thoughts arise. > > > > Either way, cleanup_srcu_struct() keeps its current checks for callbacks > > still being in flight, which is why I believe that the current state is > > not horrible. ;-) > > In that case, I think the comment above cleanup_srcu_struct_quiesced() in > include/linux/srcu.h needs to be updated to cover situations where API > users statically define a SRCU domain in a module and intend to unload > that module. > > Given that we end up doing the allocation/cleanup under the hood, the > API users don't interact with init_srcu_struct() nor cleanup_srcu_struct(), > so it's not obvious that this comment also applies to them. Actually, it turned out that cleanup_srcu_struct_quiesced() is extremely hard to use correctly, and maybe even impossible to use correctly. So cleanup_srcu_struct_quiesced has been eliminated in current -rcu. Thanx, Paul > Thanks, > > Mathieu > > -- > Mathieu Desnoyers > EfficiOS Inc. > http://www.efficios.com >