netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net : fix for dst_gc_task not getting scheduled if __dst_free() is called consistently
@ 2012-05-19  9:39 rajan.gupta
  0 siblings, 0 replies; 6+ messages in thread
From: rajan.gupta @ 2012-05-19  9:39 UTC (permalink / raw)
  To: netdev@vger.kernel.org.kuznet; +Cc: Rajan Gupta

From: Rajan Gupta <rajan.gupta@freescale.com>

dst_gc_work is cancelled and again rescheduled in __ds_free(). In case
__dsf_free() is consistently called dst_gc_work will never get called resulting in
memory not getting freed at all until one stops calling __dst_free
Signed-off-by: Rajan Gupta <rajan.gupta@freescale.com>
---
 net/core/dst.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/net/core/dst.c b/net/core/dst.c
index 8246d47..6820206 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -215,7 +215,6 @@ void __dst_free(struct dst_entry *dst)
 	if (dst_garbage.timer_inc > DST_GC_INC) {
 		dst_garbage.timer_inc = DST_GC_INC;
 		dst_garbage.timer_expires = DST_GC_MIN;
-		cancel_delayed_work(&dst_gc_work);
 		schedule_delayed_work(&dst_gc_work, dst_garbage.timer_expires);
 	}
 	spin_unlock_bh(&dst_garbage.lock);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] net : fix for dst_gc_task not getting scheduled if __dst_free() is called consistently
  2012-05-19 10:04 ` Eric Dumazet
  2012-05-19 14:48   ` Gupta Rajan-B15745
@ 2012-05-19 18:36   ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2012-05-19 18:36 UTC (permalink / raw)
  To: eric.dumazet; +Cc: b15745, netdev

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 19 May 2012 12:04:23 +0200

> On Sat, 2012-05-19 at 04:44 -0500, b15745@freescale.com wrote:
>> From: Rajan Gupta <b15745@freescale.com>
>> 
>> dst_gc_work is cancelled and again rescheduled in __ds_free(). In case
>> __dsf_free() is consistently called dst_gc_work will never get called resulting in
>> memory not getting freed at all until one stops calling __dst_free
>> Signed-off-by: Rajan Gupta <b15745@freescale.com>
>> ---
>>  net/core/dst.c |    1 -
>>  1 file changed, 1 deletion(-)
>> 
>> diff --git a/net/core/dst.c b/net/core/dst.c
>> index 8246d47..6820206 100644
>> --- a/net/core/dst.c
>> +++ b/net/core/dst.c
>> @@ -215,7 +215,6 @@ void __dst_free(struct dst_entry *dst)
>>  	if (dst_garbage.timer_inc > DST_GC_INC) {
>>  		dst_garbage.timer_inc = DST_GC_INC;
>>  		dst_garbage.timer_expires = DST_GC_MIN;
>> -		cancel_delayed_work(&dst_gc_work);
>>  		schedule_delayed_work(&dst_gc_work, dst_garbage.timer_expires);
>>  	}
>>  	spin_unlock_bh(&dst_garbage.lock);
> 
> Strange, I never met this....
> 
> Since "if (dst_garbage.timer_inc > DST_GC_INC)" will be false if
> timer_inc is DST_GC_INC.

I'm not considering this patch at all until we figure out what
the real situation is here.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH] net : fix for dst_gc_task not getting scheduled if __dst_free() is called consistently
  2012-05-19 10:04 ` Eric Dumazet
@ 2012-05-19 14:48   ` Gupta Rajan-B15745
  2012-05-19 18:36   ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: Gupta Rajan-B15745 @ 2012-05-19 14:48 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev

Ignore the patch. Issue is dst_gc_task is not getting
scheduled because of scheduling issue at 100% cpu utilization.

> -----Original Message-----
> From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
> Sent: Saturday, May 19, 2012 3:34 PM
> To: Gupta Rajan-B15745
> Cc: netdev@vger.kernel.org
> Subject: Re: [PATCH] net : fix for dst_gc_task not getting scheduled if
> __dst_free() is called consistently
> 
> On Sat, 2012-05-19 at 04:44 -0500, b15745@freescale.com wrote:
> > From: Rajan Gupta <b15745@freescale.com>
> >
> > dst_gc_work is cancelled and again rescheduled in __ds_free(). In case
> > __dsf_free() is consistently called dst_gc_work will never get called
> > resulting in memory not getting freed at all until one stops calling
> > __dst_free
> > Signed-off-by: Rajan Gupta <b15745@freescale.com>
> > ---
> >  net/core/dst.c |    1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/net/core/dst.c b/net/core/dst.c index 8246d47..6820206
> > 100644
> > --- a/net/core/dst.c
> > +++ b/net/core/dst.c
> > @@ -215,7 +215,6 @@ void __dst_free(struct dst_entry *dst)
> >  	if (dst_garbage.timer_inc > DST_GC_INC) {
> >  		dst_garbage.timer_inc = DST_GC_INC;
> >  		dst_garbage.timer_expires = DST_GC_MIN;
> > -		cancel_delayed_work(&dst_gc_work);
> >  		schedule_delayed_work(&dst_gc_work, dst_garbage.timer_expires);
> >  	}
> >  	spin_unlock_bh(&dst_garbage.lock);
> 
> Strange, I never met this....
> 
> Since "if (dst_garbage.timer_inc > DST_GC_INC)" will be false if timer_inc
> is DST_GC_INC.
> 
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net : fix for dst_gc_task not getting scheduled if __dst_free() is called consistently
  2012-05-19  9:44 b15745
@ 2012-05-19 10:04 ` Eric Dumazet
  2012-05-19 14:48   ` Gupta Rajan-B15745
  2012-05-19 18:36   ` David Miller
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Dumazet @ 2012-05-19 10:04 UTC (permalink / raw)
  To: b15745; +Cc: netdev

On Sat, 2012-05-19 at 04:44 -0500, b15745@freescale.com wrote:
> From: Rajan Gupta <b15745@freescale.com>
> 
> dst_gc_work is cancelled and again rescheduled in __ds_free(). In case
> __dsf_free() is consistently called dst_gc_work will never get called resulting in
> memory not getting freed at all until one stops calling __dst_free
> Signed-off-by: Rajan Gupta <b15745@freescale.com>
> ---
>  net/core/dst.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/net/core/dst.c b/net/core/dst.c
> index 8246d47..6820206 100644
> --- a/net/core/dst.c
> +++ b/net/core/dst.c
> @@ -215,7 +215,6 @@ void __dst_free(struct dst_entry *dst)
>  	if (dst_garbage.timer_inc > DST_GC_INC) {
>  		dst_garbage.timer_inc = DST_GC_INC;
>  		dst_garbage.timer_expires = DST_GC_MIN;
> -		cancel_delayed_work(&dst_gc_work);
>  		schedule_delayed_work(&dst_gc_work, dst_garbage.timer_expires);
>  	}
>  	spin_unlock_bh(&dst_garbage.lock);

Strange, I never met this....

Since "if (dst_garbage.timer_inc > DST_GC_INC)" will be false if
timer_inc is DST_GC_INC.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] net : fix for dst_gc_task not getting scheduled if __dst_free() is called consistently
@ 2012-05-19  9:44 b15745
  2012-05-19 10:04 ` Eric Dumazet
  0 siblings, 1 reply; 6+ messages in thread
From: b15745 @ 2012-05-19  9:44 UTC (permalink / raw)
  To: netdev; +Cc: Rajan Gupta

From: Rajan Gupta <b15745@freescale.com>

dst_gc_work is cancelled and again rescheduled in __ds_free(). In case
__dsf_free() is consistently called dst_gc_work will never get called resulting in
memory not getting freed at all until one stops calling __dst_free
Signed-off-by: Rajan Gupta <b15745@freescale.com>
---
 net/core/dst.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/net/core/dst.c b/net/core/dst.c
index 8246d47..6820206 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -215,7 +215,6 @@ void __dst_free(struct dst_entry *dst)
 	if (dst_garbage.timer_inc > DST_GC_INC) {
 		dst_garbage.timer_inc = DST_GC_INC;
 		dst_garbage.timer_expires = DST_GC_MIN;
-		cancel_delayed_work(&dst_gc_work);
 		schedule_delayed_work(&dst_gc_work, dst_garbage.timer_expires);
 	}
 	spin_unlock_bh(&dst_garbage.lock);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] net : fix for dst_gc_task not getting scheduled if __dst_free() is called consistently
@ 2012-05-19  9:41 rajan.gupta
  0 siblings, 0 replies; 6+ messages in thread
From: rajan.gupta @ 2012-05-19  9:41 UTC (permalink / raw)
  To: netdev, kuznet; +Cc: Rajan Gupta

From: Rajan Gupta <rajan.gupta@freescale.com>

dst_gc_work is cancelled and again rescheduled in __ds_free(). In case
__dsf_free() is consistently called dst_gc_work will never get called resulting in
memory not getting freed at all until one stops calling __dst_free
Signed-off-by: Rajan Gupta <rajan.gupta@freescale.com>
---
 net/core/dst.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/net/core/dst.c b/net/core/dst.c
index 8246d47..6820206 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -215,7 +215,6 @@ void __dst_free(struct dst_entry *dst)
 	if (dst_garbage.timer_inc > DST_GC_INC) {
 		dst_garbage.timer_inc = DST_GC_INC;
 		dst_garbage.timer_expires = DST_GC_MIN;
-		cancel_delayed_work(&dst_gc_work);
 		schedule_delayed_work(&dst_gc_work, dst_garbage.timer_expires);
 	}
 	spin_unlock_bh(&dst_garbage.lock);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-05-19 18:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-19  9:39 [PATCH] net : fix for dst_gc_task not getting scheduled if __dst_free() is called consistently rajan.gupta
2012-05-19  9:41 rajan.gupta
2012-05-19  9:44 b15745
2012-05-19 10:04 ` Eric Dumazet
2012-05-19 14:48   ` Gupta Rajan-B15745
2012-05-19 18:36   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).