[ovs-dev] [PATCH] datapath: Add loop detection for RT kernels.

Ben Pfaff blp at nicira.com
Mon Oct 25 20:36:27 UTC 2010


On Mon, Oct 25, 2010 at 01:15:22PM -0700, Jesse Gross wrote:
> Our normal loop detection requires disabling preemption while
> packet processing takes place.  On RT kernels this isn't acceptable
> and interacts badly with spinlocks, so we can't use it.  This
> takes advantage of some extra space that is added to struct
> task_struct on RT kernels (and the knowledge that we will always
> have a valid task_struct) to store the loop counter for a given
> thread.  Since we can't make these assumptions on non-RT kernels,
> we continue to use the previous method of loop detection there.

It's not pretty, but it's better.

I did not read the RT kernel patch to find out whether it is careful not
to change bits other than the ones that are defined.  I hope that it is,
but...

Acked-by: Ben Pfaff <blp at nicira.com>




More information about the dev mailing list