From owner-svn-src-user@FreeBSD.ORG Thu May 26 16:36:16 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BBFB106567A; Thu, 26 May 2011 16:36:16 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id C7AF48FC12; Thu, 26 May 2011 16:36:15 +0000 (UTC) Received: by gxk28 with SMTP id 28so464290gxk.13 for ; Thu, 26 May 2011 09:36:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=jNEbaKvQfuHH5sG1cvW9B5NDK1Zid4Pj5gCoeuxMqwg=; b=xAFpKi1OGMcFdvYmlt0A7vq/tqk4H/cKy5uk7NNb/pym1wHTkS0BnR10QTaFf7txtT MkTNudKTKQQRCvBIEHxtvWg5/3LLr7OOAznCXfMa2yGUc0L8LGTqPwx0yyK9XtaHpEsz oLafpc5SA2LYqz7lPppIm5gjFcaRHHml4qIYQ= 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=scfpGk9ZXI3FIGa45FH9YfA5mvKXd3lskYO58QvnxlLScIsRtoFBE7tqQux1asvIme nQgJDJm19l9NdDwgL9XR9xbbtPBSzv0OIeDECc5kPn5n+yZs7EOY7PuK6vmP/ImH/3JS hMQ5SoyBG4zuTA7NfSeROut5QUbaVO/Zj8kbQ= MIME-Version: 1.0 Received: by 10.236.186.38 with SMTP id v26mr1376500yhm.415.1306427773531; Thu, 26 May 2011 09:36:13 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.236.103.136 with HTTP; Thu, 26 May 2011 09:36:13 -0700 (PDT) In-Reply-To: References: <201105181508.p4IF8UoS096841@svn.freebsd.org> <20110518182441.GB2273@garage.freebsd.pl> <4DD4243C.4070301@FreeBSD.org> <4DDD13F9.5040800@FreeBSD.org> <4DDE7555.7090500@FreeBSD.org> <4DDE7A36.2050104@FreeBSD.org> Date: Thu, 26 May 2011 12:36:13 -0400 X-Google-Sender-Auth: ic8IO-PZowuW33McfGkUX5gMNEY Message-ID: From: Attilio Rao To: mdf@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: src-committers@freebsd.org, Pawel Jakub Dawidek , Andriy Gapon , svn-src-user@freebsd.org Subject: Re: svn commit: r222060 - in user/avg/xcpu/sys: kern sys X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2011 16:36:16 -0000 2011/5/26 : > On Thu, May 26, 2011 at 9:05 AM, Andriy Gapon wrote: >> on 26/05/2011 18:46 mdf@FreeBSD.org said the following: >>> A per-thread flag is needed as long as other CPUs can be running or >>> even just the scheduler on the remaining CPU. =C2=A0So I would thing th= at >>> flag needs to be checked until the system has been massaged to the >>> state you describe above. >> >> I am not sure that I understand your reasoning if you mean that the flag= needs to >> be checked in TD_IS_INPANIC. =C2=A0That is, right now there is no TD_IS_= INPANIC and >> things work after panic to a certain degree. =C2=A0I do not intend to im= prove that >> degree and just want to keep an option to revert to the current state of= matters. >> When TD_IS_INPANIC is introduced and stop_cpus_on_panic=3D=3D1, then the= re will be >> only one thread left running after panic, that will be the thread that c= alled >> panic, checking TDF_INPANIC just doesn't add anything. > > Won't the scheduler still run even if other CPUs are halted? =C2=A0Is the= re > any intent to prevent switching to another thread? =C2=A0(I suppose this > could be achieved by setting td_critnest++ and wouldn't require a > flag). > I think it is much better to disable interrupts, in order to prevent fast handlers "preemption" rather than just avoiding to be rescheduled. Attilio --=20 Peace can only be achieved by understanding - A. Einstein