Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2812390lqo; Tue, 14 May 2024 09:49:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJEsfKoZRk88Szg1/q2fVeDTwsqt0a/SVPEABG35mdaXkE+AwTNfTNFAKIN9Ae+mvDvZxZlLrNFri4QAZ/e/eybkjAR2XNu+1NAJyYyg== X-Google-Smtp-Source: AGHT+IFaJl+LFeep1iPkUFDr4eJFB8TVRtjoBrSkghONqmTO7L55YwlGiskrx4rk9tbMUpNoXLFX X-Received: by 2002:a50:baeb:0:b0:570:3b4:53ff with SMTP id 4fb4d7f45d1cf-5734d5903c1mr9887277a12.6.1715705366783; Tue, 14 May 2024 09:49:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715705366; cv=pass; d=google.com; s=arc-20160816; b=xzNA7rODAqACwsVNOId0VI09ZrZjr9S+EsJq9HBjORmr0QO7sNwqHdvS5iLPXSSsGa EHCjc58M7JSzMTGWtjKyMltYUlLNQVhMt5jEvMs+wk3R49nYekhgNnJqQiYrkg2sc2Ig Mh0nZdJns/bS8Z1dSVbbRTqiIYI0sDOqPmVoxlDmH6xJNOvlChvFOl8DjqcydNKowqdv TtwG4HwRIXpSAIOsiOjQeA4BwlsludRcPTKF1tTYEy8oUdbJj9xdyUQ005XpBD3kGtax TCdHMPdqMrRtR5KJJdELcEqnwb0Rb5GtWuL7gg2Cur9ZDSaeAfX2fpesJrGxXVkUpqIg fDJg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:sender:dkim-signature; bh=hPJtbRaKeAfkL76CPGzY6JDKoDaI+q9X0/jE6CYg6Ns=; fh=13YqaagCiU0J4vjtJEWX80sKW99oPOtLL7Gr2OvjJ7U=; b=k682cC9Ev5IuWgQnhEEWuUc4ZPdCeavSa9FResOi3QfIFE/ydlH82NIIsG61U2Mywm 5Dd/YPYW1cnHgDfs+Ragy26fNhcuqRO/khYUMXOlftU20i46pGIwlLvec+gxsdhifJcU eKbVLTg3Sghnr1UX/ZNPU9mIQLq4bmIspGW/Jgm5yN1XXchPQXwJpR1BFtnr3GhIMJ7D HONt7knFHyAs9ijal+CMg30DFO5AXaCqkhKsnL1rdNHnT/CXgdpbV8XPy9PHUb0yV3aC H6nt+yQCSuIr4Kgu2iLWX22eNufv9kxzXg61Tguh3Ao89ddd/lNHGkeMsEEtaRi3xm6R n5HQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TAoxat9T; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-178966-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178966-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c2d547csi6717526a12.230.2024.05.14.09.49.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 09:49:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178966-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=TAoxat9T; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-178966-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178966-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 4E14A1F21E10 for ; Tue, 14 May 2024 16:49:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81B2017BB3A; Tue, 14 May 2024 16:49:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TAoxat9T" Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 68902F501; Tue, 14 May 2024 16:49:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715705354; cv=none; b=OyvW2GXrwZ3ou3rixuxF9lcjOZ8YTl74t8EJqFxm0RmAX9MPWeOE/frAgB5kdYQj4wsPq2XoF1shEirzVWnYpalITbLtYCipeCpjTRTqB2Kfbe0R3hTcbboV3iHv1XLDW/2Z/2s31zZgzCqHTj4Onx3Dq/O98yx4EU2v1tqNV40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715705354; c=relaxed/simple; bh=1UzW6SAHAIZaMISdFE8jDhrw+M6si+xK73+Z7yrGdRw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XG3P2AMfhbGR6xvzGisM5UvCGmySv1OBrCb0jyCtMDNASGIccmfR3HQsypnv8Y046jsOl12adUS/GhCkyrgwIMqh7Yc0ZB7RD7+FlaNYkufOX6HqQuwZs3NfsbDWcl8LMTawR60qnUVCUEnukDAnPWelQ61cdD83SxEr5TJJj88= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TAoxat9T; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1e4c4fb6af3so34034505ad.0; Tue, 14 May 2024 09:49:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715705353; x=1716310153; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=hPJtbRaKeAfkL76CPGzY6JDKoDaI+q9X0/jE6CYg6Ns=; b=TAoxat9Txxz2VDS6z/rYUquaiZFFnd8NNLDbCrAhZap5zl8eScsRW7pCK+S1Hmrl+P hL2SgtX+i2peC6XeJNRNEJ25eDOmPRM62cBQ7ixTD/wDVnF6t6tks5y1BrKt/NlTbSGI KbEL5C/43YXZPFtxgmZ0uAQMOqxpLyH+kxwgmxzfO+iswR3nRemwrGMO67sV904UEiVL dfwXQSfzYKGXdew6xjAoQsKsN/TFkx1QC24UIjrfFWhdNyYrdL9ZYWyv5efT0dMOsF3Q 0ZxS4UCAV/3ihs5R6ywPQ3dHpaSSzN4ltOPSKjrG+9GTRNsQfpQM44FRr2Utmrm6gnNB PXEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715705353; x=1716310153; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hPJtbRaKeAfkL76CPGzY6JDKoDaI+q9X0/jE6CYg6Ns=; b=mRmtmAE7dipMbDMk3RLhLafmhUWLHTOevuDoaYyLpgo/m67kBn2RvdvftX6uZ/BK2V iXfD296wTUFJPySXw99hYE2lHN4/bTjv4xkP3LnpEZfzq1wrOoiQuDpw0l1+hNx6K3ft gJpfdUrJhy7fDo2EezUSJBhtl/4fffrTpWLK/nyr4zyxJUuPw9F6rvVuHunAp1XU97di 8BBqC8Nz+ViINpv+PdDLebvwaL98ilzpX8WASn7oGUW7uymfSDq/K/lzmbDv1+bc9+BX NNd32r2eYzUen6pS2dMGvZBxrPXVS20yO4cDfnjv3RhsCH+ARcGAcEatjqzsZawtVTrT 5P+g== X-Forwarded-Encrypted: i=1; AJvYcCUP/HDuHKzGEBVbr3zk+ldJojdgvfTNZYcjpYwM8L9AZD+miszxLctOezDxFeS/Eak9pDeTxpgk22Os1z+IVKWrtycLtBDC/Qwpf16cYq+WQzE+EG+xWKxQ6ZdY1Rl28ID5aOjE X-Gm-Message-State: AOJu0YxmkvcTn/EgS7qQ3bm0OHcMdYTE/LlvWL2OgxmDCRkKzm4zlXlf Qb5gTZP0OqN4wHcglXrhhni2BLQyXPiHuJLXadFid6+Dz9KVzwZK X-Received: by 2002:a17:903:1212:b0:1e2:7734:63dd with SMTP id d9443c01a7336-1eefa58c6e0mr243962865ad.30.1715705352599; Tue, 14 May 2024 09:49:12 -0700 (PDT) Received: from localhost (dhcp-141-239-159-203.hawaiiantel.net. [141.239.159.203]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-6340c99b915sm9753594a12.41.2024.05.14.09.49.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 09:49:12 -0700 (PDT) Sender: Tejun Heo Date: Tue, 14 May 2024 06:49:10 -1000 From: Tejun Heo To: Haakon Bugge Cc: OFED mailing list , open list , netdev , "rds-devel@oss.oracle.com" , Jason Gunthorpe , Leon Romanovsky , Saeed Mahameed , Tariq Toukan , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lai Jiangshan , Allison Henderson , Manjunath Patil , Mark Zhang , Chuck Lever III , Shiraz Saleem , Yang Li Subject: Re: [PATCH 1/6] workqueue: Inherit NOIO and NOFS alloc flags Message-ID: References: <20240513125346.764076-1-haakon.bugge@oracle.com> <20240513125346.764076-2-haakon.bugge@oracle.com> <6E7B1E61-5BB1-47C0-ACA9-989EC0FD03B9@oracle.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=us-ascii Content-Disposition: inline In-Reply-To: <6E7B1E61-5BB1-47C0-ACA9-989EC0FD03B9@oracle.com> Hello, On Tue, May 14, 2024 at 01:48:24PM +0000, Haakon Bugge wrote: > > Also, this looks like something that the work function can do on entry and > > before exit, no? > > It _can_ be done in the work functions, but that will be a code sprawl. > Only in RDS, we have the following worker functions: > > rds_ib_odp_mr_worker(); > rds_ib_mr_pool_flush_worker() > rds_ib_odp_mr_worker() > rds_tcp_accept_worker() > rds_connect_worker() > rds_send_worker() > rds_recv_worker() > rds_shutdown_worker() > > adding the ones from ib_cm, rdma_cm, mlx5_ib, and mlx5_core, I strongly > prefer to have it in one place. I haven't seen the code yet, so can't tell for sure but if you're automatically inherting these flags from the scheduling site, I don't think that's gonna work. Note that getting a different, more permissive, allocation context is one of reasons why one might want to use workqueues, so it'd have to be explicit whether it's in workqueue or in its users. Thanks. -- tejun