Re: [RFC PATCH-tip v4 07/10] locking/rwsem: Change RWSEM_WAITING_BIAS for better disambiguation

2016-08-18 Thread Wanpeng Li
2016-08-19 5:11 GMT+08:00 Waiman Long : > When the count value is in between 0 and RWSEM_WAITING_BIAS, there > are 2 possibilities. > Either a writer is present and there is no waiter count = 0x0001 >or there are waiters and readers. There is no easy way to count =

[PATCH 18/20] [media] dev-subdev.rst: make table fully visible on LaTeX

2016-08-18 Thread Mauro Carvalho Chehab
The table there is too big and doesn't have format hints for LaTeX output. Fix it. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/v4l/dev-subdev.rst | 9 + 1 file changed, 9 insertions(+) diff --git

[PATCH 20/20] [media] diff-v4l.rst: Make capabilities table fit in LaTeX

2016-08-18 Thread Mauro Carvalho Chehab
This table has several troubles: - a duplicated "struct" on its name; - a reference to a V4L version 1 struct that will never point to something (as we got rid of V4L1 API a long time ago); - misses hints for LaTeX output (column size and longtable

[PATCH 19/20] [media] subdev-formats.rst: adjust most of the tables to fill in page

2016-08-18 Thread Mauro Carvalho Chehab
Fix mosto fo the tables there in order to make them fit at the page size. There are, however, two exceptions: RGB and YUV big tables, where adding the raw latex adjustbox caused the tables to not be properly formatted. I suspect that the problem is because those are long tables, but not really

[PATCH 17/20] [media] dev-rds.rst: adjust table dimentions for LaTeX

2016-08-18 Thread Mauro Carvalho Chehab
One of the tables has wrong column dimentions. Fix it. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/v4l/dev-rds.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/media/uapi/v4l/dev-rds.rst

[PATCH 03/20] [media] control.rst: Fix table width

2016-08-18 Thread Mauro Carvalho Chehab
Manually adjust the table width for it to look nice on PDF output. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/v4l/control.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/media/uapi/v4l/control.rst

[PATCH 08/20] [media] pixfmt-packed-yuv.rst: adjust tables to fit in LaTeX

2016-08-18 Thread Mauro Carvalho Chehab
Adjust the table to fit at the LaTeX and PDF outputs, just like what was done with pixfmt-packed-rgb.rst. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/v4l/pixfmt-packed-yuv.rst | 26 ++ 1 file changed, 17 insertions(+), 9

[PATCH 02/20] [media] docs-rst: add tabularcolumns to all tables

2016-08-18 Thread Mauro Carvalho Chehab
LaTeX doesn't handle too well auto-width on tables, and ReST markup requires an special tag to give it the needed hints. As we're using A4 paper, we have 17cm of useful spaces. As most media tables have widths, let's use it to generate the needed via the following perl script: my ($line_size,

[PATCH 11/20] [media] dev-overlay.rst: don't ident a note

2016-08-18 Thread Mauro Carvalho Chehab
There's one note there that it is indented for no good reason. Fix it. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/v4l/dev-overlay.rst | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH 07/20] [media] pixfmt-packed-rgb.rst: adjust tables to fit in LaTeX

2016-08-18 Thread Mauro Carvalho Chehab
Adjust the tables to fit at the LaTeX and PDF outputs. Previously, we were displaying the long table in landscape, but it makes harder to read on displays. This time, let's use the adjustbox to shrink the size of those long tables, as the table size can still be visible on screen, and it is a

[PATCH 04/20] [media] extended-controls.rst: fix table sizes

2016-08-18 Thread Mauro Carvalho Chehab
Lots of tables at extended-controls.rst need explicit hints for LaTeX to adjust their widths. Provide that. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/v4l/extended-controls.rst | 63 -- 1 file changed, 36 insertions(+), 27

[PATCH 10/20] [media] buffer.rst: Adjust table columns for LaTeX output

2016-08-18 Thread Mauro Carvalho Chehab
The table columns are not properly displayed. Also, some tables are too big to fit into just one page. So, fix them, in order to better display the tables. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/v4l/buffer.rst | 20 ++-- 1

[PATCH 15/20] [media] dev-sliced-vbi.rst: use a footnote for VBI images

2016-08-18 Thread Mauro Carvalho Chehab
Just like on dvb-raw-vbi.rst, the LaTeX output doesn't work well with cell spans. Also, this is actually a note, so, move it to a footnote. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/v4l/dev-sliced-vbi.rst | 6 -- 1 file changed, 4

[PATCH 06/20] [media] pixfmt-packed-rgb.rst: Fix cell spans

2016-08-18 Thread Mauro Carvalho Chehab
There is an extra column just before eack pack of bits, to improve table reading, but the header file didn't take this into account. Fix it. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst | 78 -- 1 file

[PATCH 09/20] [media] docs-rst: remove width hints from pixfmt byte order tables

2016-08-18 Thread Mauro Carvalho Chehab
Those hints are wrong, and doesn't really improve the look of those tables. So, keep them only when they're useful. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/v4l/pixfmt-grey.rst | 7 --- Documentation/media/uapi/v4l/pixfmt-m420.rst

[PATCH 13/20] [media] dev-raw-vbi.rst: adjust table columns for LaTeX output

2016-08-18 Thread Mauro Carvalho Chehab
Add the needed tags to fix LaTeX output of the tables there. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/v4l/dev-raw-vbi.rst | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/media/uapi/v4l/dev-raw-vbi.rst

[PATCH 14/20] [media] docs-rst: re-generate vbi_525.pdf and vbi_625.pdf

2016-08-18 Thread Mauro Carvalho Chehab
Originally, each image were one page big, causing them to be displayed on separate pages at the PDF output. Re-generate them from the gif files. Signed-off-by: Mauro Carvalho Chehab --- .../media/uapi/v4l/dev-raw-vbi_files/vbi_525.pdf | Bin 3395 -> 3706 bytes

[PATCH 12/20] [media] dev-raw-vbi.rst: add a footnote for the count limits

2016-08-18 Thread Mauro Carvalho Chehab
There's a bug with LaTeX output on flat-tables with Sphinx 1.4.5 that prevents references at a cell span to be broken. As the text is indeed too long, it makes sense to place the reference to the pictures showing the VBI limits as a footnote. That makes the text easier to read and also solves the

[PATCH 16/20] [media] dev-sliced-vbi.rst: Adjust tables on LaTeX output

2016-08-18 Thread Mauro Carvalho Chehab
Better format the tables in a way that will fit inside the page. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/v4l/dev-sliced-vbi.rst | 34 + 1 file changed, 24 insertions(+), 10 deletions(-) diff --git

Re: [PATCH 03/10] docs: sphinxify sparse.txt and move to dev-tools

2016-08-18 Thread Christoph Hellwig
On Thu, Aug 18, 2016 at 05:46:30PM -0600, Jonathan Corbet wrote: > So would the old hats be happier with a patch that looks like this? The > quality of the formatted output suffers slightly, but it's not a big > deal... I think this a major improvement. The only thing that still strikes me as

Re: [PACTH v2 0/3] Implement /proc//totmaps

2016-08-18 Thread Sonny Rao
On Thu, Aug 18, 2016 at 12:44 AM, Michal Hocko wrote: > On Wed 17-08-16 11:57:56, Sonny Rao wrote: >> On Wed, Aug 17, 2016 at 6:03 AM, Michal Hocko wrote: >> > On Wed 17-08-16 11:31:25, Jann Horn wrote: > [...] >> >> That's at least 30.43% + 9.12% + 7.66% =

[PATCH 05/20] [media] docs-rst: add column hints for pixfmt-002 and pixfmt-006

2016-08-18 Thread Mauro Carvalho Chehab
Add column hints for LaTeX to format columns on the tables inside pixfmt-002.rst and pixfmt-006.rst. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/uapi/v4l/pixfmt-002.rst | 4 +++- Documentation/media/uapi/v4l/pixfmt-006.rst | 5 + 2 files changed, 8

[RFC PATCH-tip v4 07/10] locking/rwsem: Change RWSEM_WAITING_BIAS for better disambiguation

2016-08-18 Thread Waiman Long
When the count value is in between 0 and RWSEM_WAITING_BIAS, there are 2 possibilities. Either a writer is present and there is no waiter or there are waiters and readers. There is no easy way to know which is true unless the wait_lock is taken. This patch changes the RWSEM_WAITING_BIAS from

[RFC PATCH-tip v4 09/10] locking/rwsem: Enable reactivation of reader spinning

2016-08-18 Thread Waiman Long
Reader optimistic spinning will be disabled once the rspin_enabled count reaches 0. After that, it cannot be re-enabled. This may cause an eligible rwsem locked out of reader spinning because of a series of unfortunate events. This patch looks at the regular writer-on-writer spinning history. If

[RFC PATCH-tip v4 00/10] locking/rwsem: Enable reader optimistic spinning

2016-08-18 Thread Waiman Long
v3->v4: - Rebased to the latest tip tree due to changes to rwsem-xadd.c. - Update the OSQ patch to fix race condition. v2->v3: - Used smp_acquire__after_ctrl_dep() to provide acquire barrier. - Added the following new patches: 1) make rwsem_spin_on_owner() return a tristate value. 2)

[RFC PATCH-tip v4 02/10] locking/rwsem: Stop active read lock ASAP

2016-08-18 Thread Waiman Long
Currently, when down_read() fails, the active read locking isn't undone until the rwsem_down_read_failed() function grabs the wait_lock. If the wait_lock is contended, it may takes a while to get the lock. During that period, writer lock stealing will be disabled because of the active read lock.

[RFC PATCH-tip v4 06/10] locking/rwsem: Move common rwsem macros to asm-generic/rwsem_types.h

2016-08-18 Thread Waiman Long
Almost all the macro definitions in the various architecture specific rwsem.h header files are essentially the same. This patch moves all of them into a common header asm-generic/rwsem_types.h to eliminate the duplication. Suggested-by: Peter Zijlstra (Intel) Signed-off-by:

[RFC PATCH-tip v4 01/10] locking/osq: Make lock/unlock proper acquire/release barrier

2016-08-18 Thread Waiman Long
The osq_lock() and osq_unlock() function may not provide the necessary acquire and release barrier in some cases. This patch makes sure that the proper barriers are provided when osq_lock() is successful or when osq_unlock() is called. Suggested-by: Peter Zijlstra (Intel)

Re: [PACTH v2 0/3] Implement /proc//totmaps

2016-08-18 Thread Minchan Kim
Hi Michal, On Thu, Aug 18, 2016 at 08:01:04PM +0200, Michal Hocko wrote: > On Thu 18-08-16 10:47:57, Sonny Rao wrote: > > On Thu, Aug 18, 2016 at 12:44 AM, Michal Hocko wrote: > > > On Wed 17-08-16 11:57:56, Sonny Rao wrote: > [...] > > >> 2) User space OOM handling -- we'd

Re: [PATCH 03/10] docs: sphinxify sparse.txt and move to dev-tools

2016-08-18 Thread Jonathan Corbet
On Tue, 9 Aug 2016 01:31:06 -0700 Christoph Hellwig wrote: > On Tue, Aug 09, 2016 at 10:28:38AM +0200, Daniel Vetter wrote: > > The point is to make the docs more discoverable by being able to > > cross-link them. Old hats like us don't need that, but it definitely > > has

Re: [PATCH v2] Documentation: sunxi: Update Allwinner SoC documentation

2016-08-18 Thread Jonathan Corbet
On Sat, 13 Aug 2016 18:01:13 +0800 Icenowy Zheng wrote: > Now, the A83T and A64 SoC user manuals are available. > Update the documentation to add the links. > > An updated version of A83T datasheet is also included now. Applied to the docs tree, thanks. jon -- To unsubscribe

Re: [PATCH 00/20] First part of LaTeX build fixes for the media book

2016-08-18 Thread Mauro Carvalho Chehab
Em Thu, 18 Aug 2016 13:15:29 -0300 Mauro Carvalho Chehab escreveu: > This one fix most of the issues with LaTeX output for the media book at > the V4L2 book, before "Function Reference". So, up to page 181 of a 969 > pages document. > > There are still some things that

Re: [PATCH] kconfig-language: improve menuconfig usage description

2016-08-18 Thread Jonathan Corbet
On Wed, 3 Aug 2016 00:40:34 +0200 Eugeniu Rosca wrote: > Improper menuconfig usage leads to empty menu entries. > zconfdump() is able to reveal some real-life examples: > - menuconfig VFIO_NOIOMMU > - menuconfig RESET_CONTROLLER > - menuconfig SND_ARM > > To avoid future

[PATCH] docs-rst: add support for LaTeX output

2016-08-18 Thread Mauro Carvalho Chehab
Sphinx supports LaTeX output. Sometimes, it is interesting to call it directly, instead of also generating a PDF. As it comes for free, add a target for it. Signed-off-by: Mauro Carvalho Chehab --- Documentation/DocBook/Makefile | 1 + Documentation/Makefile.sphinx |

Re: Documentation: livepatch: add section about arch-specific code

2016-08-18 Thread Jessica Yu
+++ Petr Mladek [18/08/16 11:57 +0200]: On Wed 2016-08-17 20:58:30, Jessica Yu wrote: Document usage of arch-specific elf sections in livepatch as well as implementation of arch-specific code. Signed-off-by: Jessica Yu --- Documentation/livepatch/module-elf-format.txt | 20

Re: [PACTH v2 0/3] Implement /proc//totmaps

2016-08-18 Thread Robert Foss
On 2016-08-18 02:01 PM, Michal Hocko wrote: On Thu 18-08-16 10:47:57, Sonny Rao wrote: On Thu, Aug 18, 2016 at 12:44 AM, Michal Hocko wrote: On Wed 17-08-16 11:57:56, Sonny Rao wrote: [...] 2) User space OOM handling -- we'd rather do a more graceful shutdown than let

[RFC PATCH-tip v4 03/10] locking/rwsem: Make rwsem_spin_on_owner() return a tri-state value

2016-08-18 Thread Waiman Long
This patch modifies rwsem_spin_on_owner() to return a tri-state value to better reflect the state of lock holder which enables us to make a better decision of what to do next. Signed-off-by: Waiman Long --- kernel/locking/rwsem-xadd.c | 14 +- 1 files changed,

Re: [PATCH 1/7] doc-rst: generic way to build only sphinx sub-folders

2016-08-18 Thread Jonathan Corbet
On Sat, 13 Aug 2016 16:12:42 +0200 Markus Heiser wrote: > Add a generic way to build only a reST sub-folder with or > without a individual *build-theme*. > > * control *sub-folders* by environment SPHINXDIRS > * control *build-theme* by environment SPHINX_CONF > >

[RFC PATCH-tip v4 04/10] locking/rwsem: Enable count-based spinning on reader

2016-08-18 Thread Waiman Long
When the rwsem is owned by reader, writers stop optimistic spinning simply because there is no easy way to figure out if all the readers are actively running or not. However, there are scenarios where the readers are unlikely to sleep and optimistic spinning can help performance. This patch

Re: livepatch/x86: apply alternatives and paravirt patches after relocations

2016-08-18 Thread Jessica Yu
+++ Petr Mladek [18/08/16 11:51 +0200]: On Wed 2016-08-17 20:58:29, Jessica Yu wrote: Implement arch_klp_init_object_loaded() for x86, which applies alternatives/paravirt patches. This fixes the order in which relocations and alternatives/paravirt patches are applied. Previously, if a patch

Re: [PACTH v2 0/3] Implement /proc//totmaps

2016-08-18 Thread Michal Hocko
On Thu 18-08-16 10:47:57, Sonny Rao wrote: > On Thu, Aug 18, 2016 at 12:44 AM, Michal Hocko wrote: > > On Wed 17-08-16 11:57:56, Sonny Rao wrote: [...] > >> 2) User space OOM handling -- we'd rather do a more graceful shutdown > >> than let the kernel's OOM killer activate and

Re: [PATCH v9 1/2] Documentation: kdump: remind user of nr_cpus

2016-08-18 Thread Zhou, Wenjian/周文剑
Hi Jonathan, Thanks for your reply. On 08/19/2016 01:18 AM, Jonathan Corbet wrote: On Thu, 18 Aug 2016 11:11:46 +0800 Zhou Wenjian wrote: Thank you for working to improve the documentation! * We generally don' have to bring up a SMP kernel just to capture the

[RFC PATCH-tip v4 05/10] locking/rwsem: move down rwsem_down_read_failed function

2016-08-18 Thread Waiman Long
Move the rwsem_down_read_failed() function down to below the optimistic spinning section before enabling optimistic spinning for the readers. It is because the rwsem_down_read_failed() function will call rwsem_optimistic_spin() in later patch. There is no change in code. Signed-off-by: Waiman

Re: [PATCH] mm, kasan: Update kasan docs to indicate arm64 support

2016-08-18 Thread Jonathan Corbet
On Tue, 16 Aug 2016 09:30:31 -0700 Laura Abbott wrote: > KASAN has been supported on arm64 since 39d114ddc682 ("arm64: add KASAN > support"). Update the docs to indicate this. This creates a conflict with my patch sphinxifying this file, of course, but I'll cope. Applied to

[PULL] Docs fixes

2016-08-18 Thread Jonathan Corbet
The following changes since commit 29b4817d4018df78086157ea3a55c1d9424a7cfc: Linux 4.8-rc1 (2016-08-07 18:18:00 -0700) are available in the git repository at: git://git.lwn.net/linux.git tags/4.8-doc-fixes for you to fetch changes up to d1669c8288a2c86daa6fd59c7fb938c08589d053: doc-rst:

[PATCH] Documentation: buffer sharing delete duplication definition in fence

2016-08-18 Thread winton.liu
From: "winton.liu" <18502523...@163.com> reservation-object-reserve-shared and other API already defined. delete duplication definitions in fence, it's already defined in reservation. Signed-off-by: winton.liu <18502523...@163.com> --- Documentation/DocBook/device-drivers.tmpl |2 -- 1 file

Re: [PATCH v3 3/3] Documentation: livepatch: add section about arch-specific code

2016-08-18 Thread Petr Mladek
On Wed 2016-08-17 20:58:30, Jessica Yu wrote: > Document usage of arch-specific elf sections in livepatch as well > as implementation of arch-specific code. > > Signed-off-by: Jessica Yu > --- > Documentation/livepatch/module-elf-format.txt | 20 > 1 file

Re: [PATCH v3 1/3] livepatch: use arch_klp_init_object_loaded() to finish arch-specific tasks

2016-08-18 Thread Petr Mladek
On Wed 2016-08-17 20:58:28, Jessica Yu wrote: > Introduce arch_klp_init_object_loaded() to complete any additional > arch-specific tasks during patching. Architecture code may override this > function. > > Signed-off-by: Jessica Yu Reviewed-by: Petr Mladek

Re: [PATCH v3 2/3] livepatch/x86: apply alternatives and paravirt patches after relocations

2016-08-18 Thread Petr Mladek
On Wed 2016-08-17 20:58:29, Jessica Yu wrote: > Implement arch_klp_init_object_loaded() for x86, which applies > alternatives/paravirt patches. This fixes the order in which relocations > and alternatives/paravirt patches are applied. > > Previously, if a patch module had alternatives or paravirt

Re: [RFC2 nowrap: PATCH v7 00/18] ILP32 for ARM64

2016-08-18 Thread Yury Norov
On Wed, Aug 17, 2016 at 04:26:42PM +0100, Catalin Marinas wrote: > On Wed, Aug 17, 2016 at 04:32:23PM +0200, Dr. Philipp Tomsich wrote: > > On 17 Aug 2016, at 16:29, Catalin Marinas wrote: > > > On Wed, Aug 17, 2016 at 02:54:59PM +0200, Dr. Philipp Tomsich wrote: > > >>

Re: [PACTH v2 0/3] Implement /proc//totmaps

2016-08-18 Thread Michal Hocko
On Wed 17-08-16 11:57:56, Sonny Rao wrote: > On Wed, Aug 17, 2016 at 6:03 AM, Michal Hocko wrote: > > On Wed 17-08-16 11:31:25, Jann Horn wrote: [...] > >> That's at least 30.43% + 9.12% + 7.66% = 47.21% of the task's kernel > >> time spent on evaluating format strings. The new

Re: [PATCH v8 1/2] Documentation: kdump: remind user of nr_cpus

2016-08-18 Thread Zhou, Wenjian/周文剑
On 08/18/2016 02:47 PM, Dave Young wrote: On 08/17/16 at 07:36pm, Joe Perches wrote: On Thu, 2016-08-18 at 10:31 +0800, Zhou Wenjian wrote: nr_cpus can help to save memory. So we should remind user of it. trivia: diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt []

Re: [PATCH v8 1/2] Documentation: kdump: remind user of nr_cpus

2016-08-18 Thread Dave Young
On 08/17/16 at 07:36pm, Joe Perches wrote: > On Thu, 2016-08-18 at 10:31 +0800, Zhou Wenjian wrote: > > nr_cpus can help to save memory. So we should remind user of it. > > trivia: > > diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt > [] > > @@ -390,9 +390,11 @@ Notes