From: "Krzysztof Wilczyński" <kw@linux.com>
To: Niklas Cassel <cassel@kernel.org>
Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@linux.intel.com>,
Damien Le Moal <dlemoal@kernel.org>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH v4] misc: pci_endpoint_test: Use memcpy_toio()/memcpy_fromio() for BAR tests
Date: Fri, 17 May 2024 19:09:29 +0900 [thread overview]
Message-ID: <20240517100929.GB202520@rocinante> (raw)
In-Reply-To: <20240322164139.678228-1-cassel@kernel.org>
Hello,
> The current code uses writel()/readl(), which has an implicit memory
> barrier for every single readl()/writel().
>
> Additionally, reading 4 bytes at a time over the PCI bus is not really
> optimal, considering that this code is running in an ioctl handler.
>
> Use memcpy_toio()/memcpy_fromio() for BAR tests.
>
> Before patch with a 4MB BAR:
> $ time /usr/bin/pcitest -b 1
> BAR1: OKAY
> real 0m 1.56s
>
> After patch with a 4MB BAR:
> $ time /usr/bin/pcitest -b 1
> BAR1: OKAY
> real 0m 0.54s
Applied to misc, thank you!
[1/1] misc: pci_endpoint_test: Use memcpy_toio()/memcpy_fromio() for BAR tests
https://git.kernel.org/pci/pci/c/9ff0a8cdf12e
Krzysztof
prev parent reply other threads:[~2024-05-17 10:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-22 16:41 [PATCH v4] misc: pci_endpoint_test: Use memcpy_toio()/memcpy_fromio() for BAR tests Niklas Cassel
2024-03-22 17:03 ` Kuppuswamy Sathyanarayanan
2024-03-25 7:58 ` Niklas Cassel
2024-04-18 9:08 ` Niklas Cassel
2024-04-18 17:49 ` Kuppuswamy Sathyanarayanan
2024-05-04 14:34 ` Manivannan Sadhasivam
2024-05-17 10:09 ` Krzysztof Wilczyński [this message]
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=20240517100929.GB202520@rocinante \
--to=kw@linux.com \
--cc=arnd@arndb.de \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kishon@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=sathyanarayanan.kuppuswamy@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