Message ID | 20230314183332.25834-1-mkoutny@suse.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1920360wrd; Tue, 14 Mar 2023 11:36:55 -0700 (PDT) X-Google-Smtp-Source: AK7set/u0OE0OyQjLj8SLtldCEKHn9dE4lV07TRQ/mkS59GN2PmxgP73hIobRG5c7IjUqTnc+lIg X-Received: by 2002:a05:6a20:6699:b0:cb:6f9c:166d with SMTP id o25-20020a056a20669900b000cb6f9c166dmr36818190pzh.43.1678819014826; Tue, 14 Mar 2023 11:36:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678819014; cv=none; d=google.com; s=arc-20160816; b=lmtCm5Dhs/PvRglyuNCDnsdTURNGQSewbokvUz6cmdvPYaqQDXqeBsqxH2KIxQHFaM V3hdQa8qK1oX04lYvXnmiAvhxYbLc0hmIAlp3zVyxKr7V8/mC2MEQ49NCVUw4aWt2NSx 1aXjlzdmeT5z35UDhy/Gg7aBLuL7mM/se55jM7leTif8Na7agVn2agt2rIjHQfVjqFIp P0N5wAwSRd2MqhfD410Cm8loRr5K6JB2i1IPCwlNT9Uolrmnh6CY0y5htc6+QNjIV6Cj ETVpUq+fcRLC+R3J4e+NZTZW3/6zvOprXTfy0/0X5qSr8OMWTNecf/Tpl2RxFYasMlSb P2IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=0qGPjCdAtXC+XqD66XjuAi/v8OGi5D90eB+FdMZqJF4=; b=iPph07REduVE1pNC1yRjned16Fo5kupkTPH2JQrIm6eT7Cg/D3sdiiM4DT+SHowrKW aqUb1Eitz1OCp2VYTIxf+ocPZLO6WjERDnJ6+ZICXEL+/JGou+IjGs97o8F+yJAtXeiG Xwt8e1L8n6q7mZyLTjqZQI5jfosqDhjbslzRHAxmnj5IxiZ+wUoWVCnge+8SHRXgP9qq ZLVZKplFXZWUVQiyWiJQvTA6GYllN7HrGeznUqQpedehRQ5CWPx11txduCuTp9UcRulo 8Hi3cPh0wh/ipEt2Oie3n+9EQQ0/TIiqDpB/0XDjwRw/xPEggTvr/7bKor5OsZdD4HSa VB/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=JdhULJXk; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u11-20020a6540cb000000b004fc2aebe0easi2697228pgp.865.2023.03.14.11.36.39; Tue, 14 Mar 2023 11:36:54 -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; dkim=pass header.i=@suse.com header.s=susede1 header.b=JdhULJXk; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230290AbjCNSft (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Tue, 14 Mar 2023 14:35:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231132AbjCNSfg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Mar 2023 14:35:36 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E32CBB5A9B; Tue, 14 Mar 2023 11:35:03 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8393E1F8C4; Tue, 14 Mar 2023 18:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1678818814; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0qGPjCdAtXC+XqD66XjuAi/v8OGi5D90eB+FdMZqJF4=; b=JdhULJXkXMyNdDlyilRH5mWTjuWX8W63xoL7ZQRJJGxCcOiqkiWRdleW8GnbHAm050pPe7 mCTMJyTgkDYeCfpDOE4fv8w5FYUT+1xIsBateWg6K3b8YfoBgXr2sTO/Clhq+v7NRWWGWV 8Aq2YbcMiefG9VpKpNOGaRKbfhHXzu8= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 5616413A26; Tue, 14 Mar 2023 18:33:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id c5DgE/69EGQwKQAAMHmgww (envelope-from <mkoutny@suse.com>); Tue, 14 Mar 2023 18:33:34 +0000 From: =?utf-8?q?Michal_Koutn=C3=BD?= <mkoutny@suse.com> To: io-uring@vger.kernel.org Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, Jens Axboe <axboe@kernel.dk>, Pavel Begunkov <asml.silence@gmail.com>, Daniel Dao <dqminh@cloudflare.com>, Waiman Long <longman@redhat.com> Subject: [PATCH] io_uring/sqpoll: Do not set PF_NO_SETAFFINITY on sqpoll threads Date: Tue, 14 Mar 2023 19:33:32 +0100 Message-Id: <20230314183332.25834-1-mkoutny@suse.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760369327459241321?= X-GMAIL-MSGID: =?utf-8?q?1760369327459241321?= |
Series |
io_uring/sqpoll: Do not set PF_NO_SETAFFINITY on sqpoll threads
|
|
Commit Message
Michal Koutný
March 14, 2023, 6:33 p.m. UTC
Users may specify a CPU where the sqpoll thread would run. This may
conflict with cpuset operations because of strict PF_NO_SETAFFINITY
requirement. That flag is unnecessary for polling "kernel" threads, see
the reasoning in commit 01e68ce08a30 ("io_uring/io-wq: stop setting
PF_NO_SETAFFINITY on io-wq workers"). Drop the flag on poll threads too.
Fixes: 01e68ce08a30 ("io_uring/io-wq: stop setting PF_NO_SETAFFINITY on io-wq workers")
Link: https://lore.kernel.org/all/20230314162559.pnyxdllzgw7jozgx@blackpad/
Signed-off-by: Michal Koutný <mkoutny@suse.com>
---
io_uring/sqpoll.c | 1 -
1 file changed, 1 deletion(-)
Comments
On Tue, 14 Mar 2023 19:33:32 +0100, Michal Koutný wrote: > Users may specify a CPU where the sqpoll thread would run. This may > conflict with cpuset operations because of strict PF_NO_SETAFFINITY > requirement. That flag is unnecessary for polling "kernel" threads, see > the reasoning in commit 01e68ce08a30 ("io_uring/io-wq: stop setting > PF_NO_SETAFFINITY on io-wq workers"). Drop the flag on poll threads too. > > > [...] Applied, thanks! [1/1] io_uring/sqpoll: Do not set PF_NO_SETAFFINITY on sqpoll threads commit: a5fc1441af7719e93dc7a638a960befb694ade89 Best regards,
diff --git a/io_uring/sqpoll.c b/io_uring/sqpoll.c index 0119d3f1a556..9db4bc1f521a 100644 --- a/io_uring/sqpoll.c +++ b/io_uring/sqpoll.c @@ -233,7 +233,6 @@ static int io_sq_thread(void *data) set_cpus_allowed_ptr(current, cpumask_of(sqd->sq_cpu)); else set_cpus_allowed_ptr(current, cpu_online_mask); - current->flags |= PF_NO_SETAFFINITY; mutex_lock(&sqd->lock); while (1) {