Re: Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-30 Thread Ryota Ozaki
On Fri, Jul 1, 2016 at 9:51 AM, Masao Uebayashi wrote: > On Tue, Jun 28, 2016 at 10:08 AM, Ryota Ozaki wrote: >> On Sat, Jun 25, 2016 at 11:56 AM, matthew green wrote: > Since we already use preempt_disable() to force an lwp to stick to a cpu, > doesn't that solve the problem? If need

Re: Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-30 Thread Masao Uebayashi
On Tue, Jun 28, 2016 at 10:08 AM, Ryota Ozaki wrote: > On Sat, Jun 25, 2016 at 11:56 AM, matthew green wrote: >>> > Since we already use preempt_disable() to force an lwp to stick to a cpu, >>> > doesn't that solve the problem? If need be, we can enforce nonpreemptable >>> > lwp's don't migrate.

Re: Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-27 Thread Ryota Ozaki
On Sat, Jun 25, 2016 at 11:56 AM, matthew green wrote: >> > Since we already use preempt_disable() to force an lwp to stick to a cpu, >> > doesn't that solve the problem? If need be, we can enforce nonpreemptable >> > lwp's don't migrate. > > why would we want to disable preemption in code that m

re: Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-24 Thread matthew green
> > Since we already use preempt_disable() to force an lwp to stick to a cpu, > > doesn't that solve the problem? If need be, we can enforce nonpreemptable > > lwp's don't migrate. why would we want to disable preemption in code that merely wants to run on a particular cpu. i dno't understand wh

Re: Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-23 Thread Masao Uebayashi
On Fri, Jun 17, 2016 at 12:57 PM, Matt Thomas wrote: > >> On Jun 13, 2016, at 5:53 PM, Ryota Ozaki wrote: >> >> On Mon, Jun 13, 2016 at 11:21 PM, Taylor R Campbell >> wrote: >>> Date: Mon, 13 Jun 2016 14:00:16 +0200 >>> From: Joerg Sonnenberger >>> >>> On Mon, Jun 13, 2016 at 07:36:31PM +

Re: Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-16 Thread Matt Thomas
> On Jun 13, 2016, at 5:53 PM, Ryota Ozaki wrote: > > On Mon, Jun 13, 2016 at 11:21 PM, Taylor R Campbell > wrote: >> Date: Mon, 13 Jun 2016 14:00:16 +0200 >> From: Joerg Sonnenberger >> >> On Mon, Jun 13, 2016 at 07:36:31PM +0900, Ryota Ozaki wrote: >>> Currently we do it by open-codin

Re: Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-14 Thread Ryota Ozaki
On Wed, Jun 15, 2016 at 11:44 AM, Ryota Ozaki wrote: > On Wed, Jun 15, 2016 at 11:29 AM, David Young wrote: >> On Wed, Jun 15, 2016 at 10:56:57AM +0900, Ryota Ozaki wrote: >>> On Tue, Jun 14, 2016 at 7:58 PM, Joerg Sonnenberger wrote: >>> > On Tue, Jun 14, 2016 at 09:53:33AM +0900, Ryota Ozaki w

Re: Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-14 Thread Ryota Ozaki
On Wed, Jun 15, 2016 at 11:29 AM, David Young wrote: > On Wed, Jun 15, 2016 at 10:56:57AM +0900, Ryota Ozaki wrote: >> On Tue, Jun 14, 2016 at 7:58 PM, Joerg Sonnenberger wrote: >> > On Tue, Jun 14, 2016 at 09:53:33AM +0900, Ryota Ozaki wrote: >> >> - curlwp_bind and curlwp_unbind >> >> - curlwp_

Re: Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-14 Thread David Young
On Wed, Jun 15, 2016 at 10:56:57AM +0900, Ryota Ozaki wrote: > On Tue, Jun 14, 2016 at 7:58 PM, Joerg Sonnenberger wrote: > > On Tue, Jun 14, 2016 at 09:53:33AM +0900, Ryota Ozaki wrote: > >> - curlwp_bind and curlwp_unbind > >> - curlwp_bound_set and curlwp_bound_restore > >> - curlwp_bound and c

Re: Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-14 Thread Ryota Ozaki
On Tue, Jun 14, 2016 at 7:58 PM, Joerg Sonnenberger wrote: > On Tue, Jun 14, 2016 at 09:53:33AM +0900, Ryota Ozaki wrote: >> - curlwp_bind and curlwp_unbind >> - curlwp_bound_set and curlwp_bound_restore >> - curlwp_bound and curlwp_boundx >> >> Any other ideas? :) > > curlwp_bind_push / curlwp_bi

Re: Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-14 Thread Joerg Sonnenberger
On Tue, Jun 14, 2016 at 09:53:33AM +0900, Ryota Ozaki wrote: > - curlwp_bind and curlwp_unbind > - curlwp_bound_set and curlwp_bound_restore > - curlwp_bound and curlwp_boundx > > Any other ideas? :) curlwp_bind_push / curlwp_bind_pop Joerg

Re: Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-14 Thread Ryota Ozaki
On Tue, Jun 14, 2016 at 10:26 AM, Paul Goyette wrote: > On Tue, 14 Jun 2016, Ryota Ozaki wrote: > >>> Perhaps the name should be `curlwp_bound_restore' or something else to >>> emphasize this, but I haven't come up with one that I like better on >>> aesthetic grounds. >> >> >> - curlwp_bind and cu

Re: Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-13 Thread Paul Goyette
On Tue, 14 Jun 2016, Ryota Ozaki wrote: Perhaps the name should be `curlwp_bound_restore' or something else to emphasize this, but I haven't come up with one that I like better on aesthetic grounds. - curlwp_bind and curlwp_unbind - curlwp_bound_set and curlwp_bound_restore - curlwp_bound and

Re: Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-13 Thread Ryota Ozaki
On Mon, Jun 13, 2016 at 11:21 PM, Taylor R Campbell wrote: >Date: Mon, 13 Jun 2016 14:00:16 +0200 >From: Joerg Sonnenberger > >On Mon, Jun 13, 2016 at 07:36:31PM +0900, Ryota Ozaki wrote: >> Currently we do it by open-coding in each place, >> but we should provide some API to

Re: Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-13 Thread Taylor R Campbell
Date: Mon, 13 Jun 2016 14:00:16 +0200 From: Joerg Sonnenberger On Mon, Jun 13, 2016 at 07:36:31PM +0900, Ryota Ozaki wrote: > Currently we do it by open-coding in each place, > but we should provide some API to simplify codes. > riastradh@ suggested curlwp_bind and curlwp_unbind

Re: Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-13 Thread Joerg Sonnenberger
On Mon, Jun 13, 2016 at 07:36:31PM +0900, Ryota Ozaki wrote: > Currently we do it by open-coding in each place, > but we should provide some API to simplify codes. > riastradh@ suggested curlwp_bind and curlwp_unbind > some time ago (*1) and this patch (*2) just follows > the idea. The primary que

Introduce curlwp_bind and curlwp_unbind for psref(9)

2016-06-13 Thread Ryota Ozaki
Hi, In order to use psref(9) in a normal LWP context, we have to ensure the LWP doesn't migrate between CPUs. To this end, for now we set LP_BOUND to curlwp->l_pflag. Currently we do it by open-coding in each place, but we should provide some API to simplify codes. riastradh@ suggested curlwp_bin