Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751505AbbEMFIz (ORCPT ); Wed, 13 May 2015 01:08:55 -0400 Received: from mail.linux-iscsi.org ([67.23.28.174]:58699 "EHLO linux-iscsi.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750842AbbEMFIx (ORCPT ); Wed, 13 May 2015 01:08:53 -0400 Message-ID: <1431493731.26897.35.camel@haakon3.risingtidesystems.com> Subject: Re: [PATCH 01/12] target: Convert se_node_acl->device_list[] to RCU hlist From: "Nicholas A. Bellinger" To: Andy Grover Cc: "Nicholas A. Bellinger" , target-devel , linux-scsi , linux-kernel , Hannes Reinecke , Christoph Hellwig , Sagi Grimberg Date: Tue, 12 May 2015 22:08:51 -0700 In-Reply-To: <5552696F.8080904@redhat.com> References: <1431422736-29125-1-git-send-email-nab@daterainc.com> <1431422736-29125-2-git-send-email-nab@daterainc.com> <5552696F.8080904@redhat.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.4.4-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2064 Lines: 53 On Tue, 2015-05-12 at 13:58 -0700, Andy Grover wrote: > On 05/12/2015 02:25 AM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch converts se_node_acl->device_list[] table for mappedluns > > to modern RCU hlist_head usage in order to support an arbitrary number > > of node_acl lun mappings. > > > > This includes changes to core_[enable,disable]_device_list_for_node() > > rcu_assign_pointer() and invokes call_rcu() for releasing memory, along > > with a number of RCU read path conversions in target_core_device.c code. > > > > Required for subsequent conversion of transport_lookup_cmd() to lock-less > > RCU read path. > > > > Cc: Hannes Reinecke > > Cc: Christoph Hellwig > > Cc: Sagi Grimberg > > Signed-off-by: Nicholas Bellinger > > diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h > > index 042a734..6fb38df 100644 > > --- a/include/target/target_core_base.h > > +++ b/include/target/target_core_base.h > > @@ -584,10 +584,12 @@ struct se_node_acl { > > char acl_tag[MAX_ACL_TAG_SIZE]; > > /* Used for PR SPEC_I_PT=1 and REGISTER_AND_MOVE */ > > atomic_t acl_pr_ref_count; > > + struct hlist_head lun_entry_hlist; > > struct se_dev_entry **device_list; > > Very nice to see all this posted! > > Patch 6 is where device_list is finally removed. Suggest squashing 1-6, > maybe after review, I'm guessing they're not bisectable. > The series is bisectable. With patch #1 in place ->device_list[] is still kzalloc()'ed, but new RCU pointer assignments are made into lun_entry_hlist[]. Squashing the RCU reader paths (#2-6) for merge is OK, but it's still nice to break up reader / updater changes into separate patches. --nab -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/