From owner-svn-src-head@FreeBSD.ORG Wed Aug 11 11:21:48 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AF9D106566B; Wed, 11 Aug 2010 11:21:48 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7D6DC8FC12; Wed, 11 Aug 2010 11:21:47 +0000 (UTC) Received: by qwg5 with SMTP id 5so8708438qwg.13 for ; Wed, 11 Aug 2010 04:21:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=0gTY7Djr6hgMfgYZ87yx/VB9PD7gZRou+KriceR/Meg=; b=vchclsqy1sdm+W0/9/D8XZj7eMqED4On5leZJc4g3tNPLC2ULx77jKPEKgnv/JxxVm NFzFJbqbORm5FdyygSzdszc9oCT9K/mY6xToqs4C9QNnbYn4bc9QAA87wSHjj4cCan/c NgwawsEUZucIlTRi7jVE57ueiHDkiYWDFGixA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=uxh4uaNGHJY01Zl/rBCBXgrqdJ+hTlA0NnVOtaZVhn4gLPKsaf9rwM/uUbHmmYmu25 b/JnxCdyeQBtDQyMS0HCUgCjE3PN5vGBwTb6tOrYchdUBXWWCSPnjzKBty1GcvD/nXgQ A9mg0dLq3fUgu5hTy4rQv4DwP2nHnKGvVpLTo= MIME-Version: 1.0 Received: by 10.224.20.2 with SMTP id d2mr10638084qab.101.1281525706501; Wed, 11 Aug 2010 04:21:46 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.229.251.6 with HTTP; Wed, 11 Aug 2010 04:21:46 -0700 (PDT) In-Reply-To: <20100811105739.GJ2396@deviant.kiev.zoral.com.ua> References: <201008111051.o7BApRp4028538@svn.freebsd.org> <20100811105739.GJ2396@deviant.kiev.zoral.com.ua> Date: Wed, 11 Aug 2010 13:21:46 +0200 X-Google-Sender-Auth: 5CfGvfgRCupdU_5N1lRa4_I2-CI Message-ID: From: Attilio Rao To: Kostik Belousov Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r211176 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Aug 2010 11:21:48 -0000 2010/8/11 Kostik Belousov : > On Wed, Aug 11, 2010 at 10:51:27AM +0000, Attilio Rao wrote: >> Author: attilio >> Date: Wed Aug 11 10:51:27 2010 >> New Revision: 211176 >> URL: http://svn.freebsd.org/changeset/base/211176 >> >> Log: >> =C2=A0 IPI handlers may run generally with interrupts disabled because t= hey >> =C2=A0 are served via an interrupt gate. >> >> =C2=A0 However, that doesn't explicitly prevent preemption and thread >> =C2=A0 migration thus scheduler pinning may be necessary in some handler= s. >> =C2=A0 Fix that. > > How the preemption is supposed to happen ? Aside from the explicit > calls to mi_switch() from e.g. critical_exit(). IIRC it should be hardclock() willing to schedule the softclock(). It is the critical_exit() in the thread_unlock() that may trigger it (sorry for not digging more, it was a while back that I hacked this part, but I guess you can verify on your own). We already have other points within the kernel that take care of dealing with preemption/migration like lapic_handle_timer(), for example. Thanks, Attilio --=20 Peace can only be achieved by understanding - A. Einstein