From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 12 07:50:13 2015 Return-Path: Delivered-To: freebsd-hackers@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A0DB67C for ; Fri, 12 Jun 2015 07:50:13 +0000 (UTC) (envelope-from stefan.andritoiu@gmail.com) Received: from mail-ob0-x234.google.com (mail-ob0-x234.google.com [IPv6:2607:f8b0:4003:c01::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D75471A8C for ; Fri, 12 Jun 2015 07:50:12 +0000 (UTC) (envelope-from stefan.andritoiu@gmail.com) Received: by obbsn1 with SMTP id sn1so18423941obb.1 for ; Fri, 12 Jun 2015 00:50:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=UFnGnixUEBqVQryd3v5YCLimJw4K9CFbJmau5WSH2wA=; b=dtBH6nP5tL325SrDmMGIRKTyMMLzkcdK2QP1I81cId9iG8ALZesPMrDcoEQ15fmnyg tg+gWTWUcEQb05H+7lu7zxJWLacFF1dyrPZNGQNrSuiFe68oonl+wYH/WUC9eTaVzKmu 0H2QH3POL01AoTSodB0j0/ifGo0xgcitTiAvUS7VMO6BY/ou8CZ69fXEDlmW5/61VBbv QfnecbQU3crd37pClMMMy4nc3SKh81KJTyxpm/Y3boQb5WbEbg6jO3a8q/0uQNIsiNXt We30LEJLCgSW6NR15HAfxUQIsr2lgbs0f4UeqzbqgTYCecUuzM6cMYDFGEKWM5v2j1Re vz9w== MIME-Version: 1.0 X-Received: by 10.202.129.70 with SMTP id c67mr10631797oid.42.1434095411906; Fri, 12 Jun 2015 00:50:11 -0700 (PDT) Received: by 10.60.82.168 with HTTP; Fri, 12 Jun 2015 00:50:11 -0700 (PDT) Date: Fri, 12 Jun 2015 10:50:11 +0300 Message-ID: Subject: Are the sched_choose() or tdq_choose() functions called after returning from an interrupt? From: Stefan Andritoiu To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Fri, 12 Jun 2015 11:19:45 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 07:50:13 -0000 Hello, When returning from an interrupt, does it switch directly the thread that was interrupted? Or is the scheduler called to choose a thread to run (most probable the thread that was interrupted)? More specifically, are the sched_choose() or tdq_choose() functions called after returning from an IPI? Does an interrupt have it's own thread, or does it run in the context of the interrupted thread as in Linux? Thank you, Stefan