Re: [systemd-devel] [PATCH 2/2] domain: grab the domain's parent lock only when needed

2014-03-22 Thread Djalal Harouni
On Sat, Mar 22, 2014 at 08:28:38PM +0100, Kay Sievers wrote: > On Sat, Mar 22, 2014 at 7:56 PM, Djalal Harouni wrote: > > On Sat, Mar 22, 2014 at 07:37:38PM +0100, Kay Sievers wrote: > >> On Sat, Mar 22, 2014 at 3:43 PM, Daniel Mack wrote: > >> >> Also it seems that now there is only support for

Re: [systemd-devel] [PATCH 2/2] domain: grab the domain's parent lock only when needed

2014-03-22 Thread Kay Sievers
On Sat, Mar 22, 2014 at 7:56 PM, Djalal Harouni wrote: > On Sat, Mar 22, 2014 at 07:37:38PM +0100, Kay Sievers wrote: >> On Sat, Mar 22, 2014 at 3:43 PM, Daniel Mack wrote: >> >> Also it seems that now there is only support for one level of nested >> >> domains? will this be increased? >> > >> >

Re: [systemd-devel] [PATCH 2/2] domain: grab the domain's parent lock only when needed

2014-03-22 Thread Djalal Harouni
On Sat, Mar 22, 2014 at 07:37:38PM +0100, Kay Sievers wrote: > On Sat, Mar 22, 2014 at 3:43 PM, Daniel Mack wrote: > >> Also it seems that now there is only support for one level of nested > >> domains? will this be increased? > > > > I don't think so. What's your use case here? > > We never trie

Re: [systemd-devel] [PATCH 2/2] domain: grab the domain's parent lock only when needed

2014-03-22 Thread Kay Sievers
On Sat, Mar 22, 2014 at 3:43 PM, Daniel Mack wrote: > On 03/21/2014 12:35 PM, Djalal Harouni wrote: >> I've two questions: >> >> 1) Can we improve it in ordre to reduce the lock hold time ? > > We don't consider that a very frequent operation, so we never thought > about optimizing this code path.

Re: [systemd-devel] [PATCH 2/2] domain: grab the domain's parent lock only when needed

2014-03-22 Thread Kay Sievers
On Fri, Mar 21, 2014 at 12:35 PM, Djalal Harouni wrote: > On Thu, Mar 20, 2014 at 10:58:21AM +0100, Daniel Mack wrote: >> > /* link into parent domain */ >> > if (parent) { >> >> What if 'parent' was already unrefed at this point? That can happen any >> time as soon we give up the lock. >

Re: [systemd-devel] [PATCH 2/2] domain: grab the domain's parent lock only when needed

2014-03-22 Thread Daniel Mack
On 03/21/2014 12:35 PM, Djalal Harouni wrote: > I've two questions: > > 1) Can we improve it in ordre to reduce the lock hold time ? We don't consider that a very frequent operation, so we never thought about optimizing this code path. What use case do you have in mind so that performance would m

Re: [systemd-devel] [PATCH 2/2] domain: grab the domain's parent lock only when needed

2014-03-21 Thread Djalal Harouni
On Thu, Mar 20, 2014 at 10:58:21AM +0100, Daniel Mack wrote: > On 03/19/2014 09:24 PM, Djalal Harouni wrote: > > Signed-off-by: Djalal Harouni > > --- > > domain.c | 13 + > > 1 file changed, 5 insertions(+), 8 deletions(-) > > > > diff --git a/domain.c b/domain.c > > index d27cad2..

Re: [systemd-devel] [PATCH 2/2] domain: grab the domain's parent lock only when needed

2014-03-20 Thread Daniel Mack
On 03/19/2014 09:24 PM, Djalal Harouni wrote: > Signed-off-by: Djalal Harouni > --- > domain.c | 13 + > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/domain.c b/domain.c > index d27cad2..554b4fe 100644 > --- a/domain.c > +++ b/domain.c > @@ -183,12 +183,13 @@ stru

[systemd-devel] [PATCH 2/2] domain: grab the domain's parent lock only when needed

2014-03-19 Thread Djalal Harouni
Signed-off-by: Djalal Harouni --- domain.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/domain.c b/domain.c index d27cad2..554b4fe 100644 --- a/domain.c +++ b/domain.c @@ -183,12 +183,13 @@ struct kdbus_domain *kdbus_domain_unref(struct kdbus_domain *domain)