From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933151AbcAMJW4 (ORCPT ); Wed, 13 Jan 2016 04:22:56 -0500 Received: from mail.linux-iscsi.org ([67.23.28.174]:59001 "EHLO linux-iscsi.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933064AbcAMJWv (ORCPT ); Wed, 13 Jan 2016 04:22:51 -0500 Message-ID: <1452676969.27508.60.camel@haakon3.risingtidesystems.com> Subject: Re: [PATCH-for-4.6 1/6] target: Add target_alloc_session() helper function From: "Nicholas A. Bellinger" To: Christoph Hellwig Cc: "Nicholas A. Bellinger" , target-devel , linux-scsi , lkml , Sagi Grimberg , Hannes Reinecke , Andy Grover , Vasu Dev , Vu Pham Date: Wed, 13 Jan 2016 01:22:49 -0800 In-Reply-To: <20160113081700.GB12642@lst.de> References: <1452458668-11034-1-git-send-email-nab@daterainc.com> <1452458668-11034-2-git-send-email-nab@daterainc.com> <20160112151119.GD2058@lst.de> <1452672566.27508.44.camel@haakon3.risingtidesystems.com> <20160113081700.GB12642@lst.de> 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 On Wed, 2016-01-13 at 09:17 +0100, Christoph Hellwig wrote: > On Wed, Jan 13, 2016 at 12:09:26AM -0800, Nicholas A. Bellinger wrote: > > > I'd much rather have the fabrics drivers call transport_alloc_session_tags > > > directly from the callback than growing even more arguments here. > > > > > > > What's the point..? > > > > Only vhost-scsi currently needs to allocate extra resources for > > se_session percpu-ida tag pre-allocation. > > The point is that allocating "tags" (or better command structures) isn't > fundamentally related to allocating a session, and in fact not even > used by many drivers. Huh..? It's used by iscsi-target, ib_isert, tcm_qla2xxx, vhost-scsi and tcm_fc. That's the majority of the drivers people care about. > A flow where drivers that need these "tags" > explicitly allocate them is a lot more obvious than forcing more > arguments to a function that already has a lot and isn't related to > these "tags" otherwise. The goal is to get to the point where all fabric drivers use tag pre-allocation, and not vice-versa. That said, I think it makes sense to leave it as is instead of adding new callbacks for iscsi-target, ib_isert, and tcm_fc to just handle se_session tag pre-allocation.