Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-18 Thread Guenter Roeck
On Thu, Jun 18, 2020 at 01:57:33PM -0400, Steven Rostedt wrote: > On Tue, Jun 09, 2020 at 02:25:09PM -0700, Guenter Roeck wrote: > > > > > > Still occurring on Linus' tree. This needs to be fixed. (And not by > > > removing > > > support for randstruct; that's not a "fix"...) > > > > > > >

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-18 Thread Steven Rostedt
On Tue, Jun 09, 2020 at 02:25:09PM -0700, Guenter Roeck wrote: > > > > Still occurring on Linus' tree. This needs to be fixed. (And not by > > removing > > support for randstruct; that's not a "fix"...) > > > > How about the hack below ? My test suite failed due to this bug (on my

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-10 Thread Peter Zijlstra
On Tue, Jun 09, 2020 at 04:03:19PM -0700, Guenter Roeck wrote: > On 6/9/20 3:06 PM, Peter Zijlstra wrote: > > On Tue, Jun 09, 2020 at 02:38:29PM -0700, Eric Biggers wrote: > >> Does the struct actually have to be named? How about: > >> > >> diff --git a/include/linux/sched.h

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-09 Thread Guenter Roeck
On 6/9/20 3:06 PM, Peter Zijlstra wrote: > On Tue, Jun 09, 2020 at 02:38:29PM -0700, Eric Biggers wrote: >> Does the struct actually have to be named? How about: >> >> diff --git a/include/linux/sched.h b/include/linux/sched.h >> index c5d96e3e7fff42..14ca25cda19150 100644 >> ---

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-09 Thread Peter Zijlstra
On Tue, Jun 09, 2020 at 01:21:34PM -0700, Eric Biggers wrote: > Still occurring on Linus' tree. This needs to be fixed. (And not by removing > support for randstruct; that's not a "fix"...) > > Shouldn't the kbuild test robot have caught this? Should probably, but the thing has been rather

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-09 Thread Peter Zijlstra
On Tue, Jun 09, 2020 at 02:38:29PM -0700, Eric Biggers wrote: > Does the struct actually have to be named? How about: > > diff --git a/include/linux/sched.h b/include/linux/sched.h > index c5d96e3e7fff42..14ca25cda19150 100644 > --- a/include/linux/sched.h > +++ b/include/linux/sched.h > @@

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-09 Thread Eric Biggers
On Tue, Jun 09, 2020 at 02:25:09PM -0700, Guenter Roeck wrote: > > > > Still occurring on Linus' tree. This needs to be fixed. (And not by > > removing > > support for randstruct; that's not a "fix"...) > > > > How about the hack below ? > > Guenter > > --- > diff --git

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-09 Thread Guenter Roeck
On Tue, Jun 09, 2020 at 01:21:34PM -0700, Eric Biggers wrote: > On Sat, Jun 06, 2020 at 04:13:33PM -0700, Guenter Roeck wrote: > > On 6/5/20 9:15 AM, Eric Biggers wrote: > > > On Fri, Jun 05, 2020 at 09:41:54AM +0200, Peter Zijlstra wrote: > > >> On Thu, Jun 04, 2020 at 05:24:33PM -0700, Eric

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-09 Thread Eric Biggers
On Sat, Jun 06, 2020 at 04:13:33PM -0700, Guenter Roeck wrote: > On 6/5/20 9:15 AM, Eric Biggers wrote: > > On Fri, Jun 05, 2020 at 09:41:54AM +0200, Peter Zijlstra wrote: > >> On Thu, Jun 04, 2020 at 05:24:33PM -0700, Eric Biggers wrote: > >>> On Thu, Jun 04, 2020 at 07:18:37AM -0700, Guenter

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-06 Thread Guenter Roeck
On 6/5/20 9:15 AM, Eric Biggers wrote: > On Fri, Jun 05, 2020 at 09:41:54AM +0200, Peter Zijlstra wrote: >> On Thu, Jun 04, 2020 at 05:24:33PM -0700, Eric Biggers wrote: >>> On Thu, Jun 04, 2020 at 07:18:37AM -0700, Guenter Roeck wrote: On Tue, May 26, 2020 at 06:11:04PM +0200, Peter Zijlstra

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-05 Thread Eric Biggers
On Fri, Jun 05, 2020 at 09:41:54AM +0200, Peter Zijlstra wrote: > On Thu, Jun 04, 2020 at 05:24:33PM -0700, Eric Biggers wrote: > > On Thu, Jun 04, 2020 at 07:18:37AM -0700, Guenter Roeck wrote: > > > On Tue, May 26, 2020 at 06:11:04PM +0200, Peter Zijlstra wrote: > > > > The recent commit:

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-05 Thread Peter Zijlstra
On Fri, Jun 05, 2020 at 06:33:38AM -0700, Guenter Roeck wrote: > I have not made the C standard. You point out yourself a possible explicit > culprit: struct randomization. The randomization crud is very much outside the C spec. > That by itself shows that you can not rely > on two elements of

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-05 Thread Guenter Roeck
On 6/5/20 1:10 AM, Peter Zijlstra wrote: > On Thu, Jun 04, 2020 at 07:18:37AM -0700, Guenter Roeck wrote: >> On Tue, May 26, 2020 at 06:11:04PM +0200, Peter Zijlstra wrote: > >>> + BUILD_BUG_ON(offsetof(struct task_struct, wake_entry_type) - >>> offsetof(struct task_struct, wake_entry) != >>>

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-05 Thread Peter Zijlstra
On Thu, Jun 04, 2020 at 07:18:37AM -0700, Guenter Roeck wrote: > On Tue, May 26, 2020 at 06:11:04PM +0200, Peter Zijlstra wrote: > > + BUILD_BUG_ON(offsetof(struct task_struct, wake_entry_type) - > > offsetof(struct task_struct, wake_entry) != > > +offsetof(struct

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-05 Thread Peter Zijlstra
On Thu, Jun 04, 2020 at 05:24:33PM -0700, Eric Biggers wrote: > On Thu, Jun 04, 2020 at 07:18:37AM -0700, Guenter Roeck wrote: > > On Tue, May 26, 2020 at 06:11:04PM +0200, Peter Zijlstra wrote: > > > The recent commit: 90b5363acd47 ("sched: Clean up scheduler_ipi()") > > > got

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-04 Thread Eric Biggers
On Thu, Jun 04, 2020 at 07:18:37AM -0700, Guenter Roeck wrote: > On Tue, May 26, 2020 at 06:11:04PM +0200, Peter Zijlstra wrote: > > The recent commit: 90b5363acd47 ("sched: Clean up scheduler_ipi()") > > got smp_call_function_single_async() subtly wrong. Even though it will > > return -EBUSY when

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-06-04 Thread Guenter Roeck
On Tue, May 26, 2020 at 06:11:04PM +0200, Peter Zijlstra wrote: > The recent commit: 90b5363acd47 ("sched: Clean up scheduler_ipi()") > got smp_call_function_single_async() subtly wrong. Even though it will > return -EBUSY when trying to re-use a csd, that condition is not > atomic and still

Re: [RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-05-29 Thread Valdis Klētnieks
On Tue, 26 May 2020 18:11:04 +0200, Peter Zijlstra said: > The recent commit: 90b5363acd47 ("sched: Clean up scheduler_ipi()") > got smp_call_function_single_async() subtly wrong. Even though it will > return -EBUSY when trying to re-use a csd, that condition is not > atomic and still requires

[RFC][PATCH 7/7] sched: Replace rq::wake_list

2020-05-26 Thread Peter Zijlstra
The recent commit: 90b5363acd47 ("sched: Clean up scheduler_ipi()") got smp_call_function_single_async() subtly wrong. Even though it will return -EBUSY when trying to re-use a csd, that condition is not atomic and still requires external serialization. The change in ttwu_queue_remote() got this