All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@pmcs.com>
To: Tomas Henzl <thenzl@redhat.com>,
	"JBottomley@Parallels.com" <JBottomley@Parallels.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Cc: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>,
	Murthy Bhat <Murthy.Bhat@pmcs.com>,
	Santosh Akula <Santosh.Akula@pmcs.com>,
	Gana Sridaran <Gana.Sridaran@pmcs.com>,
	"aacraid@pmc-sierra.com" <aacraid@pmc-sierra.com>,
	Rich Bono <Rich.Bono@pmcs.com>
Subject: RE: [PATCH 01/10] aacraid: SCSI blk tag support
Date: Thu, 3 Dec 2015 21:25:23 +0000	[thread overview]
Message-ID: <198D06D448A18D4E93F08FB849C4E39D7D1EF153@BBYEXM01.pmc-sierra.internal> (raw)
In-Reply-To: <5660652D.8080501@redhat.com>

Hello Tomas,

> -----Original Message-----
> From: Tomas Henzl [mailto:thenzl@redhat.com]
> Sent: Thursday, December 3, 2015 7:52 AM
> To: Raghava Aditya Renukunta; JBottomley@Parallels.com; linux-
> scsi@vger.kernel.org
> Cc: Mahesh Rajashekhara; Murthy Bhat; Santosh Akula; Gana Sridaran;
> aacraid@pmc-sierra.com; Rich Bono
> Subject: Re: [PATCH 01/10] aacraid: SCSI blk tag support
> 
> On 1.12.2015 13:39, Raghava Aditya Renukunta wrote:
> > From: Raghava Aditya Renukunta <raghavaaditya.renukunta@pmcs.com>
> >
> > The method to allocate and free FIB's in the present code utilizes
> > spinlocks.Multiple IO's have to wait on the spinlock to acquire or
> > free fibs creating a performance bottleneck.
> >
> > An alternative solution would be to use block layer tags to keep track
> > of the fibs allocated and freed. To this end 2 functions
> > aac_fib_alloc_tag and aac_fib_free_tag were created which utilize the
> > blk layer tags to plug into the Fib pool.These functions are used
> > exclusively in the IO path. 8 fibs are reserved for the use of AIF
> > management software and utilize the previous spinlock based
> > implementations.
> >


[....]

> >
> > @@ -166,6 +166,49 @@ int aac_fib_setup(struct aac_dev * dev)
> >   *	aac_fib_alloc	-	allocate a fib
> >   *	@dev: Adapter to allocate the fib for
> >   *
> > + *	Allocate a fib from the adapter fib pool using tags
> > + *	from the blk layer.
> > + */
> > +
> > +struct fib *aac_fib_alloc_tag(struct aac_dev *dev, struct scsi_cmnd
> *scmd)
> > +{
> > +	struct fib *fibptr;
> > +
> > +	fibptr = &dev->fibs[scmd->request->tag];
> > +	/*
> > +	 *	Set the proper node type code and node byte size
> > +	 */
> 
> Can't you just make most of the initialisation below just once when the driver
> starts?
> 
> > +	fibptr->type = FSAFS_NTC_FIB_CONTEXT;
> > +	fibptr->size = sizeof(struct fib);
> > +	/*
> > +	 *	Null out fields that depend on being zero at the start of
> > +	 *	each I/O
> > +	 */
> > +	fibptr->hw_fib_va->header.XferState = 0;
> > +	fibptr->flags = 0;
> 
> For example the flags field is initialised  here to '0', then
> in aac_fib_send again to zero and later is 'fibptr->flags =
> FIB_CONTEXT_FLAG;'
> Removing part of it would help I think.
> The code here is not new so, if I am right, please plan it for a next series.

I will look into it and see where the code is being duplicated and will remove it,
If it does not do anything new.

> 
> > +	fibptr->callback = NULL;
> > +	fibptr->callback_data = NULL;
> > +
> > +	return fibptr;
> > +}
> > +
> > +/**
> > + *	aac_fib_free_tag	free a fib
> > + *	@fibptr: fib to free up
> > + *
> > + *	Placeholder to free tag allocated fibs
> > + *	Does not do anything
> > + */
> > +
> > +void aac_fib_free_tag(struct fib *fibptr)
> > +{
> > +	(void)fibptr;
> > +}
> 
> I agree with Johannes, I also don't like the aac_fib_free_tag as it is.
> With the aac_fib_free_tag you may add -

The reason it is still there is that , future versions can use it to add 
something meaningful(set flags etc).I could remove it now since 
it serves no purpose

> Reviewed-by: Tomas Henzl <thenzl@redhat.com>

Regards,
Raghava Aditya

  reply	other threads:[~2015-12-03 21:25 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 12:39 [PATCH 00/10] aacraid: Patchset for aacraid driver version 41052 Raghava Aditya Renukunta
2015-12-01 12:39 ` [PATCH 01/10] aacraid: SCSI blk tag support Raghava Aditya Renukunta
2015-12-02 10:49   ` Johannes Thumshirn
2015-12-03 15:52   ` Tomas Henzl
2015-12-03 21:25     ` Raghava Aditya Renukunta [this message]
2015-12-01 12:39 ` [PATCH 02/10] aacraid: Fix RRQ overload Raghava Aditya Renukunta
2015-12-02  9:26   ` Johannes Thumshirn
2015-12-04 14:11   ` Tomas Henzl
2015-12-01 12:39 ` [PATCH 03/10] aacraid: Added EEH support Raghava Aditya Renukunta
2015-12-02  9:41   ` Johannes Thumshirn
2015-12-02 23:14     ` Raghava Aditya Renukunta
2015-12-04 14:20   ` Tomas Henzl
2015-12-01 12:39 ` [PATCH 04/10] aacraid: Fix memory leak in aac_fib_map_free Raghava Aditya Renukunta
2015-12-02  9:44   ` Johannes Thumshirn
2015-12-04 14:34   ` Tomas Henzl
2015-12-05  0:40     ` Raghava Aditya Renukunta
2015-12-07 14:05       ` Tomas Henzl
2015-12-07 19:07         ` Raghava Aditya Renukunta
2015-12-01 12:39 ` [PATCH 05/10] aacraid: Set correct msix count for EEH recovery Raghava Aditya Renukunta
2015-12-02 10:27   ` Johannes Thumshirn
2015-12-02 22:59     ` Raghava Aditya Renukunta
2015-12-04 14:10   ` Tomas Henzl
2015-12-05  0:15     ` Raghava Aditya Renukunta
2015-12-01 12:39 ` [PATCH 06/10] aacraid: Fundamental reset support for Series 7 Raghava Aditya Renukunta
2015-12-02  9:49   ` Johannes Thumshirn
2015-12-01 12:39 ` [PATCH 07/10] aacraid: Fix AIF triggered IOP_RESET Raghava Aditya Renukunta
2015-12-02 10:00   ` Johannes Thumshirn
2015-12-02 22:29     ` Raghava Aditya Renukunta
2015-12-03  8:03       ` Johannes Thumshirn
2015-12-01 12:39 ` [PATCH 08/10] aacraid: Disable device ID wildcard Raghava Aditya Renukunta
2015-12-02 10:02   ` Johannes Thumshirn
2015-12-03 15:54   ` Tomas Henzl
2015-12-03 21:32     ` Raghava Aditya Renukunta
2015-12-04  8:33       ` Christoph Hellwig
2015-12-07 19:07         ` Raghava Aditya Renukunta
2015-12-01 12:39 ` [PATCH 09/10] aacraid: Fix character device re-initialization Raghava Aditya Renukunta
2015-12-02 10:13   ` Johannes Thumshirn
2015-12-02 22:30     ` Raghava Aditya Renukunta
2015-12-01 12:39 ` [PATCH 09/10] aacraid: Fix character device re initialization Raghava Aditya Renukunta
2015-12-02  9:18   ` Johannes Thumshirn
2015-12-02 21:59     ` Raghava Aditya Renukunta
2015-12-01 12:39 ` [PATCH 10/10] aacraid: Update driver version Raghava Aditya Renukunta
2015-12-02 10:14   ` Johannes Thumshirn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=198D06D448A18D4E93F08FB849C4E39D7D1EF153@BBYEXM01.pmc-sierra.internal \
    --to=raghavaaditya.renukunta@pmcs.com \
    --cc=Gana.Sridaran@pmcs.com \
    --cc=JBottomley@Parallels.com \
    --cc=Mahesh.Rajashekhara@pmcs.com \
    --cc=Murthy.Bhat@pmcs.com \
    --cc=Rich.Bono@pmcs.com \
    --cc=Santosh.Akula@pmcs.com \
    --cc=aacraid@pmc-sierra.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=thenzl@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.