linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Matthew Wilcox <willy@linux.intel.com>
Cc: linux-scsi@vger.kernel.org, DL-MPTFusionLinux@lsi.com
Subject: Re: [PATCH 2/2] mpt2sas: Reduce cache misses in command submission path
Date: Wed, 6 Apr 2011 09:46:55 -0400	[thread overview]
Message-ID: <20110406134654.GB21729@infradead.org> (raw)
In-Reply-To: <20110405214714.GR4183@linux.intel.com>

On Tue, Apr 05, 2011 at 05:47:14PM -0400, Matthew Wilcox wrote:
> 
> In a high-IOPS workload, mpt2sas_base_get_smid_scsiio shows up in the top
> 20 cache misses.  This is because the data structure used for allocating
> SMIDs is cache unfriendly; freed SMIDs are placed on the tail of the list,
> guaranteeing a cache miss by the time we allocate it again.
> 
> By placing the freed SMID at the head of the list, we increase the
> likelihood of it being cache-hot when it's used again.

Looks good for now.  But given that the smids are a statically allocated
ressource it might be a good idea to get rid of all the rather cache
unfriendly linked lists and locking and use a bitmap to allocate
smids and then just index into a linear array of them.


  reply	other threads:[~2011-04-06 13:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05 21:47 [PATCH 2/2] mpt2sas: Reduce cache misses in command submission path Matthew Wilcox
2011-04-06 13:46 ` Christoph Hellwig [this message]
2011-04-07  5:26   ` Matthew Wilcox

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=20110406134654.GB21729@infradead.org \
    --to=hch@infradead.org \
    --cc=DL-MPTFusionLinux@lsi.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=willy@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).