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 86824C433EF for ; Wed, 9 Mar 2022 20:36:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E11C98D0002; Wed, 9 Mar 2022 15:36:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DC1898D0001; Wed, 9 Mar 2022 15:36:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C89238D0002; Wed, 9 Mar 2022 15:36:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.28]) by kanga.kvack.org (Postfix) with ESMTP id BAE048D0001 for ; Wed, 9 Mar 2022 15:36:58 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 8BFF520FEC for ; Wed, 9 Mar 2022 20:36:58 +0000 (UTC) X-FDA: 79226006916.05.254F8FC Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf19.hostedemail.com (Postfix) with ESMTP id 0C67B1A0011 for ; Wed, 9 Mar 2022 20:36:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646858217; 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: in-reply-to:in-reply-to:references:references; bh=tfvPp8T6sBDgCD/bU6cj7d0QWkoleA0xgC26OnRlcVg=; b=DFnyORrkX2X+Eql+9mvVqH3MWH77jFnVVNLrdmGGPVGWyO3G4/MpNUuWEHpZaSGnC/mwqL 9ScUv9uVclStWxSn29KBpZP58yjps7Pyy5IO1MQ7TLmH8JY64SCSflFLX4Qz8uJCkZRqYs zvV1GZEAav539D2zlGCmc2c8gEV+H0U= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-157-hS9mol6UOjSUzqYv2I70xg-1; Wed, 09 Mar 2022 15:36:56 -0500 X-MC-Unique: hS9mol6UOjSUzqYv2I70xg-1 Received: by mail-wm1-f72.google.com with SMTP id h131-20020a1c2189000000b003898de01de4so1226795wmh.7 for ; Wed, 09 Mar 2022 12:36:56 -0800 (PST) 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=tfvPp8T6sBDgCD/bU6cj7d0QWkoleA0xgC26OnRlcVg=; b=bVesH7zn4yg7p4M4KrCI6HvGZSK9P6eLyZ4gxYh7FEiLdrbsxxi4i/z3xHq0VzgwZW yRMRqE/hmIDCHkYbi1DbxwqI1imurqXwzOz/QTmw34GUTGBy+EzHfCyzccm6+yqUClMq I94E+p5tEsEfwAkff8i8PTxeLLJGf1Xj70mAUp5aL0M5u3L93y3AL9t9dgEZC9nk+8il ENuYssPHp3Lew2zdYKhK2IASnYb/snpVutYSUq61t8/I8pkNIb7vu3PVqf90WXdENFzT o0DBBK/FV8kF3GDhca+O0PlMoP8JgZGFv5AsLNu1sd2akvaqrIPnRGmHnroHxX5+u4yH dpZA== X-Gm-Message-State: AOAM530sxlHNLfTgxQDnkRbOCAMlK0+g4R+GBVc/le56ISxqVXTpNX91 ZhY1IHKrgOHFLkQBtqUBEMCM58KLyZ+f+EY+V+EeZSTBxa+s8VBVdqsKMdXqR6E5IRTFPJ66cqq vtSuRaaMYJzDekfbfsrHrfUK1tkw= X-Received: by 2002:a1c:e90a:0:b0:381:504e:b57d with SMTP id q10-20020a1ce90a000000b00381504eb57dmr8983124wmc.177.1646858215181; Wed, 09 Mar 2022 12:36:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxslNgqul7CsdHPFzrY6nugLgNmi6JeFFMtWCGzEmkIP6sbUIPjlerK4tjyTPW31RtVNkdst4BOmhD7u76G54o= X-Received: by 2002:a1c:e90a:0:b0:381:504e:b57d with SMTP id q10-20020a1ce90a000000b00381504eb57dmr8983106wmc.177.1646858214930; Wed, 09 Mar 2022 12:36:54 -0800 (PST) MIME-Version: 1.0 References: <20220309184238.1583093-1-agruenba@redhat.com> In-Reply-To: From: Andreas Gruenbacher Date: Wed, 9 Mar 2022 21:36:43 +0100 Message-ID: Subject: Re: Buffered I/O broken on s390x with page faults disabled (gfs2) To: Linus Torvalds Cc: Catalin Marinas , David Hildenbrand , Alexander Viro , linux-s390 , Linux-MM , linux-fsdevel , linux-btrfs X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 0C67B1A0011 X-Stat-Signature: apne9j8xgwrwpjjjp743bwjixnx4jaqo X-Rspam-User: Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=DFnyORrk; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf19.hostedemail.com: domain of agruenba@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=agruenba@redhat.com X-Rspamd-Server: rspam03 X-HE-Tag: 1646858217-551451 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 9:19 PM Linus Torvalds wrote: > On Wed, Mar 9, 2022 at 11:35 AM Andreas Gruenbacher wrote: > > > > That's better, thanks. > > Ok, can you give this one more test? > > It has that simplified loop, but it also replaced the > FAULT_FLAG_KILLABLE with just passing in 'unlocked'. > > I thought I didn't need to do that, but the "retry" loop inside > fixup_user_fault() will actually set that 'unlocked' thing even if the > caller doesn't care whether the mmap_sem was unlocked during the call, > so we have to pass in that pointer just to get that to work. > > And we don't care if mmap_sem was dropped, because this loop doesn't > cache any vma information or anything like that, but we don't want to > get a NULL pointer oops just because fixup_user_fault() tries to > inform us about something we don't care about ;) It's a moot point now, but I don't think handle_mm_fault would have returned VM_FAULT_RETRY without FAULT_FLAG_ALLOW_RETRY, so there wouldn't have been any NULL pointer accesses. > That incidentally gets us FAULT_FLAG_ALLOW_RETRY too, which is > probably a good thing anyway - it means that the mmap_sem will be > dropped if we wait for IO. Not likely a huge deal, but it's the > RightThing(tm) to do. Looking good. > So this has some other changes there too, but on the whole the > function is now really quite simple. But it would be good to have one > final round of testing considering how many small details changed.. Sure, we'll put it through all our tests. Thanks, Andreas