From owner-freebsd-current@FreeBSD.ORG Tue Oct 20 23:21:53 2009 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE7E6106566C; Tue, 20 Oct 2009 23:21:53 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com [209.85.219.209]) by mx1.freebsd.org (Postfix) with ESMTP id 0BC7D8FC08; Tue, 20 Oct 2009 23:21:52 +0000 (UTC) Received: by ewy5 with SMTP id 5so2710245ewy.36 for ; Tue, 20 Oct 2009 16:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=9pL7jjlSfeQyajS5cR3a5z5EZGQ2Kb8okinIKS/dzwc=; b=Waa7je5IRluwGHKGsfdnb7zZP7yrl/BtfmXsWQ29WMrWDjBhwEmd+k7q8JQAmYbTfj qZX4cjiLnc3LAD+yHub8bkBwVzCTtZc9ubKEgoBOqDmbilE8EP+jMgeJooemtyUr50Nx gZB9331scw6xqH41T+B3HZSGBTYqCp8d6cQg4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=vRaLqOT6A+9wYMmFmR54sSc6UwAOhPEQdc1gfFTYJGfCNiFmqAg+fYObHQ/5sXakiL TMZmA46bpVZfmTlz3NZwFj/7IPDLDc15GIkXfeydSi997mOt4Ftkt54hpmiiTbWcrvgI NgV8TKxD6i3UsZN3NrClffOckYd5nu+AafWhw= MIME-Version: 1.0 Received: by 10.216.88.139 with SMTP id a11mr192619wef.50.1256080911849; Tue, 20 Oct 2009 16:21:51 -0700 (PDT) Date: Tue, 20 Oct 2009 23:21:51 +0000 Message-ID: From: "b. f." To: qingli@FreeBSD.org, jeff@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current@FreeBSD.org Subject: Re: svn commit: r198306 - head/sys/net X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Oct 2009 23:21:53 -0000 >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.