Martin Pieuchot wrote:
> On 07/02/17(Tue) 10:29, Ted Unangst wrote:
> > Martin Pieuchot wrote:
> > > PF has its own home-brewed solution for dealing with CPU hogging.  It
> > > has been introduced in r1.88 of net/pf_table.c and I couldn't find any
> > > explanation why it is different than the idiom we use in other places.
> > 
> > oh, just because i didn't bother making them all the same.
> > 
> > > 
> > > So let's use the same idiom, I promise to introduce a macro an unify all
> > > of them once this is in.
> > 
> > so i think sched_pause is supposed to be that macro, but gets into the 
> > preempt
> > vs yield debate.
> 
> I want to introduce a sched_preempt() and convert all the current
> callers of preempt() in a second step.  Does that sound like a plan?

spitballing...

a sched_pause() macro that takes the function to call? sched_pause(yield) or
sched_pause(preempt). is that more clear? i think it's less mysterious what
happens.

The only problem is that preempt requires a NULL argument, but after 30 years
of not fixing that, I'd say we can also just delete the argument.

Reply via email to