lkml.org 
[lkml]   [2005]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC,PATCH 3/4] Change synchronize_kernel to _rcu and _sched
Paul E. McKenney <paulmck@us.ibm.com> :
> This patch changes calls to synchronize_kernel(), deprecated in the
> earlier "Deprecate synchronize_kernel, GPL replacement" patch to
> instead call the new synchronize_rcu() and synchronize_sched() APIs.
[...]
> diff -urpN -X dontdiff linux-2.6.12-rc1/drivers/net/r8169.c linux-2.6.12-rc1-bettersk/drivers/net/r8169.c
> --- linux-2.6.12-rc1/drivers/net/r8169.c Thu Mar 31 09:53:08 2005
> +++ linux-2.6.12-rc1-bettersk/drivers/net/r8169.c Fri Apr 1 21:41:38 2005
> @@ -2385,7 +2385,7 @@ core_down:
> }
>
> /* Give a racing hard_start_xmit a few cycles to complete. */
> - synchronize_kernel();
> + synchronize_sched(); /* FIXME: should this be synchronize_irq()? */
>
> /*
> * And now for the 50k$ question: are IRQ disabled or not ?

(answering the FIXME)

The race with the irq is handled somewhere else. As the comment suggests,
this part is racing with the hard_start_xmit() handler. If I read correctly
net/core/dev.c::dev_queue_xmit, the code above simply needs the new
synchronize_rcu().

--
Ueimor
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-08 01:37    [W:0.491 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site