From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Bloch Subject: Re: [PATCH rdma-next 6/6] IB/mlx5: Move locks initialization to the corresponding stage Date: Thu, 28 Dec 2017 09:51:24 +0200 Message-ID: <3ad02325-5244-31c9-eb6d-139a17b064b6@mellanox.com> References: <20171224124015.31917-1-leon@kernel.org> <20171224124015.31917-7-leon@kernel.org> <20171228051806.GP25436@ziepe.ca> <20171228053259.GP3494@mtr-leonro.local> <20171228053523.GR25436@ziepe.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20171228053523.GR25436-uk2M96/98Pc@public.gmane.org> Content-Language: en-US Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jason Gunthorpe , Leon Romanovsky Cc: Doug Ledford , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-rdma@vger.kernel.org On 28/12/2017 07:35, Jason Gunthorpe wrote: > On Thu, Dec 28, 2017 at 07:32:59AM +0200, Leon Romanovsky wrote: >> On Wed, Dec 27, 2017 at 10:18:06PM -0700, Jason Gunthorpe wrote: >>> On Sun, Dec 24, 2017 at 02:40:15PM +0200, Leon Romanovsky wrote: >>>> From: Mark Bloch >>>> >>>> Unconditional locks/list initialization should be done in the INIT stage. >>>> Remove those from the CAPS stage and move them to the proper stage. >>> >>> So why not always initialize the srcu instead of using that wonky >>> callback function? >> >> Maybe, but now, it is out of scope for this series, which more or less >> moves code from one place to another. > > So the possibility of an uninited SRCU existed before and this is > fixing a bug? I had the impression this series was introducing that > possibility... > Yes, let me explain. This entire series aims to allow to turn on/off certain features and to group the init/cleanup of those features together. If you take that into account, the srcu (which is needed only for ODP) needs to be done in the ODP stage, but the issue is that not only ODP code uses the srcu, destroy_mkey() will sync on it. So I can move the srcu initialization to INIT, but this way we lose context when looking at the ODP stage. > Jason > Mark -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html