[PATCH v3 07/33] radix tree test suite: iteration test misuses RCU

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Each thread needs to register itself with RCU, otherwise the reading thread's read lock has no effect and the freeing thread will free the memory in the tree without waiting for the read lock to be dropped. Signed-off-by: Matthew Wilcox --- tools/testing/radix-tree/iterati

[PATCH v3 28/33] idr: Add ida_is_empty

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Two of the USB Gadgets were poking around in the internals of struct ida in order to determine if it is empty. Add the appropriate abstraction. Signed-off-by: Matthew Wilcox Acked-by: Konstantin Khlebnikov --- drivers/usb/gadget/function/f_hid.c | 6 +++--- drivers/u

[PATCH v3 28/33] idr: Add ida_is_empty

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Two of the USB Gadgets were poking around in the internals of struct ida in order to determine if it is empty. Add the appropriate abstraction. Signed-off-by: Matthew Wilcox Acked-by: Konstantin Khlebnikov --- drivers/usb/gadget/function/f_hid.c | 6 +++--- drivers/u

[PATCH v3 25/33] radix-tree: Add radix_tree_split_preload()

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Calculate how many nodes we need to allocate to split an old_order entry into multiple entries, each of size new_order. The test suite checks that we allocated exactly the right number of nodes; neither too many (checked by rtp->nr == 0), nor too few (checked by comparing nr

[PATCH v3 22/33] radix-tree: Delete radix_tree_range_tag_if_tagged()

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox This is an exceptionally complicated function with just one caller (tag_pages_for_writeback). We devote a large portion of the runtime of the test suite to testing this one function which has one caller. By introducing the new function radix_tree_iter_tag_set(), we can elimi

[PATCH v3 32/33] radix tree test suite: Add some more functionality

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox IDR needs more functionality from the kernel: kmalloc()/kfree(), and xchg(). Signed-off-by: Matthew Wilcox --- tools/testing/radix-tree/linux.c| 15 +++ tools/testing/radix-tree/linux/kernel.h | 3 +++ tools/testing/radix-tree/linux/slab.h | 3 +++

[PATCH v3 33/33] Reimplement IDR and IDA using the radix tree

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox The IDR is very similar to the radix tree. It has some functionality that the radix tree did not have (alloc next free, cyclic allocation, a callback-based for_each, destroy tree), which is readily implementable on top of the radix tree. A few small changes were needed in o

[PATCH v3 07/33] radix tree test suite: iteration test misuses RCU

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Each thread needs to register itself with RCU, otherwise the reading thread's read lock has no effect and the freeing thread will free the memory in the tree without waiting for the read lock to be dropped. Signed-off-by: Matthew Wilcox --- tools/testing/radix-tree/iterati

[PATCH v3 18/33] radix-tree: Improve dump output

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Print the indices of the entries as unsigned (instead of signed) integers and print the parent node of each entry to help navigate around larger trees where the layout is not quite so obvious. Print the indices covered by a node. Rearrange the order of fields printed so the

[PATCH v3 31/33] idr: Reduce the number of bits per level from 8 to 6

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox In preparation for merging the IDR and radix tree, reduce the fanout at each level from 256 to 64. If this causes a performance problem then a bisect will point to this commit, and we'll have a better idea about what we might do to fix it. Signed-off-by: Matthew Wilcox ---

[PATCH v3 20/33] radix-tree: Improve multiorder iterators

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox This fixes several interlinked problems with the iterators in the presence of multiorder entries. 1. radix_tree_iter_next() would only advance by one slot, which would result in the iterators returning the same entry more than once if there were sibling entries. 2. radix_tr

[PATCH v3 13/33] radix tree test suite: Use common find-bit code

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Remove the old find_next_bit code in favour of linking in the find_bit code from tools/lib. Signed-off-by: Matthew Wilcox --- tools/testing/radix-tree/Makefile | 7 ++- tools/testing/radix-tree/find_next_bit.c | 57 -- tools/

[PATCH v3 26/33] radix-tree: Fix replacement for multiorder entries

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox When replacing an entry with NULL, we need to delete any sibling entries. Also account deleting exceptional entries properly. Also fix a bug with radix_tree_iter_replace() where we would fail to remove entirely freed nodes. Also fix accounting bug when switching between norma

[PATCH v3 24/33] radix-tree: Add radix_tree_split

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox This new function splits a larger multiorder entry into smaller entries (potentially multi-order entries). These entries are initialised to RADIX_TREE_RETRY to ensure that RCU walkers who see this state aren't confused. The caller should then call radix_tree_for_each_slot()

[PATCH v3 23/33] radix-tree: Add radix_tree_join

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox This new function allows for the replacement of many smaller entries in the radix tree with one larger multiorder entry. From the point of view of an RCU walker, they may see a mixture of the smaller entries and the large entry during the same walk, but they will never see N

[PATCH v3 00/33] Radix tree patches for 4.10

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Hi Andrew, Please include these patches in the -mm tree for 4.10. Mostly these are improvements; the only bug fixes in here relate to multiorder entries (which are unused in the 4.9 tree). The IDR rewrite has the highest potential for causing mayhem as the test suite is qu

[PATCH v3 27/33] radix tree test suite: Check multiorder iteration

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox The random iteration test only inserts order-0 entries currently. Update it to insert entries of order between 7 and 0. Also make the maximum index configurable, make some variables static, make the test duration variable, remove some useless spinning, and add a fifth thread

[PATCH v3 30/33] rxrpc: Abstract away knowledge of IDR internals

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Add idr_get_cursor() / idr_set_cursor() APIs, and remove the reference to IDR_SIZE. Signed-off-by: Matthew Wilcox Reviewed-by: David Howells --- include/linux/idr.h | 26 ++ net/rxrpc/af_rxrpc.c| 11 ++- net/rxrpc/conn_client.c | 4

[PATCH v3 14/33] radix-tree: Fix typo

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox --- lib/radix-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/radix-tree.c b/lib/radix-tree.c index e0290d1..b329056 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c @@ -1109,7 +1109,7 @@ void **radix_tree_next_chunk(struct radix_tree_root

[PATCH v3 29/33] tpm: Use idr_find(), not idr_find_slowpath()

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox idr_find_slowpath() is not intended to be part of the public API, it's an implementation detail. There's no reason to skip straight to the slowpath here. Signed-off-by: Matthew Wilcox --- drivers/char/tpm/tpm-chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-

[PATCH v3 16/33] radix-tree: Create node_tag_set()

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Similar to node_tag_clear(), factor node_tag_set() out of radix_tree_range_tag_if_tagged(). Signed-off-by: Matthew Wilcox --- lib/radix-tree.c | 41 +++-- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/lib/radix-tree.c b

[PATCH v3 15/33] radix-tree: Move rcu_head into a union with private_list

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox I want to be able to reference node->parent after freeing node. Currently node->parent is in a union with rcu_head, so it is overwritten when the node is put on the RCU list. We know that private_list is not referenced after the node is freed, so it is safe for these two mem

[PATCH v3 04/33] radix tree test suite: Track preempt_count

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Rather than simply NOP out preempt_enable() and preempt_disable(), keep track of preempt_count and display it regularly in case either the test suite or the code under test is forgetting to balance the enables & disables. Only found a test-case that was forgetting to re-enab

[PATCH v3 21/33] radix-tree: Delete radix_tree_locate_item()

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox This rather complicated function can be better implemented as an iterator. It has only one caller, so move the functionality to the only place that needs it. Update the test suite to follow the same pattern. Signed-off-by: Matthew Wilcox Acked-by: Konstantin Khlebnikov --

Re: [PATCH 1/3] hwmon: Add Texas Instruments TMP108 temperature sensor driver.

2016-11-28 Thread Guenter Roeck
On Mon, Nov 28, 2016 at 11:40:42AM -0800, John Muir wrote: > > > On Nov 27, 2016, at 4:19 AM, Guenter Roeck wrote: > > > > On 11/26/2016 09:15 PM, John Muir wrote: > >> Add support for the TI TMP108 temperature sensor with some device > >> configuration parameters. > >> +- ti,alert-active-high :

RE: [PATCH] perf/x86: fix event counter update issue

2016-11-28 Thread Liang, Kan
> > > > Here, all the possible failure cases are listed. > > Terms: > > - new: current PMU counter value which read from rdpmcl. > > - prev: previous counter value which is stored in &hwc->prev_count. > > - in PMI/not in PMI: the event update happens in PMI handler or not. > > Current

[PATCH v3 06/33] radix tree test suite: Make runs more reproducible

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Instead of reseeding the random number generator every time around the loop in big_gang_check(), seed it at the beginning of execution. Use rand_r() and an independent base seed for each thread in iteration_test() so they don't stomp all over each others state. Since this p

[PATCH v3 26/33] radix-tree: Fix replacement for multiorder entries

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox When replacing an entry with NULL, we need to delete any sibling entries. Also account deleting exceptional entries properly. Also fix a bug with radix_tree_iter_replace() where we would fail to remove entirely freed nodes. Also fix accounting bug when switching between norma

[PATCH v3 04/33] radix tree test suite: Track preempt_count

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Rather than simply NOP out preempt_enable() and preempt_disable(), keep track of preempt_count and display it regularly in case either the test suite or the code under test is forgetting to balance the enables & disables. Only found a test-case that was forgetting to re-enab

[PATCH v3 05/33] radix tree test suite: Free preallocated nodes

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox It can be a source of mild concern when the test suite shows that we're leaking nodes. While poring over the source code looking for leaks can lead to some fascinating bugs being discovered, sometimes the leak is simply that these nodes were preallocated and are sitting on t

[PATCH v3 21/33] radix-tree: Delete radix_tree_locate_item()

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox This rather complicated function can be better implemented as an iterator. It has only one caller, so move the functionality to the only place that needs it. Update the test suite to follow the same pattern. Signed-off-by: Matthew Wilcox Acked-by: Konstantin Khlebnikov --

[PATCH v3 09/33] radix tree test suite: Use rcu_barrier

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Calling rcu_barrier() allows all of the rcu-freed memory to be actually returned to the pool, and allows nr_allocated to return to 0. As well as allowing diffs between runs to be more useful, it also lets us pinpoint leaks more effectively. Signed-off-by: Matthew Wilcox --

[PATCH v3 25/33] radix-tree: Add radix_tree_split_preload()

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Calculate how many nodes we need to allocate to split an old_order entry into multiple entries, each of size new_order. The test suite checks that we allocated exactly the right number of nodes; neither too many (checked by rtp->nr == 0), nor too few (checked by comparing nr

[PATCH v3 31/33] idr: Reduce the number of bits per level from 8 to 6

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox In preparation for merging the IDR and radix tree, reduce the fanout at each level from 256 to 64. If this causes a performance problem then a bisect will point to this commit, and we'll have a better idea about what we might do to fix it. Signed-off-by: Matthew Wilcox ---

[PATCH v3 03/33] radix tree test suite: Allow GFP_ATOMIC allocations to fail

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox In order to test the preload code, it is necessary to fail GFP_ATOMIC allocations, which requires defining GFP_KERNEL and GFP_ATOMIC properly. Remove the obsolete __GFP_WAIT and copy the definitions of the __GFP flags which are used from the kernel include files. We also nee

[PATCH v3 10/33] radix tree test suite: Handle exceptional entries

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox item_kill_tree() assumes that everything in the tree is a pointer to a struct item, which is annoying when testing the behaviour of exceptional entries. Fix it to delete exceptional entries on the assumption they don't need to be freed. Signed-off-by: Matthew Wilcox --- t

Re: [PATCH 1/1 V2] mqueue: Implment generic xattr support

2016-11-28 Thread David Graziano
On Wed, Nov 9, 2016 at 4:25 PM, Paul Moore wrote: > On Wed, Nov 9, 2016 at 11:25 AM, David Graziano > wrote: >> On Mon, Nov 7, 2016 at 4:23 PM, Paul Moore wrote: >>> On Mon, Nov 7, 2016 at 3:46 PM, David Graziano >>> wrote: This patch adds support for generic extended attributes within the

[PATCH v3 27/33] radix tree test suite: Check multiorder iteration

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox The random iteration test only inserts order-0 entries currently. Update it to insert entries of order between 7 and 0. Also make the maximum index configurable, make some variables static, make the test duration variable, remove some useless spinning, and add a fifth thread

[PATCH v3 32/33] radix tree test suite: Add some more functionality

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox IDR needs more functionality from the kernel: kmalloc()/kfree(), and xchg(). Signed-off-by: Matthew Wilcox --- tools/testing/radix-tree/linux.c| 15 +++ tools/testing/radix-tree/linux/kernel.h | 3 +++ tools/testing/radix-tree/linux/slab.h | 3 +++

[PATCH v3 12/33] tools: Add more bitmap functions

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox I need the following functions for the radix tree: bitmap_fill bitmap_empty bitmap_full Copy the implementations from include/linux/bitmap.h --- tools/include/linux/bitmap.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tools/include/linux

[PATCH v3 19/33] btrfs: Fix race in btrfs_free_dummy_fs_info()

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox We drop the lock which protects the radix tree, so we must call radix_tree_iter_next() in order to avoid a modification to the tree invalidating the iterator state. Signed-off-by: Matthew Wilcox --- fs/btrfs/tests/btrfs-tests.c | 1 + 1 file changed, 1 insertion(+) diff -

[PATCH v3 00/33] Radix tree patches for 4.10

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Hi Andrew, Please include these patches in the -mm tree for 4.10. Mostly these are improvements; the only bug fixes in here relate to multiorder entries (which are unused in the 4.9 tree). The IDR rewrite has the highest potential for causing mayhem as the test suite is qu

[PATCH v3 19/33] btrfs: Fix race in btrfs_free_dummy_fs_info()

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox We drop the lock which protects the radix tree, so we must call radix_tree_iter_next() in order to avoid a modification to the tree invalidating the iterator state. Signed-off-by: Matthew Wilcox --- fs/btrfs/tests/btrfs-tests.c | 1 + 1 file changed, 1 insertion(+) diff -

[PATCH v3 16/33] radix-tree: Create node_tag_set()

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Similar to node_tag_clear(), factor node_tag_set() out of radix_tree_range_tag_if_tagged(). Signed-off-by: Matthew Wilcox --- lib/radix-tree.c | 41 +++-- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/lib/radix-tree.c b

[PATCH v3 09/33] radix tree test suite: Use rcu_barrier

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Calling rcu_barrier() allows all of the rcu-freed memory to be actually returned to the pool, and allows nr_allocated to return to 0. As well as allowing diffs between runs to be more useful, it also lets us pinpoint leaks more effectively. Signed-off-by: Matthew Wilcox --

[PATCH v3 02/33] tools: Add WARN_ON_ONCE

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox The radix tree uses its own buggy WARN_ON_ONCE. Replace it with the definition from asm-generic/bug.h Signed-off-by: Matthew Wilcox --- tools/include/asm/bug.h| 11 +++ tools/testing/radix-tree/Makefile | 2 +- tools/testing/radix-tree/linux/

[PATCH v3 11/33] radix tree test suite: record order in each item

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox This probably doubles the size of each item allocated by the test suite but it lets us check a few more things, and may be needed for upcoming API changes that require the caller pass in the order of the entry. Signed-off-by: Matthew Wilcox --- tools/testing/radix-tree/mul

Re: [PATCH v2] Fix objtool with clang

2016-11-28 Thread Jiri Olsa
On Mon, Nov 28, 2016 at 05:40:46PM -0200, Arnaldo Carvalho de Melo wrote: SNIP > > same here, can't reproduce.. might be some race issue we experienced before > > Ok, fails in f25 as well, will try again later taking ccache out of the way, > etc. > > [acme@jouet linux]$ ccache -V > ccache vers

Re: btrfs: still lockdep splat for 4.9-rc5+ (btrfs_log_inode)

2016-11-28 Thread Liu Bo
On Sat, Nov 26, 2016 at 08:46:38AM -0500, Chris Mason wrote: > On Fri, Nov 25, 2016 at 10:03:25AM +0100, Christian Borntraeger wrote: > > FWIW, I still see the lockdep splat in btrfs in 4.9-rc5+ > > Filipe reworked the code to avoid taking the same lock twice. As far as I > can tell, this just ne

Re: [PATCH net 11/16] net: ethernet: marvell: mvneta: fix fixed-link phydev leaks

2016-11-28 Thread Thomas Petazzoni
Hello, On Mon, 28 Nov 2016 19:25:04 +0100, Johan Hovold wrote: > Make sure to deregister and free any fixed-link PHY registered using > of_phy_register_fixed_link() on probe errors and on driver unbind. > > Fixes: 83895bedeee6 ("net: mvneta: add support for fixed links") > Signed-off-by: Johan Ho

Re: [PATCHv12 2/3] usb: USB Type-C connector class

2016-11-28 Thread Guenter Roeck
On Mon, Nov 28, 2016 at 04:23:23PM +0200, Heikki Krogerus wrote: > On Mon, Nov 28, 2016 at 11:19:32AM +0100, Oliver Neukum wrote: > > On Thu, 2016-11-24 at 11:57 +0200, Heikki Krogerus wrote: > > > On Wed, Nov 23, 2016 at 09:12:04PM -0800, Guenter Roeck wrote: > > > > > > In our implementation, th

[PATCH v3 17/33] radix-tree: Make radix_tree_find_next_bit more useful

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Since this function is specialised to the radix tree, pass in the node and tag to calculate the address of the bitmap in radix_tree_find_next_bit() instead of the caller. Likewise, there is no need to pass in the size of the bitmap. Signed-off-by: Matthew Wilcox --- lib/r

[PATCH v3 08/33] radix tree test suite: benchmark for iterator

2016-11-28 Thread Matthew Wilcox
From: Konstantin Khlebnikov This adds simple benchmark for iterator similar to one I've used for commit 78c1d78 ("radix-tree: introduce bit-optimized iterator") Building with make BENCHMARK=1 set radix tree order to 6, this allows to get performance comparable to in kernel performance. Signed-o

[PATCH v3 14/33] radix-tree: Fix typo

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox --- lib/radix-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/radix-tree.c b/lib/radix-tree.c index e0290d1..b329056 100644 --- a/lib/radix-tree.c +++ b/lib/radix-tree.c @@ -1109,7 +1109,7 @@ void **radix_tree_next_chunk(struct radix_tree_root

[PATCH v3 17/33] radix-tree: Make radix_tree_find_next_bit more useful

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Since this function is specialised to the radix tree, pass in the node and tag to calculate the address of the bitmap in radix_tree_find_next_bit() instead of the caller. Likewise, there is no need to pass in the size of the bitmap. Signed-off-by: Matthew Wilcox --- lib/r

[PATCH v3 03/33] radix tree test suite: Allow GFP_ATOMIC allocations to fail

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox In order to test the preload code, it is necessary to fail GFP_ATOMIC allocations, which requires defining GFP_KERNEL and GFP_ATOMIC properly. Remove the obsolete __GFP_WAIT and copy the definitions of the __GFP flags which are used from the kernel include files. We also nee

[PATCH v3 18/33] radix-tree: Improve dump output

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Print the indices of the entries as unsigned (instead of signed) integers and print the parent node of each entry to help navigate around larger trees where the layout is not quite so obvious. Print the indices covered by a node. Rearrange the order of fields printed so the

[PATCH v3 24/33] radix-tree: Add radix_tree_split

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox This new function splits a larger multiorder entry into smaller entries (potentially multi-order entries). These entries are initialised to RADIX_TREE_RETRY to ensure that RCU walkers who see this state aren't confused. The caller should then call radix_tree_for_each_slot()

[PATCH v3 12/33] tools: Add more bitmap functions

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox I need the following functions for the radix tree: bitmap_fill bitmap_empty bitmap_full Copy the implementations from include/linux/bitmap.h --- tools/include/linux/bitmap.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tools/include/linux

[PATCH v3 11/33] radix tree test suite: record order in each item

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox This probably doubles the size of each item allocated by the test suite but it lets us check a few more things, and may be needed for upcoming API changes that require the caller pass in the order of the entry. Signed-off-by: Matthew Wilcox --- tools/testing/radix-tree/mul

RE: [PATCH net-next] hv_netvsc: remove excessive logging on MTU change

2016-11-28 Thread Haiyang Zhang
> -Original Message- > From: Vitaly Kuznetsov [mailto:vkuzn...@redhat.com] > Sent: Monday, November 28, 2016 12:26 PM > To: net...@vger.kernel.org > Cc: linux-kernel@vger.kernel.org; KY Srinivasan ; > Haiyang Zhang > Subject: [PATCH net-next] hv_netvsc: remove excessive logging on MTU >

[PATCH v3 08/33] radix tree test suite: benchmark for iterator

2016-11-28 Thread Matthew Wilcox
From: Konstantin Khlebnikov This adds simple benchmark for iterator similar to one I've used for commit 78c1d78 ("radix-tree: introduce bit-optimized iterator") Building with make BENCHMARK=1 set radix tree order to 6, this allows to get performance comparable to in kernel performance. Signed-o

[PATCH v3 06/33] radix tree test suite: Make runs more reproducible

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Instead of reseeding the random number generator every time around the loop in big_gang_check(), seed it at the beginning of execution. Use rand_r() and an independent base seed for each thread in iteration_test() so they don't stomp all over each others state. Since this p

[PATCH v3 05/33] radix tree test suite: Free preallocated nodes

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox It can be a source of mild concern when the test suite shows that we're leaking nodes. While poring over the source code looking for leaks can lead to some fascinating bugs being discovered, sometimes the leak is simply that these nodes were preallocated and are sitting on t

[PATCH v3 23/33] radix-tree: Add radix_tree_join

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox This new function allows for the replacement of many smaller entries in the radix tree with one larger multiorder entry. From the point of view of an RCU walker, they may see a mixture of the smaller entries and the large entry during the same walk, but they will never see N

[PATCH v3 10/33] radix tree test suite: Handle exceptional entries

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox item_kill_tree() assumes that everything in the tree is a pointer to a struct item, which is annoying when testing the behaviour of exceptional entries. Fix it to delete exceptional entries on the assumption they don't need to be freed. Signed-off-by: Matthew Wilcox --- t

[PATCH v3 20/33] radix-tree: Improve multiorder iterators

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox This fixes several interlinked problems with the iterators in the presence of multiorder entries. 1. radix_tree_iter_next() would only advance by one slot, which would result in the iterators returning the same entry more than once if there were sibling entries. 2. radix_tr

[PATCH v3 01/33] radix tree test suite: Fix compilation

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox Patch "lib/radix-tree: Convert to hotplug state machine" breaks the test suite as it adds a call to cpuhp_setup_state_nocalls() which is not currently emulated in the test suite. Add it, and delete the emulation of the old CPU hotplug mechanism. Signed-off-by: Matthew Wilco

[PATCH v3 02/33] tools: Add WARN_ON_ONCE

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox The radix tree uses its own buggy WARN_ON_ONCE. Replace it with the definition from asm-generic/bug.h Signed-off-by: Matthew Wilcox --- tools/include/asm/bug.h| 11 +++ tools/testing/radix-tree/Makefile | 2 +- tools/testing/radix-tree/linux/

Re: [PATCH 2/2] Add support for the Nexbox A1 board based on the Amlogic S912 SoC.

2016-11-28 Thread Kevin Hilman
Rob Herring writes: > On Mon, Nov 21, 2016 at 05:29:05PM +0100, Neil Armstrong wrote: >> Signed-off-by: Neil Armstrong >> --- >> Documentation/devicetree/bindings/arm/amlogic.txt | 1 + >> arch/arm64/boot/dts/amlogic/Makefile | 1 + >> .../arm64/boot/dts/amlogic/meson-gxm-nex

[PATCH v3 15/33] radix-tree: Move rcu_head into a union with private_list

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox I want to be able to reference node->parent after freeing node. Currently node->parent is in a union with rcu_head, so it is overwritten when the node is put on the RCU list. We know that private_list is not referenced after the node is freed, so it is safe for these two mem

[PATCH v3 22/33] radix-tree: Delete radix_tree_range_tag_if_tagged()

2016-11-28 Thread Matthew Wilcox
From: Matthew Wilcox This is an exceptionally complicated function with just one caller (tag_pages_for_writeback). We devote a large portion of the runtime of the test suite to testing this one function which has one caller. By introducing the new function radix_tree_iter_tag_set(), we can elimi

Re: [PATCH] perf/x86: fix event counter update issue

2016-11-28 Thread Stephane Eranian
On Mon, Nov 28, 2016 at 11:59 AM, Liang, Kan wrote: > > >> > >> > Here, all the possible failure cases are listed. >> > Terms: >> > - new: current PMU counter value which read from rdpmcl. >> > - prev: previous counter value which is stored in &hwc->prev_count. >> > - in PMI/not in PMI

RE: [PATCH] perf/x86: fix event counter update issue

2016-11-28 Thread Liang, Kan
> >> > Case B: In PMI. new > prev. delta is positive. > >> >That's the failure case of Test 3. > >> >The PMI is triggered by overflow. But there is latency between > >> >overflow and PMI handler. So new has small amount. > >> >Current calculation lose the max count value. > >> > >

Re: [PATCH] Scripts: kconfig: nconf: fix _GNU_SOURCE redefined warning

2016-11-28 Thread Paul Bolle
[Dropped Yann.] On Tue, 2016-11-29 at 02:46 +0800, Cheah Kok Cheong wrote: > On Mon, Nov 28, 2016 at 11:39:01AM +0100, Michal Marek wrote: > > The Makefile does not specify -D_GNU_SOURCE. Are you adding it manually? On Fedora 24 I'm able to trigger this too: $ [...] make -f ./scripts/Make

Re: Adding a .platform_init callback to sdhci_arasan_ops

2016-11-28 Thread Doug Anderson
Hi, On Mon, Nov 28, 2016 at 11:32 AM, Mason wrote: > On 28/11/2016 18:46, Doug Anderson wrote: > >> As argued in my original patch the field "corecfg_baseclkfreq" is >> documented in the generic Arasan document >> >> and th

Re: Build regressions/improvements in v4.9-rc7

2016-11-28 Thread Anatoly Pugachev
On Mon, Nov 28, 2016 at 5:29 PM, Geert Uytterhoeven wrote: > On Mon, Nov 28, 2016 at 3:27 PM, Geert Uytterhoeven > wrote: >> JFYI, when comparing v4.9-rc7[1] to v4.9-rc6[3], the summaries are: >> - build errors: +10/-4 > > + /home/kisskb/slave/src/drivers/scsi/qlogicpti.c: error: passing > ar

Re: Build regressions/improvements in v4.9-rc7

2016-11-28 Thread David Miller
From: Anatoly Pugachev Date: Mon, 28 Nov 2016 23:40:34 +0300 > On Mon, Nov 28, 2016 at 5:29 PM, Geert Uytterhoeven > wrote: >> On Mon, Nov 28, 2016 at 3:27 PM, Geert Uytterhoeven >> wrote: >>> JFYI, when comparing v4.9-rc7[1] to v4.9-rc6[3], the summaries are: >>> - build errors: +10/-4 >> >>

Re: [PATCH v3 net-next 1/2] net: ethernet: slicoss: add slicoss gigabit ethernet driver

2016-11-28 Thread Lino Sanfilippo
Hi Markus, On 27.11.2016 18:59, Markus Böhme wrote: > Hello Lino, > > just some things barely worth mentioning: > > > I found a bunch of unused #defines in slic.h. I cannot judge if they are > worth keeping: > > SLIC_VRHSTATB_LONGE > SLIC_VRHSTATB_PREA > SLIC_ISR_IO >

Re: [PATCH v3 07/11] pwm: imx: Provide atomic PWM support for i.MX PWMv2

2016-11-28 Thread Lukasz Majewski
Dear Boris, Stefan, > On Mon, 28 Nov 2016 06:50:31 +0100 > Lukasz Majewski wrote: > > > Dear Stefan, Boris, > > > > > On 2016-11-23 00:38, Boris Brezillon wrote: > > > > On Tue, 22 Nov 2016 13:55:33 -0800 > > > > Stefan Agner wrote: > > > > > > > >> On 2016-11-01 00:10, Lukasz Majewski wr

Re: [PATCH 2/4] x86/dumpstack: remove kernel text addresses from stack dump

2016-11-28 Thread Josh Poimboeuf
On Fri, Nov 25, 2016 at 03:26:04PM +0300, Kirill A. Shutemov wrote: > On Tue, Oct 25, 2016 at 09:51:12AM -0500, Josh Poimboeuf wrote: > > Printing kernel text addresses in stack dumps is of questionable value, > > especially now that address randomization is becoming common. > > > > It can be a se

Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable

2016-11-28 Thread Tejun Heo
Hello, On Mon, Nov 28, 2016 at 08:37:09AM +0100, Michal Hocko wrote: > I would disagree here. Randomly picking up fixes just because they are > Fixing some commit is just too dangerous for the stable trees. Fixes tag > should tell what was the culprit of the issue fixed by the patch, > nothing mor

Re: [lkp] [rcu] a7410f28ce: INFO: rcu_sched detected expedited stalls on CPUs/tasks: { 0-... } 25089 jiffies s: 9 root: 0x1/.

2016-11-28 Thread Sebastian Andrzej Siewior
On 2016-11-09 14:25:39 [+0800], kernel test robot wrote: > > FYI, we noticed the following commit: > > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > commit a7410f28ceb566bda840b4afc278747c63383fb6 ("rcu: update: Make > RCU_EXPEDITE_BOOT be the default") > > in tes

Re: 4.8.8 kernel trigger OOM killer repeatedly when I have lots of RAM that should be free

2016-11-28 Thread Marc MERLIN
On Mon, Nov 28, 2016 at 08:23:15AM +0100, Michal Hocko wrote: > Marc, could you try this patch please? I think it should be pretty clear > it should help you but running it through your use case would be more > than welcome before I ask Greg to take this to the 4.8 stable tree. This will take a l

Re: amdgpu: RX 470 crash on loading amdgpu modul

2016-11-28 Thread Volker Armin Hemmann
Am 28.11.2016 um 21:05 schrieb Volker Armin Hemmann: > Hello, > > I got a XFX RX-470P4LDB6. > > Booting with modprobe.blacklist=amdgpu gives me a working system. > > Loading the module results in this mess: > > Nov 28 19:40:00 [kernel] [ 144.213021] [drm] amdgpu kernel modesetting > enabled. > Nov

Re: [PATCH v3] cpufreq: brcmstb-cpufreq: CPUfreq driver for older Broadcom STB SoCs

2016-11-28 Thread Arnd Bergmann
On Monday, November 28, 2016 9:12:05 AM CET Markus Mayer wrote: > >> +static int get_frequencies(const struct cpufreq_policy *policy, > >> +unsigned int *vco_freq, unsigned int *cpu_freq, > >> +unsigned int *scb_freq) > >> +{ > >> + struct clk *cp

Re: [PATCH] mm: page_alloc: High-order per-cpu page allocator v3

2016-11-28 Thread Vlastimil Babka
On 11/28/2016 07:54 PM, Christoph Lameter wrote: > On Mon, 28 Nov 2016, Mel Gorman wrote: > >> If you have a series aimed at parts of the fragmentation problem or how >> subsystems can avoid tracking 4K pages in some important cases then by >> all means post them. > > I designed SLUB with defrag

[GIT] Sparc

2016-11-28 Thread David Miller
Please pull to get these two ugly build warning fixes for sparc, thanks! The following changes since commit 9dd35d6882a10629b95f2bc41a541740ef24c226: sparc: drop duplicate header scatterlist.h (2016-11-19 10:43:07 -0500) are available in the git repository at: git://git.kernel.org/pub/scm/

Re: [PATCH net-next] net: dsa: mv88e6xxx: Fix mv88e6xxx_g1_irq_free() interrupt count

2016-11-28 Thread David Miller
From: Andreas Färber Date: Sun, 27 Nov 2016 23:26:28 +0100 > mv88e6xxx_g1_irq_setup() sets up chip->g1_irq.nirqs interrupt mappings, > so free the same amount. This will be 8 or 9 in practice, less than 16. > > Fixes: dc30c35be720 ("net: dsa: mv88e6xxx: Implement interrupt support.") > Cc: Andre

[PATCH] tty: nozomi: avoid sprintf buffer overflow

2016-11-28 Thread Arnd Bergmann
Testing with a gcc-7 snapshot produced an internal compiler error for this file: drivers/tty/nozomi.c: In function 'receive_flow_control': drivers/tty/nozomi.c:919:12: internal compiler error: in get_substring_ranges_for_loc, at input.c:1388 static int receive_flow_control(struct nozomi *dc) I'

[GIT PULL] libata fixes for v4.9-rc7

2016-11-28 Thread Tejun Heo
Hello, Linus. The recent changes in ahci MSI handling need one more fix. Hopefully, this restores parity with before. The other two are minor fixes with both low impact and risk. Thanks. The following changes since commit 0ce57f8af1782fd12d3a81872a4ab97244989802: ahci: fix the single MSI-X

[PATCH] btrfs: fix uninitialized variable access after ASSERT

2016-11-28 Thread Arnd Bergmann
In btrfs, ASSERT() has no effect if CONFIG_BTRFS_ASSERT is disabled, and gcc notices that this can lead to using an uninitialized variable: fs/btrfs/inode.c: In function 'run_delalloc_range': fs/btrfs/inode.c:1190:18: error: 'cur_end' may be used uninitialized in this function [-Werror=maybe-unin

Re: [PATCH] proc: mm: export PTE sizes directly in smaps (v2)

2016-11-28 Thread Vlastimil Babka
On 11/28/2016 05:52 PM, Dave Hansen wrote: > On 11/24/2016 06:22 AM, Vlastimil Babka wrote: >> On 11/17/2016 01:28 AM, Dave Hansen wrote: >>> @@ -702,11 +707,13 @@ static int smaps_hugetlb_range(pte_t *pt >>> } >>> if (page) { >>> int mapcount = page_mapcount(page); >>> +

Re: net: GPF in eth_header

2016-11-28 Thread Eric Dumazet
On Mon, 2016-11-28 at 11:47 -0800, Eric Dumazet wrote: > On Mon, 2016-11-28 at 20:34 +0100, Dmitry Vyukov wrote: > > On Mon, Nov 28, 2016 at 8:04 PM, 'Andrey Konovalov' via syzkaller > > > > Hi Eric, > > > > > > As far as I can see, skb_network_offset() becomes negative after > > > pskb_pull(skb,

Re: [PATCH] cpuset: Remove unused 'struct cpuset*' variable

2016-11-28 Thread Tejun Heo
On Thu, Nov 24, 2016 at 08:55:12PM -0800, Kirtika Ruchandani wrote: > 'struct cpuset* cs' that is set but not used, was introduced in commit > 1f7dd3e5a6e4 ("cgroup: fix handling of multi-destination migration from > subtree_control enabling"). > cpuset_cancel_attach() uses css_cs(css) instead. Co

Re: [PATCH v3] cpufreq: brcmstb-cpufreq: CPUfreq driver for older Broadcom STB SoCs

2016-11-28 Thread Markus Mayer
On 28 November 2016 at 12:58, Arnd Bergmann wrote: > On Monday, November 28, 2016 9:12:05 AM CET Markus Mayer wrote: >> >> +static int get_frequencies(const struct cpufreq_policy *policy, >> >> +unsigned int *vco_freq, unsigned int *cpu_freq, >> >> +

[PATCH] rtl8xxxu: fix tx rate debug output

2016-11-28 Thread Arnd Bergmann
We accidentally print the rate before we know it for txdesc_v2: wireless/realtek/rtl8xxxu/rtl8xxxu_core.c: In function 'rtl8xxxu_fill_txdesc_v2': wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:4848:3: error: 'rate' may be used uninitialized in this function [-Werror=maybe-uninitialized] txdesc_v1 go

Re: [RFC 4/4] mm: Ignore cpuset enforcement when allocation flag has __GFP_THISNODE

2016-11-28 Thread Dave Hansen
On 11/22/2016 06:19 AM, Anshuman Khandual wrote: > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -3715,7 +3715,7 @@ struct page * > .migratetype = gfpflags_to_migratetype(gfp_mask), > }; > > - if (cpusets_enabled()) { > + if (cpusets_enabled() && !(alloc_mask & __

Re: cgroups and nice

2016-11-28 Thread Dhaval Giani
[Resending because gmail doesn't understand when to go plaintext :-) ] [Added a few other folks who might have something to say about it] On Fri, Nov 25, 2016 at 9:34 AM, Marat Khalili wrote: > I have a question as a cgroup cpu limits user: how does it interact with > nice? Documentation creates

Kernel Panics on Xen ARM64 for Domain0 and Guest

2016-11-28 Thread Wei Chen
Hi, I have found a commit in "PER-CPU MEMORY ALLOCATOR" will panic the kernels that are runing on ARM64 Xen (include Domain0 and Guest). commit 3ca45a46f8af8c4a92dd8a08eac57787242d5021 percpu: ensure the requested alignment is power of two If I revert this commit, the Kernels can work properly o

<    1   2   3   4   5   6   7   8   9   10   >