Received: by 2002:a05:6358:795:b0:dc:4c66:fc3e with SMTP id n21csp962629rwj; Sat, 29 Oct 2022 14:07:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM56lcj2LlHGhvwCYuLM1abDGRLE6CQIih7EHCx1WtUsNDUcfW0B3fNj/DkN+wxCaktmmcnk X-Received: by 2002:a17:906:5d04:b0:722:f46c:b891 with SMTP id g4-20020a1709065d0400b00722f46cb891mr5337237ejt.4.1667077648041; Sat, 29 Oct 2022 14:07:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667077648; cv=none; d=google.com; s=arc-20160816; b=lC1Na57ab7tVXUl5IrpDmUDFV7VbQsI0OWtl1WRmC8ObhrvbcGmP2DhLBFpBNVoTZQ jtX3Atzf7w92a+BEwO7kUMDyfxfkKwNOAV6nfcOA7CMVNBnc4SRcdGL2RzNz5P3kDfIA 1XZxiqpigmXxH+R9NUxpJ9oq3Mdpc2UnrVfqyHVNwT+s21ZE09Jp12LGZ19t35Tvuc35 0Ri073zLuTMmFqNFHMjvHrWnkAjWOisiM8FaxsbVI7GXf8nwyfsw7NWtWGbvW7Hcnf5L 3Z76uEPFwLcKfZbBldzb3l7a8GX05tomjiuiBqcQsQJuuvuf9k8tcHkiDIlzgBl4SgZl YEMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=EZKkqCeXaLZ8T9HRw8I9LaqHcaQSMf+IL4bg8ajaLlA=; b=v7nII9PoRJCRIYPWbaZwcT8ENfqdCaIRypv1L9nNV/dYSHqKA26diNfE/L/F4G5U/e rzza0QTAkWK7xnXzQV3Nbn//dbI9qtOUQ1O/+CwlKfxOdHLuliJw0wDK86TeTVLvEg6Q NWL+PUJqHPpINpDOuuGpa0J2lW8UX8TlN62qZMHeXxpvna8JTeZC7QkhZbC2UHg9DK4c qJQixYLvwWm9mWNJx5T0P23ipalHsDS7ny11HTovwHJga2qtaU9rhLWolBWvaEPJBGDK 4EiBiBwK1HRYsBPQvxG3NguOtnb7oET76/rj/hOXeOEQq0+J2oOA1H6Wko7rkNBHgEyQ Cmag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mit.edu header.s=outgoing header.b=KoosaJyX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa40-20020a1709076d2800b007aae0b30283si2964931ejc.691.2022.10.29.14.07.01; Sat, 29 Oct 2022 14:07:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mit.edu header.s=outgoing header.b=KoosaJyX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229711AbiJ2VA4 (ORCPT + 99 others); Sat, 29 Oct 2022 17:00:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229756AbiJ2VAk (ORCPT ); Sat, 29 Oct 2022 17:00:40 -0400 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A27D529CBA for ; Sat, 29 Oct 2022 14:00:38 -0700 (PDT) Received: from letrec.thunk.org ([142.44.75.242]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 29TKxXms024528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 29 Oct 2022 16:59:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1667077177; bh=EZKkqCeXaLZ8T9HRw8I9LaqHcaQSMf+IL4bg8ajaLlA=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=KoosaJyX9zI91btp1+85K5o0uLnH71GTcXpZSBZDpk8b5H7h6kosS66F3YxoZx4Gi hOVJ3m4IJavsFvBREuh97JJA27i8y/cTE/plnmn9v9cz6PUx0kRjvUH/5iesCB/HCN cauIMA+3IPh9edqP0VH08VGbdfOxp6HR0SdLG8LefJ9BdhQF677+EwFuHDFpHv0FMh ll0+Ez0otlvNHLVX1Dw9+AbPeFjih5XCvTh658w7Tpuk0dIaOrgM7YbWmRQ6PneIA0 iZ7Z5NU0FHqd7ckaIQ9aCmRkA832CDKASCRoS5oTm0qp5Z8/XOsJpd+htkUVXi9Nbm Did1wMpw2oVtQ== Received: by letrec.thunk.org (Postfix, from userid 15806) id 3AC608C29FD; Sat, 29 Oct 2022 16:59:30 -0400 (EDT) Date: Sat, 29 Oct 2022 16:59:30 -0400 From: "Theodore Ts'o" To: Linus Torvalds Cc: John Hubbard , Nadav Amit , Peter Zijlstra , Jann Horn , X86 ML , Matthew Wilcox , Andrew Morton , kernel list , Linux-MM , Andrea Arcangeli , "Kirill A . Shutemov" , jroedel@suse.de, ubizjak@gmail.com, Alistair Popple Subject: Re: [PATCH 01/13] mm: Update ptep_get_lockless()s comment Message-ID: References: <6C548A9A-3AF3-4EC1-B1E5-47A7FFBEB761@gmail.com> <47678198-C502-47E1-B7C8-8A12352CDA95@gmail.com> <3a57cfc5-5db4-bdc9-1ddf-5305a37ffa62@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 29, 2022 at 01:15:26PM -0700, Linus Torvalds wrote: > On Sat, Oct 29, 2022 at 12:39 PM John Hubbard wrote: > > > > ext4 has since papered over the problem, by soldiering on if it finds a > > page without writeback buffers when it expected to be able to writeback > > a dirty page. But you get the idea. > > I suspect that "soldiering on" is the right thing to do, but yes, our > 'mkdirty' vs 'mkclean' thing has always been problematic. > > ... > > (a) filesystems just deal with it It should be noted that "soldiering on" just means that the kernel will not crash or BUG. It may mean that the dirty page will not gotten written back (since at the time when it is discovered we are in a context we may not allocate memory or block if there is a need to allocate blocks if the file system uses delayed allocation). Furthermore, since the file system does not know that one or more pages have dirtied behind it's back, if the file system is almost full, some writes may silently fail --- including writes where the usesrspace application was implicitly promised that the write would succeed by having the write(2) system call return without errors. If people are OK with that, it's fine. Just don't complain to the file system maintainers. :-) - Ted P.S. The reason why this isn't an utter disaster is because normally users of remote RMA use preallocated and pre-written/initialized files. And there aren't _that_ many other users of gup. So long as this remains the case, we might be happy to let sleeping canines lie. Just please dear $DEITY, let's not have any additional users of gup until we have a better solution.