[PATCH 19/37] binder: use atomic for transaction_log index

2017-06-29 Thread Todd Kjos
The log->next index for the transaction log was not protected when incremented. This led to a case where log->next++ resulted in an index larger than ARRAY_SIZE(log->entry) and eventually a bad access to memory. Fixed by making the log index an atomic64 and converting to an array by using "%

[PATCH 02/37] binder: use group leader instead of open thread

2017-06-29 Thread Todd Kjos
The binder allocator assumes that the thread that called binder_open will never die for the lifetime of that proc. That thread is normally the group_leader, however it may not be. Use the group_leader instead of current. Signed-off-by: Todd Kjos --- drivers/android/binder.c |

[PATCH 19/37] binder: use atomic for transaction_log index

2017-06-29 Thread Todd Kjos
The log->next index for the transaction log was not protected when incremented. This led to a case where log->next++ resulted in an index larger than ARRAY_SIZE(log->entry) and eventually a bad access to memory. Fixed by making the log index an atomic64 and converting to an array by using "%

[PATCH 02/37] binder: use group leader instead of open thread

2017-06-29 Thread Todd Kjos
The binder allocator assumes that the thread that called binder_open will never die for the lifetime of that proc. That thread is normally the group_leader, however it may not be. Use the group_leader instead of current. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 4 ++-- 1 file

[PATCH 05/37] binder: remove unneeded cleanup code

2017-06-29 Thread Todd Kjos
The buffer's transaction has already been freed before binder_deferred_release. No need to do it again. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/android/binder.c

[PATCH 05/37] binder: remove unneeded cleanup code

2017-06-29 Thread Todd Kjos
The buffer's transaction has already been freed before binder_deferred_release. No need to do it again. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index

[PATCH 11/37] binder: make binder_last_id an atomic

2017-06-29 Thread Todd Kjos
Use an atomic for binder_last_id to avoid locking it Signed-off-by: Todd Kjos --- drivers/android/binder.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index cd4191d027e1..25f30d81c7d0 100644

[PATCH 11/37] binder: make binder_last_id an atomic

2017-06-29 Thread Todd Kjos
Use an atomic for binder_last_id to avoid locking it Signed-off-by: Todd Kjos --- drivers/android/binder.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index cd4191d027e1..25f30d81c7d0 100644 ---

Re: [PATCH] firmware: wake all waiters

2017-06-29 Thread Davidlohr Bueso
On Tue, 27 Jun 2017, Luis R. Rodriguez wrote: * As a side effect of this; the data structures are slimmer. * - * One would recommend using this wait queue where possible. + * NOTE: swait is for cases of extreme memory considerations and some very + * special realtime issues, where it saves a

Re: [PATCH] firmware: wake all waiters

2017-06-29 Thread Davidlohr Bueso
On Tue, 27 Jun 2017, Luis R. Rodriguez wrote: * As a side effect of this; the data structures are slimmer. * - * One would recommend using this wait queue where possible. + * NOTE: swait is for cases of extreme memory considerations and some very + * special realtime issues, where it saves a

[PATCH 15/37] binder: don't modify thread->looper from other threads

2017-06-29 Thread Todd Kjos
The looper member of struct binder_thread is a bitmask of control bits. All of the existing bits are modified by the affected thread except for BINDER_LOOPER_STATE_NEED_RETURN which can be modified in binder_deferred_flush() by another thread. To avoid adding a spinlock around all read-mod-writes

[PATCH 15/37] binder: don't modify thread->looper from other threads

2017-06-29 Thread Todd Kjos
The looper member of struct binder_thread is a bitmask of control bits. All of the existing bits are modified by the affected thread except for BINDER_LOOPER_STATE_NEED_RETURN which can be modified in binder_deferred_flush() by another thread. To avoid adding a spinlock around all read-mod-writes

[PATCH 18/37] binder: add more debug info when allocation fails.

2017-06-29 Thread Todd Kjos
From: Martijn Coenen Display information about allocated/free space whenever binder buffer allocation fails on synchronous transactions. Signed-off-by: Martijn Coenen Signed-off-by: Siqi Lin --- drivers/android/binder_alloc.c | 31

[PATCH 25/37] binder: use node->tmp_refs to ensure node safety

2017-06-29 Thread Todd Kjos
When obtaining a node via binder_get_node(), binder_get_node_from_ref() or binder_new_node(), increment node->tmp_refs to take a temporary reference on the node to ensure the node persists while being used. binder_put_node() must be called to remove the temporary reference. Signed-off-by: Todd

[PATCH 20/37] binder: refactor binder_pop_transaction

2017-06-29 Thread Todd Kjos
binder_pop_transaction needs to be split into 2 pieces to to allow the proc lock to be held on entry to dequeue the transaction stack, but no lock when kfree'ing the transaction. Split into binder_pop_transaction_locked and binder_free_transaction (the actual locks are still to be added).

[PATCH 18/37] binder: add more debug info when allocation fails.

2017-06-29 Thread Todd Kjos
From: Martijn Coenen Display information about allocated/free space whenever binder buffer allocation fails on synchronous transactions. Signed-off-by: Martijn Coenen Signed-off-by: Siqi Lin --- drivers/android/binder_alloc.c | 31 ++- 1 file changed, 30

[PATCH 25/37] binder: use node->tmp_refs to ensure node safety

2017-06-29 Thread Todd Kjos
When obtaining a node via binder_get_node(), binder_get_node_from_ref() or binder_new_node(), increment node->tmp_refs to take a temporary reference on the node to ensure the node persists while being used. binder_put_node() must be called to remove the temporary reference. Signed-off-by: Todd

[PATCH 20/37] binder: refactor binder_pop_transaction

2017-06-29 Thread Todd Kjos
binder_pop_transaction needs to be split into 2 pieces to to allow the proc lock to be held on entry to dequeue the transaction stack, but no lock when kfree'ing the transaction. Split into binder_pop_transaction_locked and binder_free_transaction (the actual locks are still to be added).

[PATCH 27/37] binder: use inner lock to sync work dq and node counts

2017-06-29 Thread Todd Kjos
For correct behavior we need to hold the inner lock when dequeuing and processing node work in binder_thread_read. We now hold the inner lock when we enter the switch statement and release it after processing anything that might be affected by other threads. We also need to hold the inner lock to

[PATCH 27/37] binder: use inner lock to sync work dq and node counts

2017-06-29 Thread Todd Kjos
For correct behavior we need to hold the inner lock when dequeuing and processing node work in binder_thread_read. We now hold the inner lock when we enter the switch statement and release it after processing anything that might be affected by other threads. We also need to hold the inner lock to

[PATCH 22/37] binder: make sure target_node has strong ref

2017-06-29 Thread Todd Kjos
When initiating a transaction, the target_node must have a strong ref on it. Then we take a second strong ref to make sure the node survives until the transaction is complete. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 22 +- 1 file changed, 17

[PATCH 22/37] binder: make sure target_node has strong ref

2017-06-29 Thread Todd Kjos
When initiating a transaction, the target_node must have a strong ref on it. Then we take a second strong ref to make sure the node survives until the transaction is complete. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 22 +- 1 file changed, 17 insertions(+), 5

[PATCH 26/37] binder: introduce locking helper functions

2017-06-29 Thread Todd Kjos
There are 3 main spinlocks which must be acquired in this order: 1) proc->outer_lock : protects most fields of binder_proc, binder_thread, and binder_ref structures. binder_proc_lock() and binder_proc_unlock() are used to acq/rel. 2) node->lock : protects most fields of

[PATCH 26/37] binder: introduce locking helper functions

2017-06-29 Thread Todd Kjos
There are 3 main spinlocks which must be acquired in this order: 1) proc->outer_lock : protects most fields of binder_proc, binder_thread, and binder_ref structures. binder_proc_lock() and binder_proc_unlock() are used to acq/rel. 2) node->lock : protects most fields of

[PATCH 23/37] binder: make sure accesses to proc/thread are safe

2017-06-29 Thread Todd Kjos
binder_thread and binder_proc may be accessed by other threads when processing transaction. Therefore they must be prevented from being freed while a transaction is in progress that references them. This is done by introducing a temporary reference counter for threads and procs that indicates

[PATCH 23/37] binder: make sure accesses to proc/thread are safe

2017-06-29 Thread Todd Kjos
binder_thread and binder_proc may be accessed by other threads when processing transaction. Therefore they must be prevented from being freed while a transaction is in progress that references them. This is done by introducing a temporary reference counter for threads and procs that indicates

[PATCH 30/37] binder: protect proc->nodes with inner lock

2017-06-29 Thread Todd Kjos
When locks for binder_ref handling are added, proc->nodes will need to be modified while holding the outer lock Signed-off-by: Todd Kjos --- drivers/android/binder.c | 112 +-- 1 file changed, 89 insertions(+), 23 deletions(-) diff

[PATCH 30/37] binder: protect proc->nodes with inner lock

2017-06-29 Thread Todd Kjos
When locks for binder_ref handling are added, proc->nodes will need to be modified while holding the outer lock Signed-off-by: Todd Kjos --- drivers/android/binder.c | 112 +-- 1 file changed, 89 insertions(+), 23 deletions(-) diff --git

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Josh Poimboeuf
On Thu, Jun 29, 2017 at 11:50:18AM -0700, Andy Lutomirski wrote: > On Thu, Jun 29, 2017 at 10:53 AM, Josh Poimboeuf wrote: > > There's a bug here that will need a small change to the entry code. > > > > Mike Galbraith reported: > > > > WARNING: can't dereference registers

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Josh Poimboeuf
On Thu, Jun 29, 2017 at 11:50:18AM -0700, Andy Lutomirski wrote: > On Thu, Jun 29, 2017 at 10:53 AM, Josh Poimboeuf wrote: > > There's a bug here that will need a small change to the entry code. > > > > Mike Galbraith reported: > > > > WARNING: can't dereference registers at c900089d7e08

[PATCH 32/37] binder: protect transaction_stack with inner lock.

2017-06-29 Thread Todd Kjos
From: Martijn Coenen This makes future changes to priority inheritance easier, since we want to be able to look at a thread's transaction stack when selecting a thread to inherit priority for. It also allows us to take just a single lock in a few paths, where we used to take

[PATCH 24/37] binder: refactor binder ref inc/dec for thread safety

2017-06-29 Thread Todd Kjos
Once locks are added, binder_ref's will only be accessed safely with the proc lock held. Refactor the inc/dec paths to make them atomic with the binder_get_ref* paths and node inc/dec. For example, instead of: ref = binder_get_ref(proc, handle, strong); ... binder_dec_ref(ref, strong); we

[PATCH 32/37] binder: protect transaction_stack with inner lock.

2017-06-29 Thread Todd Kjos
From: Martijn Coenen This makes future changes to priority inheritance easier, since we want to be able to look at a thread's transaction stack when selecting a thread to inherit priority for. It also allows us to take just a single lock in a few paths, where we used to take two in succession.

[PATCH 24/37] binder: refactor binder ref inc/dec for thread safety

2017-06-29 Thread Todd Kjos
Once locks are added, binder_ref's will only be accessed safely with the proc lock held. Refactor the inc/dec paths to make them atomic with the binder_get_ref* paths and node inc/dec. For example, instead of: ref = binder_get_ref(proc, handle, strong); ... binder_dec_ref(ref, strong); we

[PATCH 34/37] binder: protect binder_ref with outer lock

2017-06-29 Thread Todd Kjos
Use proc->outer_lock to protect the binder_ref structure. The outer lock allows functions operating on the binder_ref to do nested acquires of node and inner locks as necessary to attach refs to nodes atomically. Binder refs must never be accesssed without holding the outer lock. Signed-off-by:

[PATCH 29/37] binder: add spinlock to protect binder_node

2017-06-29 Thread Todd Kjos
node->node_lock is used to protect elements of node. No need to acquire for fields that are invariant: debug_id, ptr, cookie. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 220 +++ 1 file changed, 165 insertions(+), 55

[PATCH 31/37] binder: protect proc->threads with inner_lock

2017-06-29 Thread Todd Kjos
proc->threads will need to be accessed with higher locks of other processes held so use proc->inner_lock to protect it. proc->tmp_ref now needs to be protected by proc->inner_lock. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 87

[PATCH 34/37] binder: protect binder_ref with outer lock

2017-06-29 Thread Todd Kjos
Use proc->outer_lock to protect the binder_ref structure. The outer lock allows functions operating on the binder_ref to do nested acquires of node and inner locks as necessary to attach refs to nodes atomically. Binder refs must never be accesssed without holding the outer lock. Signed-off-by:

[PATCH 29/37] binder: add spinlock to protect binder_node

2017-06-29 Thread Todd Kjos
node->node_lock is used to protect elements of node. No need to acquire for fields that are invariant: debug_id, ptr, cookie. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 220 +++ 1 file changed, 165 insertions(+), 55 deletions(-) diff

[PATCH 31/37] binder: protect proc->threads with inner_lock

2017-06-29 Thread Todd Kjos
proc->threads will need to be accessed with higher locks of other processes held so use proc->inner_lock to protect it. proc->tmp_ref now needs to be protected by proc->inner_lock. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 87 +++- 1

[PATCH 37/37] binder: remove global binder lock

2017-06-29 Thread Todd Kjos
Remove global mutex and rely on fine-grained locking Signed-off-by: Todd Kjos --- drivers/android/binder.c | 46 +++--- 1 file changed, 3 insertions(+), 43 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c

[PATCH 37/37] binder: remove global binder lock

2017-06-29 Thread Todd Kjos
Remove global mutex and rely on fine-grained locking Signed-off-by: Todd Kjos --- drivers/android/binder.c | 46 +++--- 1 file changed, 3 insertions(+), 43 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index

[PATCH 28/37] binder: add spinlocks to protect todo lists

2017-06-29 Thread Todd Kjos
The todo lists in the proc, thread, and node structures are accessed by other procs/threads to place work items on the queue. The todo lists are protected by the new proc->inner_lock. No locks should ever be nested under these locks. As the name suggests, an outer lock will be introduced in a

[PATCH 28/37] binder: add spinlocks to protect todo lists

2017-06-29 Thread Todd Kjos
The todo lists in the proc, thread, and node structures are accessed by other procs/threads to place work items on the queue. The todo lists are protected by the new proc->inner_lock. No locks should ever be nested under these locks. As the name suggests, an outer lock will be introduced in a

[PATCH 36/37] binder: fix death race conditions

2017-06-29 Thread Todd Kjos
From: Martijn Coenen A race existed where one thread could register a death notification for a node, while another thread was cleaning up that node and sending out death notifications for its references, causing simultaneous access to ref->death because different locks were

[PATCH 36/37] binder: fix death race conditions

2017-06-29 Thread Todd Kjos
From: Martijn Coenen A race existed where one thread could register a death notification for a node, while another thread was cleaning up that node and sending out death notifications for its references, causing simultaneous access to ref->death because different locks were held. Signed-off-by:

[PATCH 33/37] binder: use inner lock to protect thread accounting

2017-06-29 Thread Todd Kjos
Use the inner lock to protect thread accounting fields in proc structure: max_threads, requested_threads, requested_threads_started and ready_threads. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 28 +++- 1 file changed, 23 insertions(+), 5

[PATCH 35/37] binder: protect against stale pointers in print_binder_transaction

2017-06-29 Thread Todd Kjos
When printing transactions there were several race conditions that could cause a stale pointer to be deferenced. Fixed by reading the pointer once and using it if valid (which is safe). The transaction buffer also needed protection via proc lock, so it is only printed if we are holding the correct

[PATCH 33/37] binder: use inner lock to protect thread accounting

2017-06-29 Thread Todd Kjos
Use the inner lock to protect thread accounting fields in proc structure: max_threads, requested_threads, requested_threads_started and ready_threads. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 28 +++- 1 file changed, 23 insertions(+), 5 deletions(-) diff

[PATCH 35/37] binder: protect against stale pointers in print_binder_transaction

2017-06-29 Thread Todd Kjos
When printing transactions there were several race conditions that could cause a stale pointer to be deferenced. Fixed by reading the pointer once and using it if valid (which is safe). The transaction buffer also needed protection via proc lock, so it is only printed if we are holding the correct

[PATCH 07/37] binder: move binder_alloc to separate file

2017-06-29 Thread Todd Kjos
Move the binder allocator functionality to its own file Continuation of splitting the binder allocator from the binder driver. Split binder_alloc functions from normal binder functions. Add kernel doc comments to functions declared extern in binder_alloc.h Signed-off-by: Todd Kjos

[PATCH 07/37] binder: move binder_alloc to separate file

2017-06-29 Thread Todd Kjos
Move the binder allocator functionality to its own file Continuation of splitting the binder allocator from the binder driver. Split binder_alloc functions from normal binder functions. Add kernel doc comments to functions declared extern in binder_alloc.h Signed-off-by: Todd Kjos ---

[PATCH 13/37] binder: refactor queue management in binder_thread_read

2017-06-29 Thread Todd Kjos
In binder_thread_read, the BINDER_WORK_NODE command is used to communicate the references on the node to userspace. It can take a couple of iterations in the loop to construct the list of commands for user space. When locking is added, the lock would need to be release on each iteration which

[PATCH 10/37] binder: change binder_stats to atomics

2017-06-29 Thread Todd Kjos
From: Badhri Jagan Sridharan Use atomics for stats to avoid needing to lock for increments/decrements Signed-off-by: Todd Kjos --- drivers/android/binder.c | 48 1 file changed, 28 insertions(+), 20

[PATCH 13/37] binder: refactor queue management in binder_thread_read

2017-06-29 Thread Todd Kjos
In binder_thread_read, the BINDER_WORK_NODE command is used to communicate the references on the node to userspace. It can take a couple of iterations in the loop to construct the list of commands for user space. When locking is added, the lock would need to be release on each iteration which

[PATCH 10/37] binder: change binder_stats to atomics

2017-06-29 Thread Todd Kjos
From: Badhri Jagan Sridharan Use atomics for stats to avoid needing to lock for increments/decrements Signed-off-by: Todd Kjos --- drivers/android/binder.c | 48 1 file changed, 28 insertions(+), 20 deletions(-) diff --git

[PATCH 09/37] binder: add protection for non-perf cases

2017-06-29 Thread Todd Kjos
Add binder_dead_nodes_lock, binder_procs_lock, and binder_context_mgr_node_lock to protect the associated global lists Signed-off-by: Todd Kjos --- drivers/android/binder.c | 81 +--- 1 file changed, 63 insertions(+), 18 deletions(-)

[PATCH 09/37] binder: add protection for non-perf cases

2017-06-29 Thread Todd Kjos
Add binder_dead_nodes_lock, binder_procs_lock, and binder_context_mgr_node_lock to protect the associated global lists Signed-off-by: Todd Kjos --- drivers/android/binder.c | 81 +--- 1 file changed, 63 insertions(+), 18 deletions(-) diff --git

[PATCH 06/37] binder: separate out binder_alloc functions

2017-06-29 Thread Todd Kjos
Continuation of splitting the binder allocator from the binder driver. Separate binder_alloc functions from normal binder functions. Protect the allocator with a separate mutex. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 649

[PATCH 12/37] binder: add log information for binder transaction failures

2017-06-29 Thread Todd Kjos
Add additional information to determine the cause of binder failures. Adds the following to failed transaction log and kernel messages: return_error : value returned for transaction return_error_param : errno returned by binder allocator return_error_line : line number

[PATCH 06/37] binder: separate out binder_alloc functions

2017-06-29 Thread Todd Kjos
Continuation of splitting the binder allocator from the binder driver. Separate binder_alloc functions from normal binder functions. Protect the allocator with a separate mutex. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 649 +

[PATCH 12/37] binder: add log information for binder transaction failures

2017-06-29 Thread Todd Kjos
Add additional information to determine the cause of binder failures. Adds the following to failed transaction log and kernel messages: return_error : value returned for transaction return_error_param : errno returned by binder allocator return_error_line : line number

[PATCH 04/37] binder: separate binder allocator structure from binder proc

2017-06-29 Thread Todd Kjos
The binder allocator is logically separate from the rest of the binder drivers. Separating the data structures to prepare for splitting into separate file with separate locking. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 212

[PATCH 03/37] binder: Use wake up hint for synchronous transactions.

2017-06-29 Thread Todd Kjos
From: Riley Andrews Use wake_up_interruptible_sync() to hint to the scheduler binder transactions are synchronous wakeups. Disable preemption while waking to avoid ping-ponging on the binder lock. Signed-off-by: Todd Kjos Signed-off-by: Omprakash Dhyade

[PATCH 04/37] binder: separate binder allocator structure from binder proc

2017-06-29 Thread Todd Kjos
The binder allocator is logically separate from the rest of the binder drivers. Separating the data structures to prepare for splitting into separate file with separate locking. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 212 +

[PATCH 03/37] binder: Use wake up hint for synchronous transactions.

2017-06-29 Thread Todd Kjos
From: Riley Andrews Use wake_up_interruptible_sync() to hint to the scheduler binder transactions are synchronous wakeups. Disable preemption while waking to avoid ping-ponging on the binder lock. Signed-off-by: Todd Kjos Signed-off-by: Omprakash Dhyade --- drivers/android/binder.c | 8

[PATCH 01/37] Revert "android: binder: Sanity check at binder ioctl"

2017-06-29 Thread Todd Kjos
This reverts commit a906d6931f3ccaf7de805643190765ddd7378e27. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index aae4d8d4be36..157bd3e49ff4 100644 ---

[PATCH 01/37] Revert "android: binder: Sanity check at binder ioctl"

2017-06-29 Thread Todd Kjos
This reverts commit a906d6931f3ccaf7de805643190765ddd7378e27. Signed-off-by: Todd Kjos --- drivers/android/binder.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/android/binder.c b/drivers/android/binder.c index aae4d8d4be36..157bd3e49ff4 100644 --- a/drivers/android/binder.c

[PATCH 00/37] fine-grained locking in binder driver

2017-06-29 Thread Todd Kjos
The binder driver uses a global mutex to serialize access to state in a multi-threaded environment. This global lock has been increasingly problematic as Android devices have scaled to more cores. The problem is not so much contention for the global lock which still remains relatively low, but the

[PATCH 00/37] fine-grained locking in binder driver

2017-06-29 Thread Todd Kjos
The binder driver uses a global mutex to serialize access to state in a multi-threaded environment. This global lock has been increasingly problematic as Android devices have scaled to more cores. The problem is not so much contention for the global lock which still remains relatively low, but the

Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev

2017-06-29 Thread Linus Torvalds
On Thu, Jun 29, 2017 at 11:55 AM, Oleg Nesterov wrote: > > I didn't ;) I moved it up, right above VM_GROWSDOWN check. I think I will just need to take a long nap, I'm clearly not tracking the patches very well. Linus

Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev

2017-06-29 Thread Linus Torvalds
On Thu, Jun 29, 2017 at 11:55 AM, Oleg Nesterov wrote: > > I didn't ;) I moved it up, right above VM_GROWSDOWN check. I think I will just need to take a long nap, I'm clearly not tracking the patches very well. Linus

Re: [PATCH v2 11/51] md: raid1: initialize bvec table via bio_add_page()

2017-06-29 Thread Shaohua Li
On Wed, Jun 28, 2017 at 12:22:51AM +0800, Ming Lei wrote: > On Tue, Jun 27, 2017 at 05:36:39PM +0800, Guoqing Jiang wrote: > > > > > > On 06/26/2017 08:09 PM, Ming Lei wrote: > > > We will support multipage bvec soon, so initialize bvec > > > table using the standardy way instead of writing the

Re: [PATCH v2 11/51] md: raid1: initialize bvec table via bio_add_page()

2017-06-29 Thread Shaohua Li
On Wed, Jun 28, 2017 at 12:22:51AM +0800, Ming Lei wrote: > On Tue, Jun 27, 2017 at 05:36:39PM +0800, Guoqing Jiang wrote: > > > > > > On 06/26/2017 08:09 PM, Ming Lei wrote: > > > We will support multipage bvec soon, so initialize bvec > > > table using the standardy way instead of writing the

Re: [PATCH 06/16] ntb: add check and comment for link up to mw_count and mw_get_align

2017-06-29 Thread Logan Gunthorpe
On 6/29/2017 12:11 PM, Allen Hubbe wrote: Nak. This breaks a work around for stability issues on some hardware. I am ok with changing the comment to say, this is only supported when called after link up. I would still like to allow these to be called at any time. Specific hardware drivers

Re: [PATCH 06/16] ntb: add check and comment for link up to mw_count and mw_get_align

2017-06-29 Thread Logan Gunthorpe
On 6/29/2017 12:11 PM, Allen Hubbe wrote: Nak. This breaks a work around for stability issues on some hardware. I am ok with changing the comment to say, this is only supported when called after link up. I would still like to allow these to be called at any time. Specific hardware drivers

Re: [PATCH 2/4] swait: add the missing killable swaits

2017-06-29 Thread Linus Torvalds
On Thu, Jun 29, 2017 at 11:33 AM, Davidlohr Bueso wrote: > On Thu, 29 Jun 2017, Linus Torvalds wrote: > >> I actually think swait is pure garbage. Most users only wake up one >> process anyway, and using swait for that is stupid. If you only wake >> up one, you might as well

Re: [PATCH 2/4] swait: add the missing killable swaits

2017-06-29 Thread Linus Torvalds
On Thu, Jun 29, 2017 at 11:33 AM, Davidlohr Bueso wrote: > On Thu, 29 Jun 2017, Linus Torvalds wrote: > >> I actually think swait is pure garbage. Most users only wake up one >> process anyway, and using swait for that is stupid. If you only wake >> up one, you might as well just have a single

Re: [PATCH v2 5/7] input: goldfish: Fix multitouch event handling

2017-06-29 Thread Dmitry Torokhov
On Wed, Jun 28, 2017 at 05:56:29PM +0200, Aleksandar Markovic wrote: > From: Lingfeng Yang > > Register Goldfish Events device properly as a multitouch device, > and send SYN_REPORT event in appropriate cases only. > > If SYN_REPORT is sent on every single multitouch event, it

Re: [PATCH v2 5/7] input: goldfish: Fix multitouch event handling

2017-06-29 Thread Dmitry Torokhov
On Wed, Jun 28, 2017 at 05:56:29PM +0200, Aleksandar Markovic wrote: > From: Lingfeng Yang > > Register Goldfish Events device properly as a multitouch device, > and send SYN_REPORT event in appropriate cases only. > > If SYN_REPORT is sent on every single multitouch event, it breaks > the

Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev

2017-06-29 Thread Oleg Nesterov
On 06/29, Linus Torvalds wrote: > > On Thu, Jun 29, 2017 at 8:19 AM, Oleg Nesterov wrote: > > > > Hmm. May be you misread this patch? > > Ahh, yes. I'm ok with your patch. > > That said, you did remove something extra: the comment about > > /* Check that both stack segments

Re: [PATCH 0/1] expand_downwards: don't require the gap if !vm_prev

2017-06-29 Thread Oleg Nesterov
On 06/29, Linus Torvalds wrote: > > On Thu, Jun 29, 2017 at 8:19 AM, Oleg Nesterov wrote: > > > > Hmm. May be you misread this patch? > > Ahh, yes. I'm ok with your patch. > > That said, you did remove something extra: the comment about > > /* Check that both stack segments have the same

Re: [PATCH v2] mfd: Add driver for RAVE Supervisory Processor

2017-06-29 Thread Andrey Smirnov
On Fri, Jun 23, 2017 at 8:28 AM, Andrey Smirnov wrote: > On Tue, Jun 20, 2017 at 1:19 AM, Lee Jones wrote: >> On Mon, 12 Jun 2017, Andrey Smirnov wrote: >> >>> Add a driver for RAVE Supervisory Processor, an MCU implementing >>> varoius bits of

Re: [PATCH v2] mfd: Add driver for RAVE Supervisory Processor

2017-06-29 Thread Andrey Smirnov
On Fri, Jun 23, 2017 at 8:28 AM, Andrey Smirnov wrote: > On Tue, Jun 20, 2017 at 1:19 AM, Lee Jones wrote: >> On Mon, 12 Jun 2017, Andrey Smirnov wrote: >> >>> Add a driver for RAVE Supervisory Processor, an MCU implementing >>> varoius bits of housekeeping functionality (watchdoging, backlight

Re: [PATCH] fs: ext4: inode->i_generation not assigned 0.

2017-06-29 Thread J. Bruce Fields
On Thu, Jun 29, 2017 at 02:30:53PM -0400, J. Bruce Fields wrote: > On Thu, Jun 29, 2017 at 10:25:28AM -0700, Darrick J. Wong wrote: > > Was there ever a version of NFS (or more generally callers of the > > exportfs code) that couldn't deal with i_generation in the file handle, > > and therefore we

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Andy Lutomirski
On Thu, Jun 29, 2017 at 10:53 AM, Josh Poimboeuf wrote: > There's a bug here that will need a small change to the entry code. > > Mike Galbraith reported: > > WARNING: can't dereference registers at c900089d7e08 for ip > 81740bbb > > After some looking I found

Re: [PATCH] fs: ext4: inode->i_generation not assigned 0.

2017-06-29 Thread J. Bruce Fields
On Thu, Jun 29, 2017 at 02:30:53PM -0400, J. Bruce Fields wrote: > On Thu, Jun 29, 2017 at 10:25:28AM -0700, Darrick J. Wong wrote: > > Was there ever a version of NFS (or more generally callers of the > > exportfs code) that couldn't deal with i_generation in the file handle, > > and therefore we

Re: [PATCH v2 6/8] x86/entry: add unwind hint annotations

2017-06-29 Thread Andy Lutomirski
On Thu, Jun 29, 2017 at 10:53 AM, Josh Poimboeuf wrote: > There's a bug here that will need a small change to the entry code. > > Mike Galbraith reported: > > WARNING: can't dereference registers at c900089d7e08 for ip > 81740bbb > > After some looking I found that it's caused by

Re: [BISECTED, REGRESSION] v4.12-rc: omapdrm fails to probe on Nokia N900

2017-06-29 Thread Aaro Koskinen
Hi, On Thu, Jun 15, 2017 at 09:51:06AM +0300, Tomi Valkeinen wrote: > On 15/06/17 01:11, Aaro Koskinen wrote: > > When booting v4.12-rc5 on Nokia N900, omapdrm fails to probe and there > > is no display. > > Are you sure it doesn't probe? It fails the omapdss_stack_is_ready() > check? It

Re: [BISECTED, REGRESSION] v4.12-rc: omapdrm fails to probe on Nokia N900

2017-06-29 Thread Aaro Koskinen
Hi, On Thu, Jun 15, 2017 at 09:51:06AM +0300, Tomi Valkeinen wrote: > On 15/06/17 01:11, Aaro Koskinen wrote: > > When booting v4.12-rc5 on Nokia N900, omapdrm fails to probe and there > > is no display. > > Are you sure it doesn't probe? It fails the omapdss_stack_is_ready() > check? It

Re: [v3 1/6] mm, oom: use oom_victims counter to synchronize oom victim selection

2017-06-29 Thread Roman Gushchin
On Fri, Jun 23, 2017 at 06:52:20AM +0900, Tetsuo Handa wrote: > Tetsuo Handa wrote: > > Roman Gushchin wrote: > > > On Thu, Jun 22, 2017 at 09:40:28AM +0900, Tetsuo Handa wrote: > > > > Roman Gushchin wrote: > > > > > --- a/mm/oom_kill.c > > > > > +++ b/mm/oom_kill.c > > > > > @@ -992,6 +992,13 @@

Re: [v3 1/6] mm, oom: use oom_victims counter to synchronize oom victim selection

2017-06-29 Thread Roman Gushchin
On Fri, Jun 23, 2017 at 06:52:20AM +0900, Tetsuo Handa wrote: > Tetsuo Handa wrote: > > Roman Gushchin wrote: > > > On Thu, Jun 22, 2017 at 09:40:28AM +0900, Tetsuo Handa wrote: > > > > Roman Gushchin wrote: > > > > > --- a/mm/oom_kill.c > > > > > +++ b/mm/oom_kill.c > > > > > @@ -992,6 +992,13 @@

Re: [GIT PULL rcu/next] RCU commits for 4.13

2017-06-29 Thread Paul E. McKenney
On Thu, Jun 29, 2017 at 11:17:26AM +0800, Boqun Feng wrote: > On Wed, Jun 28, 2017 at 05:45:56PM -0700, Paul E. McKenney wrote: > > On Wed, Jun 28, 2017 at 05:05:46PM -0700, Linus Torvalds wrote: > > > On Wed, Jun 28, 2017 at 4:54 PM, Paul E. McKenney > > > wrote: > >

Re: [GIT PULL rcu/next] RCU commits for 4.13

2017-06-29 Thread Paul E. McKenney
On Thu, Jun 29, 2017 at 11:17:26AM +0800, Boqun Feng wrote: > On Wed, Jun 28, 2017 at 05:45:56PM -0700, Paul E. McKenney wrote: > > On Wed, Jun 28, 2017 at 05:05:46PM -0700, Linus Torvalds wrote: > > > On Wed, Jun 28, 2017 at 4:54 PM, Paul E. McKenney > > > wrote: > > > > > > > > Linus, are you

Re: [GIT PULL rcu/next] RCU commits for 4.13

2017-06-29 Thread Paul E. McKenney
On Thu, Jun 29, 2017 at 12:38:48PM +0100, Will Deacon wrote: > [turns out I've not been on cc for this thread, but Jade pointed me to it > and I see my name came up at some point!] My bad for not having you Cc: on the original patch, apologies! > On Wed, Jun 28, 2017 at 05:05:46PM -0700, Linus

Re: [GIT PULL rcu/next] RCU commits for 4.13

2017-06-29 Thread Paul E. McKenney
On Thu, Jun 29, 2017 at 12:38:48PM +0100, Will Deacon wrote: > [turns out I've not been on cc for this thread, but Jade pointed me to it > and I see my name came up at some point!] My bad for not having you Cc: on the original patch, apologies! > On Wed, Jun 28, 2017 at 05:05:46PM -0700, Linus

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-29 Thread Brian Norris
Hi Johannes, On Wed, Jun 28, 2017 at 09:28:49AM +0200, Johannes Berg wrote: > On Tue, 2017-06-27 at 13:48 -0700, Brian Norris wrote: > > > > There isn't really a good way to do this. You can, of course, call > > > wiphy_unregister(), but if you could do that you'd already have the > > > problem

Re: [PATCH 05/14] mwifiex: re-register wiphy across reset

2017-06-29 Thread Brian Norris
Hi Johannes, On Wed, Jun 28, 2017 at 09:28:49AM +0200, Johannes Berg wrote: > On Tue, 2017-06-27 at 13:48 -0700, Brian Norris wrote: > > > > There isn't really a good way to do this. You can, of course, call > > > wiphy_unregister(), but if you could do that you'd already have the > > > problem

Re: [v3 5/6] mm, oom: don't mark all oom victims tasks with TIF_MEMDIE

2017-06-29 Thread Roman Gushchin
On Thu, Jun 29, 2017 at 10:53:57AM +0200, Michal Hocko wrote: > On Wed 21-06-17 22:19:15, Roman Gushchin wrote: > > We want to limit the number of tasks which are having an access > > to the memory reserves. To ensure the progress it's enough > > to have one such process at the time. > > > > If

Re: [v3 5/6] mm, oom: don't mark all oom victims tasks with TIF_MEMDIE

2017-06-29 Thread Roman Gushchin
On Thu, Jun 29, 2017 at 10:53:57AM +0200, Michal Hocko wrote: > On Wed 21-06-17 22:19:15, Roman Gushchin wrote: > > We want to limit the number of tasks which are having an access > > to the memory reserves. To ensure the progress it's enough > > to have one such process at the time. > > > > If

<    4   5   6   7   8   9   10   11   12   13   >