Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp961103lqh; Sat, 1 Jun 2024 03:47:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVUStzebXoHCRfU7jf1BTM0gyLNYvhtmCmAhjAuTlUzM6nmkVwvFX+S0INMuS9cOugh0KyBmx6Hs3xY3m4O3lz9G/TBjH4sxE3MjR4k9Q== X-Google-Smtp-Source: AGHT+IG0R3XtQ1Yp7DBGyFS/8vYVZ+CMBkY0P2Q5eQlj6Om9t2wtaWot0I5GGqYLJjJTf5jqlMES X-Received: by 2002:a05:6a20:7f9b:b0:1af:dbe4:a908 with SMTP id adf61e73a8af0-1b26f17e38bmr4811874637.31.1717238839360; Sat, 01 Jun 2024 03:47:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717238839; cv=pass; d=google.com; s=arc-20160816; b=AWRD1KvzQ0/ito0fbmZB+8Ibhol7FzxQKxE4hxKC0rb4zymnHezBasqUdkyq/C/zOp L44c4OFMNK4osRl+GA1l1dKUI9qqbRhtMjxuK8wRTGYCU0HVbOiBia+KhXo51q+3VGH8 UMlg+weyi25nujeELop7mQ8JT9MQqaw1qk30dJ9IKuKy6Z+XVr9MbLxzrEtgw76hPzoy GgLTvL22NMV9Ou3T/k3trY35TgCTvwWxUbDva33/qXDCvLDIlEXaxU3qquCI2nMcH+6y WNRCqXZQYAXdEh+sT/SEPY+IkVd5uU2NIlX9P3fgJBVdmW3p22ib+Pr29BbDEIfREq6Y IqSQ== 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:dkim-signature; bh=Dka3jXUuZ9zCnAwMZuC7qBUE/eEypZOCr5R+gu3ZecQ=; fh=rv6GZs6uAG4MZhq+nARI7KJptYyRHh2f4bM0Xysomw4=; b=deFEWcPnKb7ch2A2eRQqq6R0/KwNeEs8UkIhTZDybo3aJyn3B7pejM3c/ifD/Cjq3Y 3jloC0xHHlgnxFrxk9E/K/FCI19IX6YO9QLUrKYBZNgpohVfbbXLwGAr7PiMTykSt79e ExC5VAEAgKt6cFRoeF6M5r+P5TpADbLzKPYdhxfqAAcVgKvt4Opy8MSMOQvTzZaElz4l BgtgxLs55z98+iT+gFhCWLctKtIsven41KaDPkEnXYe/o4GQue4zSJNeFC3JueD72skK rqMbqDZo6zNmx46+3DcPqlGzKxP9y3itbnXdNMwgAd5iSVzIrnDklOY41djfd2MimkSo ZY1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=mF0GPro4; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-197754-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197754-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1fb24df07si1362905a91.160.2024.06.01.03.47.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 03:47:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197754-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=mF0GPro4; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-197754-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197754-linux.lists.archive=gmail.com@vger.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 71AEAB23FE5 for ; Sat, 1 Jun 2024 07:39:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 256CC1CFA0; Sat, 1 Jun 2024 07:38:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="mF0GPro4" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 623D91CF8A; Sat, 1 Jun 2024 07:38:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717227534; cv=none; b=NvtovlEGb/H/cmFURW4M7Y8EYlcMhqdXYaBa2qUOEJ8c0anYbfEb2ZBOXUtdO3z04hORDm0b9UuAscUCVHcxciUiAZfoqc3ZgqnTrqjH+nLRLd6/afrSl8xAR08hrw43/ob65ezYUDWWIwiu23hultFg6agIpn/b/11FEaLjK+s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717227534; c=relaxed/simple; bh=81GRBH+lrxTIuODs8rxSwMPg/JEXNRN4/+g+I2BhgT4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OiGZdkP9MAHWlM6oFoYcDzUUif5Iy45PvPfmZTVS92ONHz5pJ45B3xMvMUdKc/HHNnsTBSVHyjaq0Cd+Yfo4+mRVwsBa87Q9sBgEU24l43XNcTGwUrXvmpV9qXrsQZAtdBJkih/IbIZrEzuBX4ZSerx9hrY+qge+xf9GKQY1Kh0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=mF0GPro4; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Dka3jXUuZ9zCnAwMZuC7qBUE/eEypZOCr5R+gu3ZecQ=; b=mF0GPro4ofayNBAJAWk2bfKjcC hFR+MvGLfZQK1U6dpvztoDhhR2NC2JYaVi8SbFQgzBomtvZol40/heJelh78o4FWYMR89fyFoZD/O OeLgem+cSb+hM7xzLMeQvlWJFtoJDWc0CFyEzR0QhDX2sSJxcsitP6gz3Swp8+Z9KNjozgHYdDc+8 2tyvzy1Z5XmzUY/I1VqFg7GyiV/Jm7xMcwFkGj0zhq/vZh7vJ/Zzhcu3Qkj1HUr7SfjEdCFvu2OLF BB5SKCv+vCHbcz+s6vVlJmyLOu8NG3zgdl3D4iTJTWHqVKUHghP0wHF3/mJWbNfXaNM/7yL0mOz1g WOS2Kpmg==; Received: from hch by bombadil.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1sDJKD-0000000CAbt-0kbJ; Sat, 01 Jun 2024 07:38:49 +0000 Date: Sat, 1 Jun 2024 00:38:49 -0700 From: Christoph Hellwig To: hexue Cc: axboe@kernel.dk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] block: Avoid polling configuration errors Message-ID: References: <20240531091015.2636025-1-xue01.he@samsung.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: <20240531091015.2636025-1-xue01.he@samsung.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Fri, May 31, 2024 at 05:10:15PM +0800, hexue wrote: > Here's a misconfigured if application is doing polled IO > for devices that don't have a poll queue, the process will > continue to do syscall between user space and kernel space, > as in normal poll IO, CPU utilization will be 100%. IO actually > arrives through interruption. > > This patch returns a signal that does not support the operation > when the underlying device does not have a poll queue, avoiding > performance and CPU simultaneous loss. This feels like the wrong place to check for this. As we've dropped synchronous polling we now only support thead based polling, right now only through io_uring. So we need to ensure REQ_POLLED doesn't even get set for any other I/O.