Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6970944rwr; Wed, 10 May 2023 01:51:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7RaHMRSZpmOWIgtRASB7qozFZWh6krRZO7gjDjvw/G7blbMpM6xX6fELct2sdZOCsg0tV2 X-Received: by 2002:a05:6a20:7f83:b0:d5:73ad:87c2 with SMTP id d3-20020a056a207f8300b000d573ad87c2mr19662488pzj.56.1683708692541; Wed, 10 May 2023 01:51:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683708692; cv=none; d=google.com; s=arc-20160816; b=J0KqxGmow3KoZnjeJeweGlz3RfTdGWm6qsYmqwKNj80ZV8oc3vrG4N69TbK9xKBJV8 0+SgT26Jg3i0WYbJiw47N8ZKZn2S50JzdNjDz8Y1YVzwwU4fa0BQMTH4YvLPWe1JtmZ2 MTFhPDrKDkiERru2Gqr+YRfSJC6Lmil5LjdGtsyosjEmvbJy7kuUelJvJCNPki8dTy08 RShbClEJDgVhReW+Vvwg7EdE4pxDPVF2jsaFGDGdd4l8xXpezqd0MyoDPqxeffPYNf15 rTe/oUaAQXbhydhVd+lHLqraK98I+TrWd3NIlAeODcIAsBWwUa9XOoiqdcVk4fnqK6J1 duKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=JyjavuzF8xmWkj+0+vYmbqIrAZFeOc6Mbhf2/+vgjec=; b=YuN6yv2EIfVnREe/2K/VpIunyXHe86AP91IRyMjLi2asjik14zD077hfN8KsyCP1Zu U37n/kQSwsv7qlNVHT8D3NsTljTwgaLR7QE7cbvKkWqxT3VCOI1O96tjOUDHnM9jz5tV EjBKsu9Ntdoj/EmwiVhUTlAvMQwJxDX1Y+MGoc2s29zyFhLwJDrZGUygxoDN3Zzl0NV4 AkqTepu4Zct32++zk1Rh+4Gp5TTtH3xFSRSMiiu1duhPuLKV/40CS9WbxKWwYN7n9rzC yfHSS+oLnkqyDGVj9hApqY+TJz8LhoOk4TImYnfYbvVpwwPaJ76wuOqpdCaquZlgiVRH DVAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pGsbKovh; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 4-20020a620504000000b00645edbb3911si4336866pff.281.2023.05.10.01.51.21; Wed, 10 May 2023 01:51:32 -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=@kernel.org header.s=k20201202 header.b=pGsbKovh; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236600AbjEJIle (ORCPT + 61 others); Wed, 10 May 2023 04:41:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236523AbjEJIl2 (ORCPT ); Wed, 10 May 2023 04:41:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 020581BD; Wed, 10 May 2023 01:41:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 896E4647E3; Wed, 10 May 2023 08:41:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FBA0C433D2; Wed, 10 May 2023 08:41:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683708082; bh=/fMb9AhkKLWSXMjWVCr93HaMMzS7K5IGJrn9oK6atVE=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=pGsbKovhzfzcS6WEqiohAS1c6VfIKW8hyY3x71rCro5noEHRKnoP4WvOnvGim4Xw2 +z/uGPeam+01ytotAAWtSCZNEokXtwd5VfNg5B73F9dfOu1ew7vyjhlRka5lf92X4i c6/mrTONBycdu8wzpP3M17UlW2uL69E2sTaM0wMrfHDtpX5e0J7qQre5yaqn8w7cG+ 8BjQPhbIRgNTyiNEkt3vyclipiOPkF42vfYFAXbaL39kmqyX+PobAebgKZfGUvkT6j 6s2dBF7ZjjkCRv1moDkkdws8b+ZluvM0tvpn1/StrDGRdtylk5dI8orcnxz2s8M6h5 HXMNm04TPE+8g== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH 05/13] wifi: ath10/11/12k: Use alloc_ordered_workqueue() to create ordered workqueues From: Kalle Valo In-Reply-To: <20230509015032.3768622-6-tj@kernel.org> References: <20230509015032.3768622-6-tj@kernel.org> To: Tejun Heo Cc: jiangshanlai@gmail.com, linux-kernel@vger.kernel.org, kernel-team@meta.com, Tejun Heo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-wireless@vger.kernel.org, netdev@vger.kernel.org User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <168370807732.27943.6066793615254091565.kvalo@kernel.org> Date: Wed, 10 May 2023 08:41:20 +0000 (UTC) X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Tejun Heo wrote: > BACKGROUND > ========== > > When multiple work items are queued to a workqueue, their execution order > doesn't match the queueing order. They may get executed in any order and > simultaneously. When fully serialized execution - one by one in the queueing > order - is needed, an ordered workqueue should be used which can be created > with alloc_ordered_workqueue(). > > However, alloc_ordered_workqueue() was a later addition. Before it, an > ordered workqueue could be obtained by creating an UNBOUND workqueue with > @max_active==1. This originally was an implementation side-effect which was > broken by 4c16bd327c74 ("workqueue: restore WQ_UNBOUND/max_active==1 to be > ordered"). Because there were users that depended on the ordered execution, > 5c0338c68706 ("workqueue: restore WQ_UNBOUND/max_active==1 to be ordered") > made workqueue allocation path to implicitly promote UNBOUND workqueues w/ > @max_active==1 to ordered workqueues. > > While this has worked okay, overloading the UNBOUND allocation interface > this way creates other issues. It's difficult to tell whether a given > workqueue actually needs to be ordered and users that legitimately want a > min concurrency level wq unexpectedly gets an ordered one instead. With > planned UNBOUND workqueue updates to improve execution locality and more > prevalence of chiplet designs which can benefit from such improvements, this > isn't a state we wanna be in forever. > > This patch series audits all callsites that create an UNBOUND workqueue w/ > @max_active==1 and converts them to alloc_ordered_workqueue() as necessary. > > WHAT TO LOOK FOR > ================ > > The conversions are from > > alloc_workqueue(WQ_UNBOUND | flags, 1, args..) > > to > > alloc_ordered_workqueue(flags, args...) > > which don't cause any functional changes. If you know that fully ordered > execution is not ncessary, please let me know. I'll drop the conversion and > instead add a comment noting the fact to reduce confusion while conversion > is in progress. > > If you aren't fully sure, it's completely fine to let the conversion > through. The behavior will stay exactly the same and we can always > reconsider later. > > As there are follow-up workqueue core changes, I'd really appreciate if the > patch can be routed through the workqueue tree w/ your acks. Thanks. > > Signed-off-by: Tejun Heo > Cc: Kalle Valo > Cc: "David S. Miller" > Cc: Eric Dumazet > Cc: Jakub Kicinski > Cc: Paolo Abeni > Cc: linux-wireless@vger.kernel.org > Cc: netdev@vger.kernel.org I run quick smoke tests with ath11k and ath12k, didn't see any issues. Feel free to take via the workqueue tree: Acked-by: Kalle Valo -- https://patchwork.kernel.org/project/linux-wireless/patch/20230509015032.3768622-6-tj@kernel.org/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches