linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: <Tudor.Ambarus@microchip.com>
To: <alexander.sverdlin@nokia.com>, <luisalberto@google.com>
Cc: vigneshr@ti.com, bbrezillon@kernel.org, richard@nod.at,
	jethro@fortanix.com, linux-kernel@vger.kernel.org,
	linux-mtd@lists.infradead.org, miquel.raynal@bootlin.com,
	mika.westerberg@linux.intel.com
Subject: Re: [PATCH] mtd: revert "spi-nor: intel: provide a range for poll_timout"
Date: Tue, 28 Jul 2020 08:28:22 +0000	[thread overview]
Message-ID: <afddc35d-fcef-695c-1522-df871f169a2d@microchip.com> (raw)
In-Reply-To: <ca4d6a2f-b3c8-2b52-431e-81f3cb956db7@nokia.com>

Hi, Mika,

On 7/23/20 12:05 PM, Alexander Sverdlin wrote:
> 
> Hello Tudor,
> 
> On 22/07/2020 19:03, Tudor.Ambarus@microchip.com wrote:
>> On 7/22/20 7:37 PM, Alexander Sverdlin wrote:
> 
> [...]
> 
>>> I've performed my testing as well and got the following results:
>>>
>>> Vanilla Linux 4.9 (i.e. before the introduction of the offending
>>> patch):
>>>
>>> dd if=/dev/flash/by-name/XXX of=/dev/null bs=4k
>>> 1280+0 records in
>>> 1280+0 records out
>>> 5242880 bytes (5.2 MB, 5.0 MiB) copied, 3.91981 s, 1.3 MB/s
>>>
>>> Vanilla 4.19 (i.e. with offending patch):
>>>
>>> dd if=/dev/flash/by-name/XXX of=/dev/null bs=4k
>>> 1280+0 records in
>>> 1280+0 records out
>>> 5242880 bytes (5.2 MB, 5.0 MiB) copied, 6.70891 s, 781 kB/s
>>>
>>> 4.19 + revert:
>>>
>>> dd if=/dev/flash/by-name/XXX of=/dev/null bs=4k
>>> 1280+0 records in
>>> 1280+0 records out
>>> 5242880 bytes (5.2 MB, 5.0 MiB) copied, 3.90503 s, 1.3 MB/s
>>>

[cut]

> with 10us it looks like this:
> 
> dd if=/dev/flash/by-name/... of=/dev/null bs=4k
> 1280+0 records in
> 1280+0 records out
> 5242880 bytes (5.2 MB, 5.0 MiB) copied, 4.33816 s, 1.2 MB/s
> 
> Which means, there is a performance regression and it would depend on
> the test case, how bad it will be...
> 

We need a bit of a context here. Using a tight-loop for polling and
having a 5 secs timeout is fishy. For anything that's expected to
complete less than a few usec, it's usually better to poll continuously,
but then a timeout of 5s is way too big. Can we shrink the timeout to
few msecs?

I'll queue this to spi-nor/next to fix the perf regression, but I would
like to continue the discussion and to come up with an incremental patch
on top of this one.

Cheers,
ta
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  reply	other threads:[~2020-07-28  8:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 22:46 [PATCH] mtd: revert "spi-nor: intel: provide a range for poll_timout" Luis Alberto Herrera
2020-06-11 10:39 ` Mika Westerberg
2020-06-26 10:57 ` Tudor.Ambarus
2020-07-22 16:37 ` Alexander Sverdlin
2020-07-22 17:03   ` Tudor.Ambarus
2020-07-23  9:05     ` Alexander Sverdlin
2020-07-28  8:28       ` Tudor.Ambarus [this message]
2020-07-28  9:55 ` Tudor Ambarus

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=afddc35d-fcef-695c-1522-df871f169a2d@microchip.com \
    --to=tudor.ambarus@microchip.com \
    --cc=alexander.sverdlin@nokia.com \
    --cc=bbrezillon@kernel.org \
    --cc=jethro@fortanix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=luisalberto@google.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.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).