Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp226906imi; Thu, 21 Jul 2022 20:15:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tGDe3M/Nl+RdMSf9ReOqQx3weolqzyEBnU7WgeXNrBcjLzkAAvG8F+9tyZ/5kwZopgnLcV X-Received: by 2002:a05:6a00:993:b0:52a:dd93:f02d with SMTP id u19-20020a056a00099300b0052add93f02dmr1357509pfg.12.1658459740602; Thu, 21 Jul 2022 20:15:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658459740; cv=none; d=google.com; s=arc-20160816; b=yRGEnKwIYbHbu6thmwlE/NhXVMnmiKK7n5mF6uRbpMd16iF7Hbn7SOi4gZqYi1KNHM Si67AZneBjDWRKRXjmFoo93WH6yO8oI0A3EyQF7yz4KgAePlv0o1EKmr0TOjSaY6ob/b LxhQgpi5oFK2dFWZu3VemipbbRwRwyhVHNcn6lAOqaszpRxOdbq5USycS63gZSF8sXUL LfSBOIexu7MnV1psH5UTyfudP44nOFdpIOBSkEJ4eFdrFHs6FIuhsFY5yXwCWVsSpQZ0 q600U6qlPq3fKSj3rxcWMV7wGGE//n2V4147w7dCYqM5AW7jfZD2r/KuxJgKWUkD/DJ1 q6Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=X3JUquQkNkSPbvKH2CV+c6VwAlfeMB9iDzEC9JFuT2I=; b=zshzqp72Y/bTrbP0LmC7elVRLA6ZyE8lRKAE1EkpJqBKgp/Z5VGmSOaiqiY3f4Z3p7 mnzlYuXjyjKYZHREEoVNiyyryLD/tDKDLGwdK6KL2H7LxxZaVHOKU5Y1dROMB1Wc0Bj0 3OUDJgOoWiUPeqhSw65aupxEHtELJWfwqlUARogjg5bd6gcW1G2XcCSwoj3JaePutwwo F4b9+/nc1SvuhW7acfsft+WTPKb4RWyCq5iOQ9vesh2RMcf6nsiOvD0Ryo2KHNmaJDaM vx+rU/26Q5oNo/u/wDCIkagn1s/3dZL1jCz2Iw5fYAbsRkekz2IGocG09H/6Yox91z7Y Umxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ip12-20020a17090b314c00b001f0c58b7ecdsi8323914pjb.84.2022.07.21.20.15.25; Thu, 21 Jul 2022 20:15:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233866AbiGVCb5 (ORCPT + 99 others); Thu, 21 Jul 2022 22:31:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229540AbiGVCbz (ORCPT ); Thu, 21 Jul 2022 22:31:55 -0400 Received: from ZXSHCAS2.zhaoxin.com (ZXSHCAS2.zhaoxin.com [210.0.225.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 061A25B781; Thu, 21 Jul 2022 19:31:53 -0700 (PDT) Received: from zxbjmbx1.zhaoxin.com (10.29.252.163) by ZXSHCAS2.zhaoxin.com (10.28.252.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Fri, 22 Jul 2022 10:31:26 +0800 Received: from [10.29.8.21] (10.29.8.21) by zxbjmbx1.zhaoxin.com (10.29.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Fri, 22 Jul 2022 10:31:25 +0800 Message-ID: Date: Fri, 22 Jul 2022 10:31:24 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] USB: HCD: Fix URB giveback issue in tasklet function Content-Language: en-US To: Alan Stern CC: , , , , , , , , , , , References: <20220721060833.4173-1-WeitaoWang-oc@zhaoxin.com> From: "WeitaoWang-oc@zhaoxin.com" In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.29.8.21] X-ClientProxiedBy: ZXSHCAS1.zhaoxin.com (10.28.252.161) To zxbjmbx1.zhaoxin.com (10.29.252.163) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/7/21 21:50, Alan Stern wrote: > On Thu, Jul 21, 2022 at 02:08:33PM +0800, Weitao Wang wrote: >> Usb core introduce the mechanism of giveback of URB in tasklet context to >> reduce hardware interrupt handling time. On some test situation(such as >> FIO with 4KB block size), when tasklet callback function called to >> giveback URB, interrupt handler add URB node to the bh->head list also. >> If check bh->head list again after finish all URB giveback of local_list, >> then it may introduce a "dynamic balance" between giveback URB and add URB >> to bh->head list. This tasklet callback function may not exit for a long >> time, which will cause other tasklet function calls to be delayed. Some >> real-time applications(such as KB and Mouse) will see noticeable lag. >> >> Fix this issue by taking new URBs giveback in next tasklet function call. > > The patch also replaces the local high_prio_bh variable with a new > bh->high_prio structure member. This should be mentioned in the patch > description. > > Alan Stern > . Okay,I will take your suggestion and submit a revised version. Thanks weitao