linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] dvb: add support for memory mapped I/O
@ 2017-12-21 16:17 Mauro Carvalho Chehab
  2017-12-21 16:18 ` [PATCH 10/11] fs: compat_ioctl: add new DVB demux ioctls Mauro Carvalho Chehab
  0 siblings, 1 reply; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2017-12-21 16:17 UTC (permalink / raw)
  To: Linux Media Mailing List, Jonathan Corbet
  Cc: Mauro Carvalho Chehab, Mauro Carvalho Chehab,
	Linux Doc Mailing List, Sakari Ailus, Geunyoung Kim,
	Philippe Ombredanne, Laurent Pinchart, Seung-Woo Kim,
	Junghak Sung, Kyungmin Park, Satendra Singh Thakur, linux-fsdevel,
	devendra sharma, Alexander Viro, Pawel Osciak, Marek Szyprowski,
	Greg Kroah-Hartman, Thomas Gleixner, Inki Dae, Kate Stewart

This patch series is based on a work made by Samsung in 2015 meant
to add memory-mapped I/O to the Linux media, in order to improve
performance. The preparation patches were merged on that time, but
we didn't have time to test and finish the final patch.

Fortunately, Satendra helped us doing such port. On my tests, even
on USB drivers, where we need to do DMA at URB buffers, the
performance gains seem considerable.

On the tests I did today, with perf stat, the gains were expressive:

	- the number of task clocks reduced by 3,5 times;
	- the number of context switches reduced by about 4,5 times;
	- the number of CPU cycles reduced by almost 3,5 times;
	- the number of executed instructions reduced almost 2 times;
	- the number of cache references reduced by almost 8 times;
	- the number of cache misses reduced more than 4,5 times.

The patches are at:
	https://git.linuxtv.org/mchehab/experimental.git/log/?h=dvb_mmap

An userspace test patchset is at:
	https://git.linuxtv.org/mchehab/experimental-v4l-utils.git/log/?h=dvb_mmap

More details about my tests can be found on my comments to the
original Satendra's patch:

	https://patchwork.linuxtv.org/patch/46101/

Mauro Carvalho Chehab (9):
  media: vb2-core: add pr_fmt() macro
  media: vb2-core: add a new warning about pending buffers
  media: dvb_vb2: fix a warning about streamoff logic
  media: move videobuf2 to drivers/media/common
  media: dvb uAPI docs: document demux mmap/munmap syscalls
  media: dvb uAPI docs: document mmap-related ioctls
  media: dvb-core: get rid of mmap reserved field
  fs: compat_ioctl: add new DVB demux ioctls
  media: dvb_vb2: add SPDX headers

Satendra Singh Thakur (2):
  media: vb2-core: Fix a bug about unnecessary calls to queue cancel and
    free
  media: videobuf2: Add new uAPI for DVB streaming I/O

 Documentation/media/uapi/dvb/dmx-expbuf.rst        |  88 +++++
 Documentation/media/uapi/dvb/dmx-mmap.rst          | 116 ++++++
 Documentation/media/uapi/dvb/dmx-munmap.rst        |  54 +++
 Documentation/media/uapi/dvb/dmx-qbuf.rst          |  83 ++++
 Documentation/media/uapi/dvb/dmx-querybuf.rst      |  63 +++
 Documentation/media/uapi/dvb/dmx-reqbufs.rst       |  74 ++++
 Documentation/media/uapi/dvb/dmx_fcalls.rst        |   6 +
 drivers/media/common/Kconfig                       |   1 +
 drivers/media/common/Makefile                      |   2 +-
 drivers/media/common/videobuf/Kconfig              |  31 ++
 drivers/media/common/videobuf/Makefile             |   7 +
 .../videobuf}/videobuf2-core.c                     |  38 +-
 .../videobuf}/videobuf2-dma-contig.c               |   0
 .../videobuf}/videobuf2-dma-sg.c                   |   0
 .../{v4l2-core => common/videobuf}/videobuf2-dvb.c |   0
 .../videobuf}/videobuf2-memops.c                   |   0
 .../videobuf}/videobuf2-v4l2.c                     |   0
 .../videobuf}/videobuf2-vmalloc.c                  |   0
 drivers/media/dvb-core/Makefile                    |   2 +-
 drivers/media/dvb-core/dmxdev.c                    | 196 ++++++++--
 drivers/media/dvb-core/dmxdev.h                    |   4 +
 drivers/media/dvb-core/dvb_vb2.c                   | 430 +++++++++++++++++++++
 drivers/media/dvb-core/dvb_vb2.h                   |  74 ++++
 drivers/media/v4l2-core/Kconfig                    |  32 --
 drivers/media/v4l2-core/Makefile                   |   7 -
 fs/compat_ioctl.c                                  |   5 +
 include/uapi/linux/dvb/dmx.h                       |  63 ++-
 27 files changed, 1290 insertions(+), 86 deletions(-)
 create mode 100644 Documentation/media/uapi/dvb/dmx-expbuf.rst
 create mode 100644 Documentation/media/uapi/dvb/dmx-mmap.rst
 create mode 100644 Documentation/media/uapi/dvb/dmx-munmap.rst
 create mode 100644 Documentation/media/uapi/dvb/dmx-qbuf.rst
 create mode 100644 Documentation/media/uapi/dvb/dmx-querybuf.rst
 create mode 100644 Documentation/media/uapi/dvb/dmx-reqbufs.rst
 create mode 100644 drivers/media/common/videobuf/Kconfig
 create mode 100644 drivers/media/common/videobuf/Makefile
 rename drivers/media/{v4l2-core => common/videobuf}/videobuf2-core.c (98%)
 rename drivers/media/{v4l2-core => common/videobuf}/videobuf2-dma-contig.c (100%)
 rename drivers/media/{v4l2-core => common/videobuf}/videobuf2-dma-sg.c (100%)
 rename drivers/media/{v4l2-core => common/videobuf}/videobuf2-dvb.c (100%)
 rename drivers/media/{v4l2-core => common/videobuf}/videobuf2-memops.c (100%)
 rename drivers/media/{v4l2-core => common/videobuf}/videobuf2-v4l2.c (100%)
 rename drivers/media/{v4l2-core => common/videobuf}/videobuf2-vmalloc.c (100%)
 create mode 100644 drivers/media/dvb-core/dvb_vb2.c
 create mode 100644 drivers/media/dvb-core/dvb_vb2.h

-- 
2.14.3

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

* [PATCH 10/11] fs: compat_ioctl: add new DVB demux ioctls
  2017-12-21 16:17 [PATCH 00/11] dvb: add support for memory mapped I/O Mauro Carvalho Chehab
@ 2017-12-21 16:18 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2017-12-21 16:18 UTC (permalink / raw)
  To: Linux Media Mailing List, Jonathan Corbet
  Cc: Mauro Carvalho Chehab, Mauro Carvalho Chehab,
	Linux Doc Mailing List, Alexander Viro, linux-fsdevel

Use trivial handling for the new DVB demux ioctls, as none
of them passes a pointer inside their structures.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
 fs/compat_ioctl.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index bd5d91e119ca..cc71c3676ce2 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -1333,6 +1333,11 @@ COMPATIBLE_IOCTL(DMX_SET_PES_FILTER)
 COMPATIBLE_IOCTL(DMX_SET_BUFFER_SIZE)
 COMPATIBLE_IOCTL(DMX_GET_PES_PIDS)
 COMPATIBLE_IOCTL(DMX_GET_STC)
+COMPATIBLE_IOCTL(DMX_REQBUFS)
+COMPATIBLE_IOCTL(DMX_QUERYBUF)
+COMPATIBLE_IOCTL(DMX_EXPBUF)
+COMPATIBLE_IOCTL(DMX_QBUF)
+COMPATIBLE_IOCTL(DMX_DQBUF)
 COMPATIBLE_IOCTL(FE_GET_INFO)
 COMPATIBLE_IOCTL(FE_DISEQC_RESET_OVERLOAD)
 COMPATIBLE_IOCTL(FE_DISEQC_SEND_MASTER_CMD)
-- 
2.14.3

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

end of thread, other threads:[~2017-12-21 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-21 16:17 [PATCH 00/11] dvb: add support for memory mapped I/O Mauro Carvalho Chehab
2017-12-21 16:18 ` [PATCH 10/11] fs: compat_ioctl: add new DVB demux ioctls Mauro Carvalho Chehab

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