Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Oct 2009 23:21:51 +0000
From:      "b. f." <bf1783@googlemail.com>
To:        qingli@FreeBSD.org, jeff@FreeBSD.org
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: svn commit: r198306 - head/sys/net
Message-ID:  <d873d5be0910201621h768e126dq34df38c07b83fe47@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
>Author: qingli
>Date: Tue Oct 20 21:27:03 2009
>New Revision: 198306
>URL: http://svn.freebsd.org/changeset/base/198306

>Log:
>  The flow-table function flowtable_route_flush() may be called
>  during system initialization time. Since the flow-table is
>  designed to maintain per CPU flow cache, the existing code
>  did not check whether "smp_started" is true before calling
>  sched_bind() and sched_unbind(), which triggers a page fault.

>  Reviewed by:  jeff
>  MFC after:    immediately

>Modified:
>  head/sys/net/flowtable.c

...

>-
>-                       thread_lock(curthread);
>-                       sched_bind(curthread, i);
>-                       thread_unlock(curthread);
>+
>+                       if (smp_started == 1) {
>+                               thread_lock(curthread);
>+                               sched_bind(curthread, i);
>+                               thread_unlock(curthread);
>+                       }

...

Are these changes going to do the right thing on non-SMP kernels?


Regards,
                  b.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d873d5be0910201621h768e126dq34df38c07b83fe47>