From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753441AbcG2Rv0 (ORCPT ); Fri, 29 Jul 2016 13:51:26 -0400 Received: from out02.mta.xmission.com ([166.70.13.232]:40167 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753257AbcG2RvY (ORCPT ); Fri, 29 Jul 2016 13:51:24 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: Max Staudt Cc: One Thousand Gnomes , "Theodore Ts'o" , Greg KH , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org References: <1469468175-15704-1-git-send-email-mstaudt@suse.de> <20160725174712.GA5752@kroah.com> <20160726150856.GA15676@kroah.com> <20160727130923.4c20524b@lxorguk.ukuu.org.uk> <2b140616-c210-e754-a854-cd6a5675277d@suse.de> <20160727133348.GB20032@thunk.org> <87mvl1hahu.fsf@x220.int.ebiederm.org> <20160729102335.2dbe3cad@lxorguk.ukuu.org.uk> <8e37ca98-23a5-9eb7-1317-760bbebcd8bb@suse.de> Date: Fri, 29 Jul 2016 12:38:09 -0500 In-Reply-To: <8e37ca98-23a5-9eb7-1317-760bbebcd8bb@suse.de> (Max Staudt's message of "Fri, 29 Jul 2016 11:58:50 +0200") Message-ID: <871t2cgxa6.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1bTBwG-0001HB-QU;;;mid=<871t2cgxa6.fsf@x220.int.ebiederm.org>;;;hst=in02.mta.xmission.com;;;ip=67.3.204.119;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX19n2ayEvgJOYXXQOiruqY8LwYyfg7hM3II= X-SA-Exim-Connect-IP: 67.3.204.119 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.5000] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] * 0.1 XMSolicitRefs_0 Weightloss drug * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Max Staudt X-Spam-Relay-Country: X-Spam-Timing: total 635 ms - load_scoreonly_sql: 0.05 (0.0%), signal_user_changed: 4.2 (0.7%), b_tie_ro: 3.2 (0.5%), parse: 0.82 (0.1%), extract_message_metadata: 12 (1.9%), get_uri_detail_list: 1.52 (0.2%), tests_pri_-1000: 5 (0.8%), tests_pri_-950: 1.21 (0.2%), tests_pri_-900: 1.03 (0.2%), tests_pri_-400: 24 (3.8%), check_bayes: 23 (3.6%), b_tokenize: 6 (0.9%), b_tok_get_all: 8 (1.2%), b_comp_prob: 2.4 (0.4%), b_tok_touch_all: 4.8 (0.8%), b_finish: 0.78 (0.1%), tests_pri_0: 301 (47.4%), check_dkim_signature: 0.55 (0.1%), check_dkim_adsp: 3.3 (0.5%), tests_pri_500: 282 (44.4%), poll_dns_idle: 275 (43.3%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH] 8250: option 'force_polling' for buggy IRQs X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Max Staudt writes: > On 07/29/2016 11:23 AM, One Thousand Gnomes wrote: >>> Serial consoles are already polled for output. So nothing should >>> care until userspace starts, and the full serial driver initializes. >> >> At which point it hangs > > Yep, because the IRQ is never firing. It isn't screaming at all. :) > > >>> So I suspect either "irqfixup" or "irqpoll" would handle this for you. >>> If not I am certain a small tweak to some of that code would work. >> >> irqfixup won't usually help but irqpoll with HZ=1000 ought to, although >> it has its own set of problems because not all devices with non shared >> IRQ lines take kindly to irqpoll. It might make sense to filter non-shared edge triggered interrupts out of irqpoll for that reason. Anything that supports a level triggered interrupt should be fine. > Hmm, the kernel is compiled as tickless. I tried booting with > "irqpoll nohz=off" but that didn't help. > > > What I could try is to build an option like "irqfire=4,1000" which would > simulate an IRQ on line 4 at 1000 HZ and call the handler every time. > Whether the handling driver likes it is a different question though. > > It sounds like "irqpoll" would do something similar, but based on the > kernel's global HZ setting, and calling all handlers unconditionally. > "irqfire" would be more specific. > > What do you think? > Would this be useful for other broken systems, too? I think so. I think I would go simpler and start a simple recurring timer in the irqpoll case. All that is really important is that it is generally reliable and it isn't too hard to make work. Which makes me worry a little bit about your irqfire example (aka someone has to figure out which irq is not firing), which might be hard if you can't log in. But shrug. You are writing the patch. I am just pointing out where we have similar work arounds already and where another workaround to cover your case (and to help others) would likely be appreciated in the kernel. Eric