From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A0B2C47422 for ; Thu, 25 Jan 2024 16:09:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9C1876B0072; Thu, 25 Jan 2024 11:09:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 970CE6B0074; Thu, 25 Jan 2024 11:09:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 811786B0092; Thu, 25 Jan 2024 11:09:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 6DDD26B0072 for ; Thu, 25 Jan 2024 11:09:48 -0500 (EST) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 4E5DEA16C9 for ; Thu, 25 Jan 2024 16:09:48 +0000 (UTC) X-FDA: 81718319256.11.7861BE1 Received: from mail-il1-f169.google.com (mail-il1-f169.google.com [209.85.166.169]) by imf02.hostedemail.com (Postfix) with ESMTP id 441F380028 for ; Thu, 25 Jan 2024 16:09:46 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=aoLqlTX2; dmarc=none; spf=pass (imf02.hostedemail.com: domain of axboe@kernel.dk designates 209.85.166.169 as permitted sender) smtp.mailfrom=axboe@kernel.dk ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706198986; h=from:from:sender: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:dkim-signature; bh=WyHxjKtVXGSwGC6zU0Wll0qpN4a6mMfynNab9F2/w+A=; b=VWTfg+Soz38AiQgch9Rsn7DCqm5xFQeuyA4yDksn2l/fIaQesF8u8U4+jWgfHjSEoOdwzS D74Cx2Cih2Rc/ChSqXoqe2odPEHZxdwFDHR7d9lEb8AqeadSxiYSkhGrp+vJWUI8T0k23I 4PXI7yX16Pq0gd49B1hfmPaYpq01bq0= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=kernel-dk.20230601.gappssmtp.com header.s=20230601 header.b=aoLqlTX2; dmarc=none; spf=pass (imf02.hostedemail.com: domain of axboe@kernel.dk designates 209.85.166.169 as permitted sender) smtp.mailfrom=axboe@kernel.dk ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706198986; a=rsa-sha256; cv=none; b=tqOAecaI0CM/JZuEqGnSiyemv8C2PPBl3MqLviI0EWfs/zIo7BiVJzWKOf041gK19QK/oA +mhn8fKSbxPNh9CPnuMJsOAaFdwDB6Xf5yIF90tZ+pBf0ZBmWGLm4JShp4PtrSJLEGa7PX CmPM7KQfjsbJBHDyvpgabLoNG9pNib4= Received: by mail-il1-f169.google.com with SMTP id e9e14a558f8ab-35d374bebe3so1113715ab.1 for ; Thu, 25 Jan 2024 08:09:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1706198985; x=1706803785; darn=kvack.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=WyHxjKtVXGSwGC6zU0Wll0qpN4a6mMfynNab9F2/w+A=; b=aoLqlTX2k74AuUwNR+JA0j9FDvpElMOwNMJd6XOjXkq3DZ42b4ZvJMoy50Q/jbqGya ddYI43N/AZCS8sENJee9Cj3Q/JbxKtApOEwmCfYHM9PcpiFs/qupYYIY9ZMQfg8iVpfL rYjJrW0Fv1HnNBGPj5FIQ6nXiuMWhCAvCYp5DVdUjwU5XyWg0pXYTtvuCrEgkZwOy36R WoC6KTHh6y7jdVmvSkjwAnZBmBBq23nPwZuyhB4lflE3ZoOzfHIJfDFaF6MU0Q0yGkc8 qw8/nh6jdJAd2pbt0Lyz4AxMmExUUo2zE5U9ELLzd3b0PMad3B38gCzadwnU/YWMyPkn tqTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706198985; x=1706803785; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WyHxjKtVXGSwGC6zU0Wll0qpN4a6mMfynNab9F2/w+A=; b=g6ugD9MAIeYTh7Gb1UAnB/XfUFtQHTqJQHKjr//qpckxiqyftRoBI7yJKR8gJhfB6+ 5P0ttu2L1OgWF2r42o53a0j6jffKYapj+qwMMeWYcwfkrBhajI80H5O2FeFprsskYOr+ 64ciBSP01SVWWDIv40E1nX8agdKeAmtUAVBnPkjA+vRrmcTEluazf7hyCIyuC8nWxr8g CeIy/sYH2hG4a9LwEXhg3Ua6dcsDXDMiH4J61/ln/EuUtJ3oylGL5Q12bQRR0937G8HD qdOImZ6CMlY/YpdZHkya7nEaNxH2+9ZGGchFiEjnpyxZsHd3MBgmJDM5FtUroW2hxsjX tndQ== X-Gm-Message-State: AOJu0Ywh61FddFS5N/hghPaa587Tbla+STPD6/WIejDJdePu+zvZHifb INY03Ajx/IzqBNQNJQMgJ9gs78Met1weI2uj9khCKI75Ccq7rTbubyz+jppjIHQ= X-Google-Smtp-Source: AGHT+IFCFF1erf4MT7gNzcrY0j99+IrW8aynC/2V1tHd5SfWQOYOTsc0TDco8BBXVgJlZq753TCFpQ== X-Received: by 2002:a92:cd83:0:b0:361:9667:9390 with SMTP id r3-20020a92cd83000000b0036196679390mr2721223ilb.1.1706198985222; Thu, 25 Jan 2024 08:09:45 -0800 (PST) Received: from [192.168.1.116] ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id s2-20020a02c502000000b0046df6e19b9csm4572238jam.34.2024.01.25.08.09.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jan 2024 08:09:44 -0800 (PST) Message-ID: <07de550c-2048-4b2f-8127-e20de352ffde@kernel.dk> Date: Thu, 25 Jan 2024 09:09:44 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH, RFC] block: set noio context in submit_bio_noacct_nocheck Content-Language: en-US To: Christoph Hellwig Cc: linux-block@vger.kernel.org, tj@kernel.org, jiangshanlai@gmail.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org References: <20240124093941.2259199-1-hch@lst.de> <20240125081050.GA21006@lst.de> From: Jens Axboe In-Reply-To: <20240125081050.GA21006@lst.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 441F380028 X-Stat-Signature: sumjdg73i5t7jgu66zspnt11p94wmn51 X-Rspam-User: X-HE-Tag: 1706198986-115711 X-HE-Meta: U2FsdGVkX1+oPpAVnk0dNakSdUj3eexjuApCKTO1s1rezeY8hmTWvCY7UTRVxj37/wd2eXZnqaZH/bxS96oiOievOCh4A2D4qABZHlzckpXk+AeG5a9ZMDsL+4PCOYEpYPBjbrEwSYb/AkEPi8YTZ1+hGD32r6lSAahJYRgrZZhu8N0ZqceVOWykk1NRFNeyQjb1Qyg4pxlLJR5/fftGrJ3DEur64fI2G5Ohgl0paPUebH3ohVWj1xOKdczuz2q5Eygft3auruyAlpiRbh1x83/LNQmsilHtyHZUJPvQeWep5XTmYUDt5R2GVBG4qd/hrNDJWQAaT1JZRfHp8oQkxRcbGnsV3rvor+f0h4jM7Gey6JChR8pqZktEz1OBNHlIJeyPvsYg2ESqPIj8rYfTIawCXAbLan/rLyE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.000011, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 1/25/24 1:10 AM, Christoph Hellwig wrote: > On Wed, Jan 24, 2024 at 08:40:28AM -0700, Jens Axboe wrote: >> On 1/24/24 2:39 AM, Christoph Hellwig wrote: >>> Make sure all in-line block layer submission runs in noio reclaim >>> context. This is a big step towards allowing GFP_NOIO, the other >>> one would be to have noio (and nofs for that matter) workqueues for >>> kblockd and driver internal workqueues. >> >> I really don't like adding this for no good reason. Who's doing non NOIO >> allocations down from this path? > > If there is a non-NOIO allocation right now that would be a bug, > although I would not be surprised if we had a few of them. > > The reason to add this is a different one: The MM folks want to > get rid of GFP_NOIO and GFP_NOFS and replace them by these context. > > And doing this in the submission path and kblockd will cover almost > all of the noio context, with the rest probably covered by other > workqueues. And this feels a lot less error prone than requiring > every driver to annotate the context in their submission routines. I think it'd be much better to add a DEBUG protected aid that checks for violating allocations. Nothing that isn't buggy should trigger this, right now, and then we could catch problems if there are any. If we do the save/restore there and call it good, then we're going to be stuck with that forever. Regardless of whether it's actually needed or not. -- Jens Axboe