From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2698DC433ED for ; Fri, 23 Apr 2021 15:03:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D604C61176 for ; Fri, 23 Apr 2021 15:03:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242995AbhDWPE0 (ORCPT ); Fri, 23 Apr 2021 11:04:26 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:2913 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243318AbhDWPEP (ORCPT ); Fri, 23 Apr 2021 11:04:15 -0400 Received: from fraeml705-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4FRcq22VPyz70gkc; Fri, 23 Apr 2021 22:58:06 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml705-chm.china.huawei.com (10.206.15.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 23 Apr 2021 17:03:36 +0200 Received: from [10.47.95.78] (10.47.95.78) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 23 Apr 2021 16:03:35 +0100 Subject: Re: Question on threaded handlers for managed interrupts To: Thomas Gleixner CC: "linux-kernel@vger.kernel.org" , "Marc Zyngier" , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , "Ingo Molnar" References: <874kfxw9zv.ffs@nanos.tec.linutronix.de> <871rb1w3x8.ffs@nanos.tec.linutronix.de> From: John Garry Message-ID: Date: Fri, 23 Apr 2021 16:00:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.1.2 MIME-Version: 1.0 In-Reply-To: <871rb1w3x8.ffs@nanos.tec.linutronix.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.95.78] X-ClientProxiedBy: lhreml748-chm.china.huawei.com (10.201.108.198) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, On 23/04/2021 14:01, Thomas Gleixner wrote: > On Fri, Apr 23 2021 at 12:50, Thomas Gleixner wrote: >> On Thu, Apr 22 2021 at 17:10, John Garry wrote: >> OTOH, the way how you splitted the handling into hard/thread context >> provides already the base for this. >> >> The missing piece is infrastructure at the irq/scheduler core level to >> handle this transparently. >> >> I have some horrible ideas how to solve that, but I'm sure the scheduler >> wizards can come up with a reasonable and generic solution. > So one thing I forgot to ask is: > > Is the thread simply stuck in the while() loop forever or is > this just an endless hardirq/thread/hardirq/thread stream? The thread will process all available completions and then return. I added some debug there, and at most we handle maybe max 150-300 completions per thread run. So I figure that we have the endless hardirq/thread/hardirq/thread stream. Thanks, John