[PATCH nft v4] include: Remove __init and __exit macro definitions.

2017-07-07 Thread Varsha Rao
Add nft_init and nft_exit functions, which calls _init and _exit functions in main.c file. Remove __init and __exit macro definitions as libnftables library will be created soon. Rename realm_table_init() and realm_table_exit() functions to avoid ambiguity as realm_table_rt_init(),

[PATCH v3 9/9] arch: Remove spin_unlock_wait() arch-specific definitions

2017-07-07 Thread Paul E. McKenney
There is no agreed-upon definition of spin_unlock_wait()'s semantics, and it appears that all callers could do just as well with a lock/unlock pair. This commit therefore removes the underlying arch-specific arch_spin_unlock_wait() for all architectures providing them. Signed-off-by: Paul E.

[PATCH v3 7/9] drivers/ata: Replace spin_unlock_wait() with lock/unlock pair

2017-07-07 Thread Paul E. McKenney
There is no agreed-upon definition of spin_unlock_wait()'s semantics, and it appears that all callers could do just as well with a lock/unlock pair. This commit therefore eliminates the spin_unlock_wait() call and associated else-clause and hoists the then-clause's lock and unlock out of the "if"

[PATCH v3 6/9] ipc: Replace spin_unlock_wait() with lock/unlock pair

2017-07-07 Thread Paul E. McKenney
There is no agreed-upon definition of spin_unlock_wait()'s semantics, and it appears that all callers could do just as well with a lock/unlock pair. This commit therefore replaces the spin_unlock_wait() call in exit_sem() with spin_lock() followed immediately by spin_unlock(). This should be safe

[PATCH v3 2/9] task_work: Replace spin_unlock_wait() with lock/unlock pair

2017-07-07 Thread Paul E. McKenney
From: Oleg Nesterov There is no agreed-upon definition of spin_unlock_wait()'s semantics, and it appears that all callers could do just as well with a lock/unlock pair. This commit therefore replaces the spin_unlock_wait() call in task_work_run() with a spin_lock_irq() and a

[PATCH v3 8/9] locking: Remove spin_unlock_wait() generic definitions

2017-07-07 Thread Paul E. McKenney
There is no agreed-upon definition of spin_unlock_wait()'s semantics, and it appears that all callers could do just as well with a lock/unlock pair. This commit therefore removes spin_unlock_wait() and related definitions from core code. Signed-off-by: Paul E. McKenney

[PATCH v3 4/9] completion: Replace spin_unlock_wait() with lock/unlock pair

2017-07-07 Thread Paul E. McKenney
There is no agreed-upon definition of spin_unlock_wait()'s semantics, and it appears that all callers could do just as well with a lock/unlock pair. This commit therefore replaces the spin_unlock_wait() call in completion_done() with spin_lock() followed immediately by spin_unlock(). This should

[PATCH v3 1/9] net/netfilter/nf_conntrack_core: Fix net_conntrack_lock()

2017-07-07 Thread Paul E. McKenney
From: Manfred Spraul As we want to remove spin_unlock_wait() and replace it with explicit spin_lock()/spin_unlock() calls, we can use this to simplify the locking. In addition: - Reading nf_conntrack_locks_all needs ACQUIRE memory ordering. - The new code avoids the

[PATCH v3 5/9] exit: Replace spin_unlock_wait() with lock/unlock pair

2017-07-07 Thread Paul E. McKenney
There is no agreed-upon definition of spin_unlock_wait()'s semantics, and it appears that all callers could do just as well with a lock/unlock pair. This commit therefore replaces the spin_unlock_wait() call in do_exit() with spin_lock() followed immediately by spin_unlock(). This should be safe

[PATCH v3 0/9] Remove spin_unlock_wait()

2017-07-07 Thread Paul E. McKenney
Hello! There is no agreed-upon definition of spin_unlock_wait()'s semantics, and it appears that all callers could do just as well with a lock/unlock pair. This series therefore removes spin_unlock_wait() and changes its users to instead use a lock/unlock pair. The commits are as follows, in

Re: [PATCH v2 0/9] Remove spin_unlock_wait()

2017-07-07 Thread Peter Zijlstra
On Fri, Jul 07, 2017 at 12:33:49PM +0200, Ingo Molnar wrote: > [1997/04] v2.1.36: > > the spin_unlock_wait() primitive gets introduced as part of release() Whee, that goes _way_ further back than I thought it did :-) > [2017/07] v4.12: > > wait_task_inactive() is still alive

[PATCH nf] netfilter: nat: fix src map lookup

2017-07-07 Thread Florian Westphal
When doing initial conversion to rhashtable I replaced the bucket walk with a single rhashtable_lookup_fast(). When moving to rhlist I failed to properly walk the list of identical tuples, but that is what is needed for this to work correctly. The table contains the original tuples, so the reply

Re: [PATCH v2 0/9] Remove spin_unlock_wait()

2017-07-07 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Thu, Jul 06, 2017 at 09:20:24AM -0700, Paul E. McKenney wrote: > > On Thu, Jul 06, 2017 at 06:05:55PM +0200, Peter Zijlstra wrote: > > > On Thu, Jul 06, 2017 at 02:12:24PM +, David Laight wrote: > > > > From: Paul E. McKenney > > > > [ . .

Re: [PATCH v2 0/9] Remove spin_unlock_wait()

2017-07-07 Thread Ingo Molnar
* Peter Zijlstra wrote: > > It might even be that this is the defined semantics of spin_unlock_wait(). > > As is, spin_unlock_wait() is somewhat ill defined. IIRC it grew from an > optimization by Oleg and subsequently got used elsewhere. And it being the > subtle