Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4020261rdb; Mon, 11 Dec 2023 06:52:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IEd6g8Mi2r75tMqbTZ9IgOu7e7rn/7fINBLqmQ9QyS0P7Trt02ovs2BIDgSlIMNhFgMeDcw X-Received: by 2002:a05:6a00:124a:b0:6cb:8beb:15dc with SMTP id u10-20020a056a00124a00b006cb8beb15dcmr1783729pfi.30.1702306351748; Mon, 11 Dec 2023 06:52:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702306351; cv=none; d=google.com; s=arc-20160816; b=Pl2R1htIXl9Nk3kP4L9FvNIGejqNRJeFewuxUrLG4apIrbAKyHfJVVkwd9FzdPv3Bp HhLPL15GxxoSKkJRnyemSd9wg2ADnYODnplV9onHOkgN1EtS9w9q2KC4B5/eUc91FSTH 8R6+XO3Z7d5I76oXgvGZyqAKkv6uqPnKGGos+uE4//YHCqw4jaBeji0sXCwB8vj5/93F o17WcOxD6pcFUCwdip6/6x2BcdxVtfYMf8DvH6FxnDW2XHa586f0jCkAii7FVtEyhwXx eeQs7XKBdVBhTsfTmHrEzTuA0hIvU8I2HHKBP2R4baQcnI6tZ/wAzFFxk1G6XJ9MXz8E o6KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=F4/c63W81BvM+O6zUBO7sErfAtzEOW/v1l60Jys6Kxg=; fh=hmZLrWKooh8t0G++jSGr50dsPMSNPgN4gMDa8CwUqIs=; b=DZyajWcJ+n045fEAebl43orCFYOdeK9yTI2OzDQnpU8th/lJasLLIXQtW82ZjNetyP SQYj37ZfFfCYHBCZJmo9LrWZGTS+6UToWJE+vkzlrtqRKj0DMwGF/ncvALnGzFD2Paz1 zQlh/s+pW7y37UNZB4kDgG+SyeG41knWS6vLA+7M1OW6xzfMjhgEhRU1sjHSxXuNDnyM r4ky2zqoeQyN9riPxiJadxlHUs78fuixeGMOTh933CKxr3ukUsDsaK1wtoeD0TPEEQlG O1KhsznnEtWtsLF1M4hMdo2v505ObQf2ESrsqNacpgS88WGSV6oAoA+sgO5tynDN2sE2 WDtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DdsHRedL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id k6-20020aa788c6000000b006cbf2bc1af9si6117382pff.0.2023.12.11.06.52.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 06:52:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DdsHRedL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 3C63D805ED1F; Mon, 11 Dec 2023 06:52:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343710AbjLKOwQ (ORCPT + 99 others); Mon, 11 Dec 2023 09:52:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234925AbjLKOwP (ORCPT ); Mon, 11 Dec 2023 09:52:15 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5700C5 for ; Mon, 11 Dec 2023 06:52:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702306340; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=F4/c63W81BvM+O6zUBO7sErfAtzEOW/v1l60Jys6Kxg=; b=DdsHRedLtWXpOE6ShgV72mFW2HnCUBNJku8NK/pWoFgEE3OuaN+2cwoRuowfjFL55ZHwQ3 PP1gVlvFDtFQ/jZMgrAnf0cwJ99PlU8TocevrKH4W7UZCo4ckGwjhf1I2VQCRVR9OAdo3j OS7Ynp91M8OGPjG/Um6EL8BFGIQA1B4= Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-250-qmYNzR6kMaqxO3K05DD8cQ-1; Mon, 11 Dec 2023 09:52:11 -0500 X-MC-Unique: qmYNzR6kMaqxO3K05DD8cQ-1 Received: by mail-oi1-f197.google.com with SMTP id 5614622812f47-3b9ed87a1fcso4178512b6e.2 for ; Mon, 11 Dec 2023 06:52:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702306323; x=1702911123; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=F4/c63W81BvM+O6zUBO7sErfAtzEOW/v1l60Jys6Kxg=; b=n+fNTSvY1m3+zu9IwH1mdbu84IV7vqssuabYjuW1VQqUuLRJkQa6fG8YIBEVj15dAG AHWbTDTw3mmaFt6xmUFpNY8fHkG3p8nJKXCVuxSPfqJ6JNXQH1CMGwVplN6fq4GlTFf8 sFZHOXmnF/sHmhOXMw/K9fgw2EsKPioumgmC+66qHimNyGL5NXZBznHEPpa/wZNo33tk BzuljpkrsCO4z8danm7RfW4AmYwFZmQKo8Y03pwLM5VEMZLpgGyDVw2vzf+AjaOc6CqA QsYrPpG5+oQ1FkLrgtf4Xxu86Tq0j+MIK3/3OU36RrnCgtR4quEKgOvDKlC5Sqf6FOT5 zFDA== X-Gm-Message-State: AOJu0YwXhhfYsNEursShbjpXg6xXyBILVIKuWLApGIvLyPD7FJXYGxfC wvEY1GMGGrZsaru2pjNISbJwZqhQEigExzrwID9NEZOxB0hGru8YNhtrSPWrHTiMvSdXWttd70H 3b0T4GrB/dywwboKaYdxv5fii X-Received: by 2002:a05:6808:2e4e:b0:3ba:b1f:f48f with SMTP id gp14-20020a0568082e4e00b003ba0b1ff48fmr2386138oib.63.1702306322408; Mon, 11 Dec 2023 06:52:02 -0800 (PST) X-Received: by 2002:a05:6808:2e4e:b0:3ba:b1f:f48f with SMTP id gp14-20020a0568082e4e00b003ba0b1ff48fmr2386102oib.63.1702306321367; Mon, 11 Dec 2023 06:52:01 -0800 (PST) Received: from localhost.localdomain ([151.29.78.8]) by smtp.gmail.com with ESMTPSA id tr24-20020a05620a2d9800b0077d797676a4sm2970705qkn.122.2023.12.11.06.52.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 06:52:01 -0800 (PST) Date: Mon, 11 Dec 2023 15:51:57 +0100 From: Juri Lelli To: Aaron Tomlin Cc: linux-kernel@vger.kernel.org, tj@kernel.org, jiangshanlai@gmail.com, peterz@infradead.org Subject: Re: [RFC PATCH 0/2] workqueue: Introduce PF_WQ_RESCUE_WORKER Message-ID: References: <20230729135334.566138-1-atomlin@atomlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230729135334.566138-1-atomlin@atomlin.com> X-Spam-Status: No, score=0.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 11 Dec 2023 06:52:29 -0800 (PST) Hi, Just stumbled upon this series while looking into rescuers myself. :) On 29/07/23 14:53, Aaron Tomlin wrote: > The Linux kernel does not provide a way to differentiate between a > kworker and a rescue kworker for user-mode. > From user-mode, one can establish if a task is a kworker by testing for > PF_WQ_WORKER in a specified task's flags bit mask (or bitmap) via > /proc/[PID]/stat. Indeed, one can examine /proc/[PID]/stack and search > for the function namely "rescuer_thread". This is only available to the > root user. > > It can be useful to identify a rescue kworker since their CPU affinity > cannot be modified and their initial CPU assignment can be safely ignored. > Furthermore, a workqueue that was created with WQ_MEM_RECLAIM and > WQ_SYSFS the cpumask file is not applicable to the rescue kworker. > By design a rescue kworker should run anywhere. Guess this is a requirement because, if workqueue processing is stuck for some reason, getting rescuers to run on the same set of cpus workqueues have been restricted to already doesn't really have good chances of making any progress? Wonder if we still might need some sort of fail hard/warn mode in case strict isolation is in place? Or maybe we have that already? Thanks! Juri