Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5626734iog; Thu, 23 Jun 2022 01:57:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tIlB3pGYTZc9Yk/Rk3o8LfuIKsJ3BybY8ECfumSJBLt923GBSySoVmQ5oO3CwIXvMxHJAg X-Received: by 2002:a17:90b:1d09:b0:1ec:bb51:9396 with SMTP id on9-20020a17090b1d0900b001ecbb519396mr2989492pjb.192.1655974643712; Thu, 23 Jun 2022 01:57:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655974643; cv=none; d=google.com; s=arc-20160816; b=qlxrUicpF6DdKWTl7wzw+v8XgtUSgMrCKOy4xj4l4b7vJDdSlCIOOr0/Qi9Ltvqydw ELy0XI+GJLa6XvVuiYXeFJyLkc0xv/MV6FyPNC6ehBYxC6osQYd19vAwIA4Lxb0vTq5K beklgvVAeGctl8IAo/vRMWnwv+DyanwEoSdtYdsCH2ycH/G0dx4vfalObHsOnECBZMQe a+aoFigDD/9B4FKMuzMu1gdTNYWaNTkrax+OYd4Yb/M2NPUuNzYlOjA4F+MHOKTWUPYT ghDEaHMLtoCfZ7z1PJhzQ31SZuuu2IvV9z7CKz9yi2jLu4q4SegHJ3VrXSHwf61UEWq2 pNqg== 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:dkim-signature; bh=qrKr2d416JzQHKIv35xrEFZoyi5LKcgnoNGnsbgsisI=; b=SYWcCdyfJwZP9rY0ja79UYGxWj5dJdJhmdbuCFoLg0hFmjEBSJ/OVhj9TOT5tJj8GX 8WEUDb9dglUawVKISmLj9CwWEqaqJmnN8sitAF1NYt6X3OyoFibNY94FpYcRaGfsj6X6 G3vcyD6Sa10AM8FmWonDJNZo7GbxHH9c10hcor5FV/Y61WCifQXNF3YQdnA2E39jo4q1 02Jx0iaU98rihskIE/M8HLFAvPsbs8jcxN8dTZcgnQ69wgQpt+rsBSC+Z6fM8V0yUGRe aEy9MUNvMrmtiMgZiCH98ZrrJrhQjNE+soSuQ9RKBD8YKVwA8AwQGUZtkKbQIGkZEgYU ya6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=cuCsRuTL; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o10-20020a170902d4ca00b0016759c39ce7si14918964plg.204.2022.06.23.01.57.13; Thu, 23 Jun 2022 01:57:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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; dkim=pass header.i=@collabora.com header.s=mail header.b=cuCsRuTL; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230280AbiFWI4M (ORCPT + 65 others); Thu, 23 Jun 2022 04:56:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229987AbiFWI4K (ORCPT ); Thu, 23 Jun 2022 04:56:10 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2A8536B42 for ; Thu, 23 Jun 2022 01:56:09 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 361F86601792; Thu, 23 Jun 2022 09:56:07 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1655974568; bh=gaH+QcLCd0GRKyU8drx8USepwlQGvVb6yCGKaphFNNY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=cuCsRuTLsIDqKPWMRVmQgSzxlM8pDZi4hyxmxcuxRzEKHteOiiMWYqkJ5VQiMitdX Be9zJbGH16+7YhjeCKiqFkS/F5gCF8CMdWnDtfp5Shqy7HZetNySJM80eg0ev3/VpR 2PW4iWlZnEcWZTOQCe4ds4Jpi2kWU/5+BanhWsqeKs9GUMxamgkdGYU/b+I/YvEfjV 68mUhnzDQqW3o/HOAzjEiDyLfmKvayvWuB4jmDsDNrCWyFUWU+a99qROkWtlLFmWc0 KNadWwyEIIMs7P6ZoFlf5AK1Gei8TnVDAEjL5WX3uJ6UGGGAxeJXBE+tswTIQMPfAl bKeIFnTn52OeA== Message-ID: Date: Thu, 23 Jun 2022 10:56:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 2/2] mt76: mt7921: reduce the mutex lock scope during reset Content-Language: en-US To: sean.wang@mediatek.com, nbd@nbd.name, lorenzo.bianconi@redhat.com Cc: Soul.Huang@mediatek.com, YN.Chen@mediatek.com, Leon.Yen@mediatek.com, Eric-SY.Chang@mediatek.com, Deren.Wu@mediatek.com, km.lin@mediatek.com, jenhao.yang@mediatek.com, robin.chiu@mediatek.com, Eddie.Chen@mediatek.com, ch.yeh@mediatek.com, posh.sun@mediatek.com, ted.huang@mediatek.com, Stella.Chang@mediatek.com, Tom.Chou@mediatek.com, steve.lee@mediatek.com, jsiuda@google.com, frankgor@google.com, kuabhs@google.com, druth@google.com, abhishekpandit@google.com, shawnku@google.com, linux-wireless@vger.kernel.org, linux-mediatek@lists.infradead.org References: <753f19393f169ad4a5fc127f68e16074f1617306.1655944385.git.objelf@gmail.com> From: AngeloGioacchino Del Regno In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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-wireless@vger.kernel.org Il 23/06/22 02:35, sean.wang@mediatek.com ha scritto: > From: Sean Wang > > Reduce the mutex lock scope for reset to get rid of possible task hung > e.g wpa_supplicant and to allow the user-space process to keep running > during we need more retries to complete the reset. > To actually, effectively, reduce the chance to get a hung task, and also to improve the general responsiveness, I think that the best way would be to manage the locking inside of the reset callback(s) for each dev/bus. This is especially because some of these reset functions (like the SDIO one) may end up waiting for more than *two seconds*. However, I get that this proposal requires way more effort, and this commit will anyway improve the situation as it is... so, you get my: Reviewed-by: AngeloGioacchino Del Regno > Suggested-by: YN Chen > Signed-off-by: Sean Wang