Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp211893rdb; Tue, 16 Jan 2024 22:30:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IF45hb1Coc8AdiCf6vA3ub0Ab2BYoWOUBEzvjUoDPvx84h1X2SlSp1e240018Wa3OM2EcPJ X-Received: by 2002:a05:622a:606:b0:429:c996:8ed9 with SMTP id z6-20020a05622a060600b00429c9968ed9mr9886369qta.79.1705473031165; Tue, 16 Jan 2024 22:30:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705473031; cv=pass; d=google.com; s=arc-20160816; b=jvki1N6eYlsg7ZKgt8cQH2gt42yIfuairimk0sktZnPQ8f+QdCmsPjmhnwxAOunyK1 Q8Z57FBhLGgBEuxKN2fkqOFqdMbAWezvNDBhBNg8KLissKI7EFw1OMyqMJ29jX9YID3Q xAJ0ikmucgfue+SaFTsK7anaN8tGb1xU1T3pDO2j+gQCbME1ZFp6NfGqZOwww8jZr3nV F/hlysdWGoapepfVOKzzCSTG6un5U8Yc6+R2XBGipnAEFLaWmqqE0k9D/iU/m3TYzR7c uZOKDUJWeMGtptVu0BKMkpa0Ut+njg6Q0z+3h/UUM/qx1iQnXHR4tDYIvQfmFzUuABJ1 +LYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3SWvsqvo8kKRREIVaq74k7zOkw2lqw8OoQBIc8ZyG6g=; fh=6FJ6+Sg92GJybfmkV++OGDEBu1D4YXNf2jTqIEwwevU=; b=cmU9FUwFvAV97nxgyyJ6jVgsx3wZS5k4KhdDOp6hxGzeYDBmzZis+PoCRHXR3QJJki LPBxK+fHAZIOeWxMkQPmOhbQ4wgOC1kf+SuPBBmxI30V0e/sQ8jJUgBArB1kcFgrHEmd 4Vty/fqGjRJ1HCvwH2q3FF5Ir9OCMP3vFt5rnL+6MQ0HZakg5VsxPQZH2BOp6BQDTC1M T48SOt+aZtDtP/dLk5+bQarel1iQW6BEYJoQnv7vsKEFZsysytsqtsX/18l2ZOa9QlMw 45iiVYcLXYrCQbHXKD+m/k5Ta+PowzY4EcVxx/R4aF4RczZLEV2LwWARS9I1+xK35nw0 jZZg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KYQk9dww; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-28569-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28569-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id z8-20020ae9e608000000b007835a7b7ea2si5968658qkf.360.2024.01.16.22.30.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 22:30:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28569-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KYQk9dww; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-28569-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28569-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E6D561C22F07 for ; Wed, 17 Jan 2024 06:30:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5879BD310; Wed, 17 Jan 2024 06:30:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KYQk9dww" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0014FBE49 for ; Wed, 17 Jan 2024 06:30:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705473026; cv=none; b=OAQPI+Dab2Wi+HWfRNhriRzpmNnVJjXZEHj8tX3lSpvrRUU9A11a6XtUpMuhxvlBg8TSqIqZKn7h3p2UCSTXzXGuJr8VJSilKOg3AI3WK+zI6bc28nevOoIlvPgZ3LTl2FMitYHmEuUXL+z/aTRaHPLjVgUeyQeg4QX1rpvbzi4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705473026; c=relaxed/simple; bh=d/+Iqt7FN2V9H5BldHeUcRwFbKJt6MqHvk+5w5dVM70=; h=DKIM-Signature:Received:X-MC-Unique:Received: X-Google-DKIM-Signature:X-Gm-Message-State:X-Received: X-Google-Smtp-Source:X-Received:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To; b=ekvQ5uDwqCIRrxpxaddmfwnLk24zAB4exy9YE1eiJYDLp3ptx1PVxl7hCzfuacx6SQwBaAOc1mhp/N8h7LUB6mH4RKD5Fh1WjDYxfSMVmT/aBLf/aVJxINSdQRZGCZEsSKsPdjA4/4K8jSxOtZ/vVWk3qlUjtvaJUFEFlw7SPCQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=KYQk9dww; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705473024; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3SWvsqvo8kKRREIVaq74k7zOkw2lqw8OoQBIc8ZyG6g=; b=KYQk9dwwY9HmEBamOFIC+Dcxi/KLImccbZhSa66rPNnalljHX82FJ0yLNdyGC7bNykDczN om9T/yFa7s3AgXrSzI9hhkGo2bHT+tjnYT4knvRZ0qopsPGrI4mlHwtRAg8PF2HIwuQUt2 uGXOUnXaYVRyjIGjoat8J9IPDeAw6Aw= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-433-kIj_0avkMaa1JkFLRNor8Q-1; Wed, 17 Jan 2024 01:30:21 -0500 X-MC-Unique: kIj_0avkMaa1JkFLRNor8Q-1 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-429d02a63baso80108931cf.0 for ; Tue, 16 Jan 2024 22:30:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705473021; x=1706077821; h=in-reply-to:content-transfer-encoding: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=3SWvsqvo8kKRREIVaq74k7zOkw2lqw8OoQBIc8ZyG6g=; b=IMamS9eR0QuCcR1O/jSeBVFmFjDSbFUlC7Lm0A219ZrxgP8Nl7um1NBGKe7c1ztYGe 7d3XA/CXvcPyu6YEEVpI67vu6uL44iafuNCzgT0nZNV4UGpobjD3sDPMTh2jk6LwN482 m/qVPy8M1o9g8fAMR1eo5a1QK7QdgCP/+pSa6CZv2HJdXRyvqsEH/x/Iu54t/C8lO65K +0JQMF0HqJV/mjF0ALQpGKv73p1q5/T4aSl3BB2vNr+MRFR2It/NrwWGPu0cvG4RHhvs 47clPkLcO+ZkqHTzRbg+JYoDajHtyiOubtfLyrBMwnLAwIZr7DrbpiIkEf8nX1uGs6IL pgfQ== X-Gm-Message-State: AOJu0YyLnVMrXY15E0dUM9qWHeHXpbRBcwNMhwJVzc+Me2PErjuFHlfA G8z8fxauIL8bclEL+JeYdLDm5OCGQZwZHCTi0k5432Dw5G7KtRVaupbh3+DH6fGnbTZRT5IkjYF TLCg2W4cAsFPPHzTOQuxwfpoNRl3Uugy/ X-Received: by 2002:a05:622a:11c9:b0:429:7d0c:6046 with SMTP id n9-20020a05622a11c900b004297d0c6046mr10952481qtk.68.1705473020903; Tue, 16 Jan 2024 22:30:20 -0800 (PST) X-Received: by 2002:a05:622a:11c9:b0:429:7d0c:6046 with SMTP id n9-20020a05622a11c900b004297d0c6046mr10952471qtk.68.1705473020527; Tue, 16 Jan 2024 22:30:20 -0800 (PST) Received: from localhost.localdomain ([151.29.130.8]) by smtp.gmail.com with ESMTPSA id w8-20020ac86b08000000b0042a0effd2d8sm298843qts.36.2024.01.16.22.30.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 22:30:20 -0800 (PST) Date: Wed, 17 Jan 2024 07:30:16 +0100 From: Juri Lelli To: Lai Jiangshan Cc: Tejun Heo , Aaron Tomlin , Valentin Schneider , Waiman Long , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 4/4] kernel/workqueue: Let rescuers follow unbound wq cpumask changes Message-ID: References: <20240116161929.232885-1-juri.lelli@redhat.com> <20240116161929.232885-5-juri.lelli@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Hello Lai, On 17/01/24 11:56, Lai Jiangshan wrote: > Hello, Juri > > On Wed, Jan 17, 2024 at 12:20 AM Juri Lelli wrote: > > > + /* rescuer needs to respect wq cpumask changes */ > > + if (ctx->wq->rescuer) { > > + set_cpus_allowed_ptr(ctx->wq->rescuer->task, ctx->attrs->cpumask); > > + wake_up_process(ctx->wq->rescuer->task); > > + } > > + > > What's the reason to wake up the rescuer? I believe we want to wake it up so that it can possibly be moved "instantly" to a cpu inside its new cpumask affinity. If we don't wake it up it might be sleeping on a cpu outside its affinity which might have become isolated and this cpu could be affected by that wakeup if that only happens later on when possibly the rescuer needs to perform some work. Does is make more sense to you? > I support this patch except for the wakeup: > Reviewed-by: Lai Jiangshan Thanks for looking at this! Juri