19 Jun, 2019
1 commit
-
Based on 1 normalized pattern(s):
this work is licensed under the terms of the gnu gpl version 2
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 48 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Reviewed-by: Enrico Weigelt
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081204.624030236@linutronix.de
Signed-off-by: Greg Kroah-Hartman
13 May, 2019
1 commit
-
BUG_ON(x) should raise an error if x is true, but assert(x) raises an
error if x is false. Remove this bogus definition of BUG_ON(), which
isn't used anyway.Signed-off-by: Jonathan Neuschäfer
Signed-off-by: Michael S. Tsirkin
20 Mar, 2018
1 commit
-
Fixes after recent use of kvmalloc
Signed-off-by: Michael S. Tsirkin
09 Feb, 2018
1 commit
-
Pull virtio/vhost updates from Michael Tsirkin:
"virtio, vhost: fixes, cleanups, featuresThis includes the disk/cache memory stats for for the virtio balloon,
as well as multiple fixes and cleanups"* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
vhost: don't hold onto file pointer for VHOST_SET_LOG_FD
vhost: don't hold onto file pointer for VHOST_SET_VRING_ERR
vhost: don't hold onto file pointer for VHOST_SET_VRING_CALL
ringtest: ring.c malloc & memset to calloc
virtio_vop: don't kfree device on register failure
virtio_pci: don't kfree device on register failure
virtio: split device_register into device_initialize and device_add
vhost: remove unused lock check flag in vhost_dev_cleanup()
vhost: Remove the unused variable.
virtio_blk: print capacity at probe time
virtio: make VIRTIO a menuconfig to ease disabling it all
virtio/ringtest: virtio_ring: fix up need_event math
virtio/ringtest: fix up need_event math
virtio: virtio_mmio: make of_device_ids const.
firmware: Use PTR_ERR_OR_ZERO()
virtio-mmio: Use PTR_ERR_OR_ZERO()
vhost/scsi: Improve a size determination in four functions
virtio_balloon: include disk/file caches memory statistics
01 Feb, 2018
1 commit
-
Code cleanup change - moving from malloc & memset to calloc.
Signed-off-by: Peter Malone
Signed-off-by: Michael S. Tsirkin
31 Jan, 2018
2 commits
-
last kicked event index must be updated unconditionally:
even if we don't need to kick, we do not want to re-check
the same entry for events.Reported-by: Cornelia Huck
Signed-off-by: Michael S. Tsirkin
Reviewed-by: Jens Freimann -
last kicked event index must be updated unconditionally:
even if we don't need to kick, we do not want to re-check
the same entry for events.Signed-off-by: Michael S. Tsirkin
Acked-by: Cornelia Huck
Acked-by: Jason Wang
30 Jan, 2018
3 commits
-
Offset 128 overlaps the last word of the redzone.
Use 132 which is always beyond that.Signed-off-by: Michael S. Tsirkin
Signed-off-by: David S. Miller -
This is to make ptr_ring test build again.
Signed-off-by: Michael S. Tsirkin
Signed-off-by: David S. Miller -
We don't rely on lockless guarantees, but it
seems cleaner than inverting __ptr_ring_peek.Signed-off-by: Michael S. Tsirkin
Signed-off-by: David S. Miller
16 Dec, 2017
1 commit
-
Pull virtio regression fixes from Michael Tsirkin:
"Fixes two issues in the latest kernel"* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
virtio_mmio: fix devm cleanup
ptr_ring: fix up after recent ptr_ring changes
08 Dec, 2017
1 commit
-
Add more stubs to make it build.
Fixes: 81fbfe8a ("ptr_ring: use kmalloc_array()")
Signed-off-by: Michael S. Tsirkin
10 Nov, 2017
1 commit
-
MFENCE appears to be way slower than a locked instruction - let's use
LOCK ADD unconditionally, as we always did on old 32-bit.Performance testing results:
perf stat -r 10 -- ./virtio_ring_0_9 --sleep --host-affinity 0 --guest-affinity 0
Before:
0.922565990 seconds time elapsed ( +- 1.15% )
After:
0.578667024 seconds time elapsed ( +- 1.21% )i.e. about ~60% faster.
Just poking at SP would be the most natural, but if we then read the
value from SP, we get a false dependency which will slow us down.This was noted in this article:
http://shipilev.net/blog/2014/on-the-fence-with-dependencies/
And is easy to reproduce by sticking a barrier in a small non-inline
function.So let's use a negative offset - which avoids this problem since we
build with the red zone disabled.For userspace, use an address just below the redzone.
The one difference between LOCK ADD and MFENCE is that LOCK ADD does
not affect CLFLUSH, previous patches converted all uses of CLFLUSH to
call mb(), such that changes to smp_mb() won't affect it.Update mb/rmb/wmb() on 32-bit to use the negative offset, too, for
consistency.As a follow-up, it might be worth considering switching users
of CLFLUSH to another API (e.g. clflush_mb()?) - we will
then be able to convert mb() to smp_mb() again.Also arguably, GCC should switch to use LOCK ADD for __sync_synchronize().
This might be worth pursuing separately.Suggested-by: Andy Lutomirski
Signed-off-by: Michael S. Tsirkin
Acked-by: Peter Zijlstra
Acked-by: Thomas Gleixner
Cc: Andrew Morton
Cc: Andy Lutomirski
Cc: Borislav Petkov
Cc: Brian Gerst
Cc: Denys Vlasenko
Cc: H. Peter Anvin
Cc: Josh Poimboeuf
Cc: Linus Torvalds
Cc: Paul E. McKenney
Cc: qemu-devel@nongnu.org
Cc: virtualization@lists.linux-foundation.org
Link: http://lkml.kernel.org/r/1509118355-4890-1-git-send-email-mst@redhat.com
Signed-off-by: Ingo Molnar
02 Nov, 2017
1 commit
-
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.By default all files without license information are under the default
license of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if
Reviewed-by: Philippe Ombredanne
Reviewed-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
09 May, 2017
2 commits
-
Use the param flag for that.
Signed-off-by: Michael S. Tsirkin
-
Add a new flag for passing test-specific parameters.
Signed-off-by: Michael S. Tsirkin
03 May, 2017
1 commit
-
There is an || vs && typo so the assert can never be triggered.
Signed-off-by: Dan Carpenter
Signed-off-by: Michael S. Tsirkin
Acked-by: Jason Wang
20 Jan, 2017
2 commits
-
Make ringtest work on s390 too.
Signed-off-by: Halil Pasic
Acked-by: Sascha Silbe
Signed-off-by: Cornelia Huck -
Since ef1b144d ("tools/virtio/ringtest: fix run-on-all.sh to work
without /dev/cpu") run-on-all.sh uses seq 0 $HOST_AFFINITY as the list
of ids of the CPUs to run the command on (assuming ids of online CPUs
are consecutive and start from 0), where $HOST_AFFINITY is the highest
CPU id in the system previously determined using lscpu. This can fail
on systems with offline CPUs.Instead let's use lscpu to determine the list of online CPUs.
Signed-off-by: Halil Pasic
Fixes: ef1b144d ("tools/virtio/ringtest: fix run-on-all.sh to work without
/dev/cpu")
Reviewed-by: Sascha Silbe
Signed-off-by: Cornelia Huck
31 Oct, 2016
3 commits
-
Updating the event index has a memory barrier and causes more work
on the other side to actually signal the event. It is unnecessary
if a new buffer has already appeared on the ring, so poll once before
doing the update.The effect of this on the 0.9 ring implementation is pretty much
invisible, but on the new-style ring it provides a consistent 3%
performance improvement.Signed-off-by: Paolo Bonzini
Signed-off-by: Michael S. Tsirkin -
Provide new primitives used_empty/avail_empty and
build poll_avail/poll_used on top of it.Signed-off-by: Paolo Bonzini
Signed-off-by: Michael S. Tsirkin -
By using -flto and -fwhole-program, all functions from the ring implementation
can be treated as static and possibly inlined. Force this to happen through
the GCC flatten attribute.Signed-off-by: Paolo Bonzini
Signed-off-by: Michael S. Tsirkin
15 Aug, 2016
1 commit
-
Recent changes to ptr_ring broke the ringtest
which lacks a likely() stub. Fix it up.Fixes: 982fb490c298896d15e9323a882f34a57c11ff56
("ptr_ring: support zero length ring")
Signed-off-by: Michael S. Tsirkin
01 Jul, 2016
1 commit
-
Sometimes, we need support resizing multiple queues at once. This is
because it was not easy to recover to recover from a partial failure
of multiple queues resizing.Signed-off-by: Michael S. Tsirkin
Signed-off-by: Jason Wang
Signed-off-by: David S. Miller
30 Jun, 2016
1 commit
-
Several cases of overlapping changes, except the packet scheduler
conflicts which deal with the addition of the free list parameter
to qdisc_enqueue().Signed-off-by: David S. Miller
16 Jun, 2016
1 commit
-
Add ringtest based unit test for ptr ring.
Signed-off-by: Michael S. Tsirkin
Signed-off-by: David S. Miller
06 Jun, 2016
3 commits
-
Useful to measure testing framework overhead.
Signed-off-by: Michael S. Tsirkin
-
/dev/cpu is only available on x86 with certain modules (e.g. msr) enabled.
Using lscpu to get processors count is more portable.Signed-off-by: Mike Rapoport
Signed-off-by: Michael S. Tsirkin -
Having typical usage example in the README file is more convinient than in
the git history...Signed-off-by: Mike Rapoport
Signed-off-by: Michael S. Tsirkin
23 May, 2016
2 commits
-
just a stub pointer for now.
Signed-off-by: Michael S. Tsirkin
-
skips ring accesses but drops out of order support
Signed-off-by: Michael S. Tsirkin
26 Jan, 2016
1 commit
-
This adds micro-benchmarks useful for tuning virtio ring layouts.
Three layouts are currently implemented:- virtio 0.9 compatible one
- an experimental extension bypassing the ring index, polling ring
itself instead
- an experimental extension bypassing avail and used ring completelyTypical use:
sh run-on-all.sh perf stat -r 10 --log-fd 1 -- ./ring
It doesn't depend on the kernel directly, but it's handy
to have as much virtio stuff as possible in one tree.Signed-off-by: Michael S. Tsirkin