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 0CDA1C433F5 for ; Wed, 9 Mar 2022 20:55:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7E3F68D0002; Wed, 9 Mar 2022 15:55:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7925E8D0001; Wed, 9 Mar 2022 15:55:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 633238D0002; Wed, 9 Mar 2022 15:55:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 552718D0001 for ; Wed, 9 Mar 2022 15:55:18 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 2E05060E9B for ; Wed, 9 Mar 2022 20:55:18 +0000 (UTC) X-FDA: 79226053116.10.1A319C8 Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) by imf07.hostedemail.com (Postfix) with ESMTP id 7D98F4000E for ; Wed, 9 Mar 2022 20:55:17 +0000 (UTC) Received: by mail-lj1-f177.google.com with SMTP id 25so4961524ljv.10 for ; Wed, 09 Mar 2022 12:55:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1bcy1f96gz5DOfDjysAb1zu3cyQLaBT/MRqS63v2E8I=; b=HuhGkeK5Ax0l2g8f3/ZOEcuWQLabru0yBo4ttRCDmj0RcqKtz3ZUVaVLY1qklVIkSb sJXJZE4lYyo8vwtAh7nXgTRKAmiM62TiA9y3Vgm4oVeD96UK4y4pIDYlBeHKKACnV0uD rg4f7RRavY66vPc2Rk++aFQ/GGv88Akm6CMX8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1bcy1f96gz5DOfDjysAb1zu3cyQLaBT/MRqS63v2E8I=; b=Upf1V9oW0A14S89dSsOjIYDeNmF/wcOZn729KONgJAcPgLiOdG6YOF7f/Q1OepZsw8 7FMZUvlcv0+7N99uk+AoIPUBUCiyUJKsoYB9aDAW32i88PH7FXpBbKDreNlGbZ/KXZzR crH0j2zHeKOx4KZqHMmX8l+VIOPna+BBtj+/lT7x41zGOtfpQYq6TXQ0+vfTrUBonMIb 93ole0+1AiYbD7Rrj6Q27RdQKeouvgNyMxxZgZIESupkYebWggOJULCSSVgmd35wMA8e /sKckPaNbIx18cnZNjIymIG95Mw4Gih2CVt3QbHdiGJeYtdp5c6DhDuDfLu2Ig/JDHn8 5aJQ== X-Gm-Message-State: AOAM532PIr3++tIS6rZwISUJufOz9wYXI+dcD5M1RK2+ETG8sVNm5gX2 XPhxZYyR49uhftvBNLpOxgMFXCS38RK0LHYN7Wc= X-Google-Smtp-Source: ABdhPJw+yJU/sRf2x29loogSgg4NkD+cCduMhP2Sqo2EzXRgvY8pzAybOgO2baM9deI/lxYxKVYx0w== X-Received: by 2002:a2e:2f0e:0:b0:246:1a59:8f04 with SMTP id v14-20020a2e2f0e000000b002461a598f04mr917768ljv.409.1646859315603; Wed, 09 Mar 2022 12:55:15 -0800 (PST) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com. [209.85.208.173]) by smtp.gmail.com with ESMTPSA id u7-20020ac25bc7000000b0044835d267c0sm580309lfn.84.2022.03.09.12.55.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Mar 2022 12:55:12 -0800 (PST) Received: by mail-lj1-f173.google.com with SMTP id 25so4961301ljv.10 for ; Wed, 09 Mar 2022 12:55:12 -0800 (PST) X-Received: by 2002:a05:651c:19a9:b0:247:e199:4364 with SMTP id bx41-20020a05651c19a900b00247e1994364mr896569ljb.164.1646859312017; Wed, 09 Mar 2022 12:55:12 -0800 (PST) MIME-Version: 1.0 References: <20220309184238.1583093-1-agruenba@redhat.com> In-Reply-To: From: Linus Torvalds Date: Wed, 9 Mar 2022 12:54:55 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Buffered I/O broken on s390x with page faults disabled (gfs2) To: Andreas Gruenbacher Cc: Catalin Marinas , David Hildenbrand , Alexander Viro , linux-s390 , Linux-MM , linux-fsdevel , linux-btrfs Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 7D98F4000E X-Stat-Signature: 971d9bzwmqtiytmuc4a5npge8xc8pfb6 Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=HuhGkeK5; spf=pass (imf07.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.208.177 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org; dmarc=none X-Rspam-User: X-HE-Tag: 1646859317-634324 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Mar 9, 2022 at 12:48 PM Linus Torvalds wrote: > > Basically FAULT_FLAG_KILLABLE implies a kind of "half-way ALLOW_RETRY" > - allow aborting, but only for the fatal signal case. Side note: I'm not saying this is a *good* thing - it is very confusing - but it's due to historical reasons where architectures ended up getting these features incrementally. So FAULT_FLAG_KILLABLE was one such half-way step, where you could abort things without actually retrying them, because a fatal signal could be handled without then repeating things. These days, I think all architectures have converted their actual fault handling to the full "retry/abort/error/success" spectrum, but then you still have other uses of handle_mm_fault() that may not be willing to have mmap_sem be dropped in the middle of operations because they keep a 'vma' list around or something like that. And then FAULT_FLAG_KILLABLE can still be a good way to say "ok, I'm willing to _abort_ things entirely, but you can't drop the mmap sem and ask me to recover if it's not fatal". And this is all entirely due to historical behavior, since _originally_ handle_mm_fault() wouldn't ever drop mmap_sem at all. These days it would probably be simpler to *not* have all these complicated special cases, and just say that FAULT_FLAG_ALLOW_RETRY is always true. But then somebody would have to walk through every user to make sure it's ok... Linus