All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Douglas Gilbert <dgilbert@interlog.com>, linux-scsi@vger.kernel.org
Cc: martin.petersen@oracle.com, jejb@linux.vnet.ibm.com,
	bostroesser@gmail.com, ddiss@suse.de, hare@suse.de
Subject: Re: [PATCH] scsi_debug: change store from vmalloc to sgl
Date: Thu, 5 Nov 2020 20:06:35 -0800	[thread overview]
Message-ID: <be8196e5-0eab-f40b-1985-c04c3c3a1682@acm.org> (raw)
In-Reply-To: <20201106003852.24113-1-dgilbert@interlog.com>

On 11/5/20 4:38 PM, Douglas Gilbert wrote:
> A long time ago this driver's store was allocated by kmalloc() or
> alloc_pages(). When this was switched to vmalloc() the author
> noticed slower ramdisk access times and more variability in repeated
> tests. So try going back with sgl_alloc_order() to get uniformly
> sized allocations in a sometimes large scatter gather _array_. That
> array is the basis of keeping O(1) access to the store.
> 
> Using sgl_alloc_order() and friends requires CONFIG_SGL_ALLOC
> so add a 'select' to the Kconfig file.
> 
> Remove kcalloc() in resp_verify() as sgl_s can now be compared
> directly without forming an intermediate buffer. This is a
> performance win for the SCSI VERIFY command implementation.
> 
> Make the SCSI COMPARE AND WRITE command yield the offset of the
> first miscompared byte when the compare fails (as required by
> T10).
> 
> This patch depends on: "[PATCH v4 0/4] scatterlist: add new
> capabilities".

Hi Doug,

Although I'm fine with this patch: has it been considered to use huge
pages instead of allocating a scatterlist? Would that have the same or
even better performance advantages?

Thanks,

Bart.

  reply	other threads:[~2020-11-06  4:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06  0:38 [PATCH] scsi_debug: change store from vmalloc to sgl Douglas Gilbert
2020-11-06  4:06 ` Bart Van Assche [this message]
2020-11-06  7:09   ` Douglas Gilbert
2020-11-09  5:24 ` kernel test robot
2020-11-09  5:24   ` kernel test robot
2020-11-09  5:41   ` Douglas Gilbert

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=be8196e5-0eab-f40b-1985-c04c3c3a1682@acm.org \
    --to=bvanassche@acm.org \
    --cc=bostroesser@gmail.com \
    --cc=ddiss@suse.de \
    --cc=dgilbert@interlog.com \
    --cc=hare@suse.de \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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.