Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754032AbbDWG6j (ORCPT ); Thu, 23 Apr 2015 02:58:39 -0400 Received: from mail-wi0-f170.google.com ([209.85.212.170]:35632 "EHLO mail-wi0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751078AbbDWG6h (ORCPT ); Thu, 23 Apr 2015 02:58:37 -0400 Message-ID: <1429772313.3419.38.camel@gmail.com> Subject: Re: [PATCH RT 3.18] irq_work: Provide a soft-irq based queue From: Mike Galbraith To: Jan Kiszka Cc: Steven Rostedt , Sebastian Andrzej Siewior , RT , Linux Kernel Mailing List Date: Thu, 23 Apr 2015 08:58:33 +0200 In-Reply-To: <5538915C.8010904@siemens.com> References: <552FC1FE.4020406@siemens.com> <552FC6B1.1040000@linutronix.de> <552FC72A.8060709@siemens.com> <20150416111041.66043164@gandalf.local.home> <552FD55F.8000105@siemens.com> <552FE320.6050601@siemens.com> <1429517036.3226.9.camel@gmail.com> <1429769505.3419.9.camel@gmail.com> <5538915C.8010904@siemens.com> Content-Type: multipart/mixed; boundary="=-EJc7KCFdSyQOllPCvxaW" X-Mailer: Evolution 3.16.0 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 8413 Lines: 134 --=-EJc7KCFdSyQOllPCvxaW Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Thu, 2015-04-23 at 08:29 +0200, Jan Kiszka wrote: > > > void irq_work_tick(void) > > { > > -#ifdef CONFIG_PREEMPT_RT_FULL > > - irq_work_run_list(this_cpu_ptr(&lazy_list)); > > -#else > > - struct llist_head *raised = &__get_cpu_var(raised_list); > > + struct llist_head *raised = this_cpu_ptr(&raised_list); > > > > - if (!llist_empty(raised) && !arch_irq_work_has_interrupt()) > > + if (!llist_empty(raised) && > > (!arch_irq_work_has_interrupt() || > > + IS_ENABLED(CONFIG_PREEMPT_RT_FULL))) > > OK, that additional condition is addressing archs that don't have > irq_work support and fall back to the timer, right? How will ever run if it is not run in either irq_work_run() or irq_work_tick()? There are two choices, we better pick one. Attaching patch since either evolution fscked up again (it does that), or someone has managed to turn it into a completely useless piece of crap... if so, likely the same dipstick who made it save messages such that you need fromdos to wipe away the shite it smears all over it. -Mike --=-EJc7KCFdSyQOllPCvxaW Content-Disposition: attachment; filename="irq_work-Provide-a-soft-irq-based-queue.patch" Content-Type: text/x-patch; name="irq_work-Provide-a-soft-irq-based-queue.patch"; charset="UTF-8" Content-Transfer-Encoding: base64 U3ViamVjdDogW1BBVENIIFJUIDMuMThdIGlycV93b3JrOiBQcm92aWRlIGEgc29mdC1pcnEgYmFz ZWQgcXVldWUKRGF0ZToJVGh1LCAxNiBBcHIgMjAxNSAxODoyODoxNiArMDIwMApGcm9tOglKYW4g S2lzemthIDxqYW4ua2lzemthQHNpZW1lbnMuY29tPgoKSW5zdGVhZCBvZiB0dXJuaW5nIGFsbCBp cnFfd29yayByZXF1ZXN0cyBpbnRvIGxhenkgb25lcyBvbiAtcnQsIGp1c3QKbW92ZSB0aGVpciBl eGVjdXRpb24gZnJvbSBoYXJkIGludG8gc29mdC1pcnEgY29udGV4dC4KClRoaXMgcmVzb2x2ZXMg ZGVhZGxvY2tzIG9mIGZ0cmFjZSB3aGljaCB3aWxsIHF1ZXVlIHdvcmsgZnJvbSBhcmJpdHJhcnkK Y29udGV4dHMsIGluY2x1ZGluZyB0aG9zZSB0aGF0IGhhdmUgbG9ja3MgaGVsZCB0aGF0IGFyZSBu ZWVkZWQgZm9yCnJhaXNpbmcgYSBzb2Z0LWlycS4KClNpZ25lZC1vZmYtYnk6IEphbiBLaXN6a2Eg PGphbi5raXN6a2FAc2llbWVucy5jb20+Ci0tLQoKU2Vjb25kIHRyeSwgbG9va3MgbXVjaCBiZXR0 ZXIgc28gZmFyLiBBbmQgaXQgYWxzbyByZW1vdmVzIG15IGNvbmNlcm5zCnJlZ2FyZGluZyBvdGhl ciBwb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B1X3B0cigmcmFpc2VkX2xpc3QpOwogCi0JaWYgKCFsbGlzdF9lbXB0eShyYWlzZWQpICYmICFh cmNoX2lycV93b3JrX2hhc19pbnRlcnJ1cHQoKSkKKwlpZiAoIWxsaXN0X2VtcHR5KHJhaXNlZCkg JiYgKCFhcmNoX2lycV93b3JrX2hhc19pbnRlcnJ1cHQoKSB8fAorCSAgICBJU19FTkFCTEVEKENP TkZJR19QUkVFTVBUX1JUX0ZVTEwpKSkKIAkJaXJxX3dvcmtfcnVuX2xpc3QocmFpc2VkKTsKLQlp cnFfd29ya19ydW5fbGlzdCgmX19nZXRfY3B1X3ZhcihsYXp5X2xpc3QpKTsKLSNlbmRpZgorCWly cV93b3JrX3J1bl9saXN0KHRoaXNfY3B1X3B0cigmbGF6eV9saXN0KSk7CiB9CiAKIC8qCg== --=-EJc7KCFdSyQOllPCvxaW-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/