Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7115416rwr; Wed, 10 May 2023 04:14:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4+oDR2fnBWy+03drlaWNhkD81nPk//GZ16tSaA3t7gqf0DjimwkYANIzUH+t2TRPw+eJbW X-Received: by 2002:a05:6a21:6d90:b0:102:7c37:aef2 with SMTP id wl16-20020a056a216d9000b001027c37aef2mr2549953pzb.58.1683717250859; Wed, 10 May 2023 04:14:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683717250; cv=none; d=google.com; s=arc-20160816; b=wkBlxVJv/E3pQxDhGTV7NIABnEPL8i847mL2FAF4hmltP/Lt1jQT4kAheDC/pplrY7 mYhaF/vo18RA/E5gSa1tajQIXCLmB2C3yLg1OtnUxmsfPrDTfJhy3yFqAhD8/5uAxdr9 8jyQ39FdInmSBhs0j47KZKAycbB7V0wJ266njPgb8uNbsfWJHbfmTcqY3hbWEUiPiAC/ bfcCK0c4PCOQd2/RNUuq2QvjKxD7DKdfP9Sn77KPMU0sxzDbQLALiHSEpWs3v+saAkBw JlxagR8k6+9VefuSx9fYaeFhsSWqGFN29O9LOoyXQFpUEo7ZkVE9+Tv0F0IIqU2fkCu7 tKgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=9knHFr7otlMBFfqKoMSKVuSBAyhiYea7O0k8x1nSNpQ=; b=WEKRj8RTT3+HOp/7/c8SgGlxGVIc0d/vfyU99p7wz09It4dQJWq2F0db1Gz5m+/+43 tJqILnMWGlTfEXx2kr0OlyOy2U3t5RVj1Zi0hnu9Tt8Zk8kZrQzoCU+XwUoTLZFr4IWZ zkYdPRxbMbj1MZitJeSxUomCVhdnG/JAOEEJCsOZFM/I0TOsqF31GnC/ORZTwm3UWqoa v9pwK6hkAhJjDioOgufYyWoflUU1zu7/KAUzlxgBXv1+b4mNnd84biMJ3uaiGbIO64oN 3+o+5AVgsuNZuGN8zNFydsGYChN2SYPzwwn1XBsCTKguqHSOod01LJqJ5tcdl8HFxNqT JSaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=qJiDDyoR; 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=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y187-20020a638ac4000000b004fd10490f3dsi4077129pgd.251.2023.05.10.04.14.03; Wed, 10 May 2023 04:14:10 -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=@sipsolutions.net header.s=mail header.b=qJiDDyoR; 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=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236410AbjEJLL7 (ORCPT + 61 others); Wed, 10 May 2023 07:11:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233820AbjEJLL6 (ORCPT ); Wed, 10 May 2023 07:11:58 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C66AAB0 for ; Wed, 10 May 2023 04:11:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=9knHFr7otlMBFfqKoMSKVuSBAyhiYea7O0k8x1nSNpQ=; t=1683717117; x=1684926717; b=qJiDDyoRfLeSzmb3W72XI8jBOM0IPuAqeyt3dGcrtLPDm66 xUPAH6wgVRsjkVfy6omaH9jjtJN5U9WmSAxpslK1IJu9qd3Hm8yKokU6RJqtSxF4mnXSxyjcQOn6O y8T1T4lYVUpPXet1BYH/wPa4v8Knx6FO3v42SEbB1Uqp+EhTlLYfLcgbR2tE7AF5Y9hVEE1GnHvnE Wo9abXT1iO4RmBRlhR2Izzyv2dWp1vYdAU5nswvoO76lTqw2Kbuf/LaN/ottCldjFzc2dAVySbP1O Sw4S/2wNITSFytn+pvhobSbGqwLWm87OhzE+xsB7DqOG1iTb7vkwc9ufy7rpcnqw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1pwhjf-005Mjg-14; Wed, 10 May 2023 13:11:55 +0200 Message-ID: <3fc1b7605f6a5e66184cb02781b3eba3e82e9ae9.camel@sipsolutions.net> Subject: Re: wireless locking simplifications From: Johannes Berg To: Tejun Heo Cc: linux-wireless@vger.kernel.org, Lai Jiangshan , Benjamin Berg Date: Wed, 10 May 2023 13:11:54 +0200 In-Reply-To: <12d77a1427cb4c0888783d8544772e3c2d1a8908.camel@sipsolutions.net> References: <12d77a1427cb4c0888783d8544772e3c2d1a8908.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Wed, 2023-05-10 at 12:58 +0200, Johannes Berg wrote: > Hi Tejun, >=20 > > There isn't currently but workqueue already does something similar for > > freezing by temporarily setting max_active to zero, so if you apply a p= atch > > like the following >=20 > Thanks for that! I came up with a bit of a different patch, see below. >=20 But ... this raises another interesting thing. Now I have to call workqueue_resume() somewhere. But that means I need two versions of wiphy_unlock(), one that does the resume and one that doesn't, which is interesting. I can track it I think though. This is probably a stretch ;-) But what would you think about a workqueue variant that gets a mutex pointer to hold for all work structs? Then we'd not really have to worry about that in each of them. But it's not great to implement, I just tried a bit. johannes