netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] refactor the ringtest testing for ptr_ring
@ 2021-07-20  2:21 Yunsheng Lin
  2021-07-20  2:21 ` [PATCH v2 1/4] tools headers UAPI: add cache aligning related macro Yunsheng Lin
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Yunsheng Lin @ 2021-07-20  2:21 UTC (permalink / raw)
  To: davem, kuba, mst, jasowang
  Cc: nickhu, green.hu, deanbo422, akpm, yury.norov, andriy.shevchenko,
	ojeda, ndesaulniers, joe, linux-kernel, virtualization, netdev,
	linuxarm

tools/include/* has a lot of abstract layer for building
kernel code from userspace, so reuse or add the abstract
layer in tools/include/ to build the ptr_ring for ringtest
testing.

The same abstract layer can be used to build the ptr_ring
for ptr_ring benchmark app too, see [1].

1. https://lkml.org/lkml/2021/7/1/275

V2:
1. rebased on the Eugenio's patchset and split patch 1 to
   more reviewable ones.
2. only add the interface used by ringtest, so that the
   added code can be built and tested.
3. cpu_relax() only support x86 and arm64 now.
4. use 64 bytes as the default SMP_CACHE_BYTES.

Yunsheng Lin (4):
  tools headers UAPI: add cache aligning related macro
  tools headers UAPI: add kmalloc/vmalloc related interface
  tools headers UAPI: add cpu_relax() implementation for x86 and arm64
  tools/virtio: use common infrastructure to build ptr_ring.h

 tools/include/asm/processor.h    |  26 ++++++++++
 tools/include/linux/cache.h      |  25 ++++++++++
 tools/include/linux/gfp.h        |   2 +
 tools/include/linux/slab.h       |  46 ++++++++++++++++++
 tools/virtio/ringtest/Makefile   |   2 +-
 tools/virtio/ringtest/main.h     |  99 +++-----------------------------------
 tools/virtio/ringtest/ptr_ring.c | 101 ++-------------------------------------
 7 files changed, 109 insertions(+), 192 deletions(-)
 create mode 100644 tools/include/asm/processor.h
 create mode 100644 tools/include/linux/cache.h
 create mode 100644 tools/include/linux/slab.h

-- 
2.7.4


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-07-22  8:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-20  2:21 [PATCH v2 0/4] refactor the ringtest testing for ptr_ring Yunsheng Lin
2021-07-20  2:21 ` [PATCH v2 1/4] tools headers UAPI: add cache aligning related macro Yunsheng Lin
2021-07-20  2:21 ` [PATCH v2 2/4] tools headers UAPI: add kmalloc/vmalloc related interface Yunsheng Lin
2021-07-20  2:21 ` [PATCH v2 3/4] tools headers UAPI: add cpu_relax() implementation for x86 and arm64 Yunsheng Lin
2021-07-21 20:53   ` David Laight
2021-07-22  8:18     ` Yunsheng Lin
2021-07-22  8:45       ` David Laight
2021-07-20  2:21 ` [PATCH v2 4/4] tools/virtio: use common infrastructure to build ptr_ring.h Yunsheng Lin

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).