From owner-svn-src-head@freebsd.org Thu Mar 24 14:09:56 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57439ADC6A3; Thu, 24 Mar 2016 14:09:56 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-lf0-x22e.google.com (mail-lf0-x22e.google.com [IPv6:2a00:1450:4010:c07::22e]) (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 E816C1769; Thu, 24 Mar 2016 14:09:55 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: by mail-lf0-x22e.google.com with SMTP id q73so32857550lfe.2; Thu, 24 Mar 2016 07:09:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-transfer-encoding; bh=sswt9InUg1qbzmeIIy7rv8eX7/8hqUXrYU9zDOPki2A=; b=dJRVTRqVMioDsbj7fxpntp8UKL4kLKIM8GWRsJj8g4CZ6K37ajbpDMY7FtylUt0dKV lLNDps3Z+hA3ZT+laPbK/iNomIwxGZywmj84gVu9IEyVkUbqQ2lrkRiXmazYrp6kZnie oR6fvSDubI/Bo2a/dcMN1/etT+QjBsnfUHTzyxjKjwy4T8f9mMfjQ/pQmSeobTQ7Mi++ FNkkrkVkvtliJ7vPeRYKyjCEQ0IH0qhyN/LsKqUHujS95c6qyNVhDztV5fD3wvZvGKI5 N2xI805X72X80uUisSrcbY9PPRmlnb7EhWfxLpEKw+GM/HV4ASYS4m80ldYuY23lgOIh Sktg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-transfer-encoding; bh=sswt9InUg1qbzmeIIy7rv8eX7/8hqUXrYU9zDOPki2A=; b=WKOckZbLP0hzSD8+2CqKwZ2233jY8scHnCP+dYTT1qub0ITSVdbZBTGjUsF2ZM8rkw 7z8AD6HOWvLSYeq3vyCFG1NNbfZbotCUuGwbuZhPPwhNk8IGy7HgVDmak4PEs7Xc3koC nhqKfPODkn7bphN3YZxMzyCh2ZVGzTQPSe8XaJ+8ROMuHDfnUSxxUNzUoHyo34YXWWc+ V9bW9PIY+jQhmLnn2ySm5xFfcj0AQiGxLS8a7aJdqNzeqpjQKmEfVGYSuxgUdhzCADMi APbSoVBTnFkFxWwMb69NfRKB701xvb/40kmUB6UGLdWxYAABacMzTYrOyeNrkf2F88Tz CsAA== X-Gm-Message-State: AD7BkJK67cy2574AgqPBkHMTB5KLWYHZj35GsEJLPEr5y1yPKBiJrbrWaNLWSaoldxsxxg== X-Received: by 10.25.167.144 with SMTP id q138mr3559762lfe.17.1458828593961; Thu, 24 Mar 2016 07:09:53 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([134.249.139.101]) by smtp.googlemail.com with ESMTPSA id s75sm1260223lfs.21.2016.03.24.07.09.52 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 Mar 2016 07:09:53 -0700 (PDT) Message-ID: <56F3F52F.9040705@gmail.com> Date: Thu, 24 Mar 2016 16:09:51 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= , Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r297190 - head/sys/kern References: <201603221346.u2MDk1XH029623@repo.freebsd.org> <1458662141.1091.16.camel@freebsd.org> <56F29654.8030806@dumbbell.fr> <20160323174537.GA1826@brick.home> <56F3B441.6030602@dumbbell.fr> <20160324134222.GA1442@brick.home> In-Reply-To: <20160324134222.GA1442@brick.home> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 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: Thu, 24 Mar 2016 14:09:56 -0000 On 24.03.16 15:42, Edward Tomasz Napierała wrote: > On 0324T1032, Jean-Sébastien Pédron wrote: >> On 23/03/2016 18:45, Edward Tomasz Napierala wrote: >>>> So maybe callouts are disabled in this situation. If there is a way to >>>> detect that, then vt(4) can go back to a "synchronous mode" where it >>>> refreshes the screen after each typed character, like it does when ddb >>>> is active. >>> >>> Looks like that's the case: for some reason the callouts don't work. >>> This trivial hack is a (mostly) working workaround: >>> >>> Index: svn/head/sys/kern/kern_cons.c >>> =================================================================== >>> --- svn/head/sys/kern/kern_cons.c (revision 297210) >>> +++ svn/head/sys/kern/kern_cons.c (working copy) >>> @@ -430,6 +430,7 @@ cngets(char *cp, size_t size, int visible) >>> lp = cp; >>> end = cp + size - 1; >>> for (;;) { >>> + pause("meh", 1); >> >> Could you please explain how this works to me? Does calling pause() here >> give a chance to interrupt handlers or other threads of running? > > It looks like it allows the callout to run. I've did an experiment > and added a simple callout that printed something each second; during > the root mount prompt it doesn't get run unless you type '.', which > calls pause(9). Kernel threads run with absolute priorities, so if somehow this threads happen to have higher or equal priority then callout thread, or the kernel is built without PREEMPTION, then the last may never be executed until this thread get to sleep or at least call sched_yield(). -- Alexander Motin