Received: by 10.223.164.202 with SMTP id h10csp3687379wrb; Sat, 25 Nov 2017 14:36:32 -0800 (PST) X-Google-Smtp-Source: AGs4zMaXZOlJEMZgfuOGJvdGpQO9+fBi/O4jixW1CO3vQY7FLETlR5P4n23Lvb+oAjmoMHS0nq6d X-Received: by 10.84.130.41 with SMTP id 38mr33343049plc.387.1511649392361; Sat, 25 Nov 2017 14:36:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511649392; cv=none; d=google.com; s=arc-20160816; b=N0FrINx/52CQuIxRLt7SslRkoBUfhRNKV/5ZxwL2ASeAc1yqrBy2IZnlCGp54herf8 m76QtvigDOrk7BE9t/YnNPYiqpFxeRMhZkVQMPSXQy+xJ1o3NE9BbOw1WyyDQHN9Xpcb bOlFzu9Fpt13Z5hv2tEwdeeCRYMpc2HD/Tf7vvepZimwv1ejPUeG8QuFYHENqA72waWO 1p2lZKfmdF/8DmA+l2O22gKfgslOlog0yVvemlDWNit/LdtdFCIkZGFcyJHBoNlTIVoW mOlEsBVxQ3O2wRWO10XNWt8vUpLk0wX72gubs0kPteRzV8RWRX4FxQyAVOFZJ8vumHDr 1FRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization :arc-authentication-results; bh=OTSGT4duvQCMy03StYlv9kfe0qrruCbTTBRzU99jrVI=; b=PPjYgRxaN9KVsoNQjuzjH9jNV4ux8S8b8frGBwyQ6MNv51vK2LVa7RQvPENvjXFHmc A090bMJm/+tzaHTcULkUwzBU0V55xGuR2/UQwqaqcNOEtVKvv0kiFSqewIz22Sb87mFn nLJWWmnBZB8dOwvAwlm5eEZ1BtxDWpib5aWg1paDmk30ry+J8Gx2PVLxL78/pL0FgXVX gPLkg8Hpz94bycNS0GYaFs2+bZW9AZw5ogGPbockWDLAOEYSeye7go/Svy1yHJ9xHKtY 3l9gLzlwQPebTyDYGVvdflBV3HngXQyWYHW8LkZfiEGiP6i9YlILgDNNYDw6F9lrchSU 1RQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 11si20742835plb.52.2017.11.25.14.36.20; Sat, 25 Nov 2017 14:36:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751692AbdKYWfq (ORCPT + 81 others); Sat, 25 Nov 2017 17:35:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39100 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751395AbdKYWfp (ORCPT ); Sat, 25 Nov 2017 17:35:45 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5F91E6A7C6; Sat, 25 Nov 2017 22:35:45 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-120-208.rdu2.redhat.com [10.10.120.208]) by smtp.corp.redhat.com (Postfix) with ESMTP id 762C8605B2; Sat, 25 Nov 2017 22:35:44 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <26247.1511533324@warthog.procyon.org.uk> To: Linus Torvalds Cc: dhowells@redhat.com, linux-afs@vger.kernel.org, linux-fsdevel , Linux Kernel Mailing List Subject: Re: [GIT PULL] afs: Fixes MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23133.1511649343.1@warthog.procyon.org.uk> Date: Sat, 25 Nov 2017 22:35:43 +0000 Message-ID: <23134.1511649343@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sat, 25 Nov 2017 22:35:45 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds wrote: > So I see in the commit message why afs needs to do this, but it's > worth pointing out that it's > > (a) impossible to avoid the "inconsistent data" case for writable mmap'ed > pages Doesn't clear_page_dirty_for_io() write-protect the PTE for the page to be written out, in which case ->page_mkwrite() will get called again before the page is redirtied? > (b) can cause some really nasty latency issues True, but I think the most common case is a file being opened, written start to finish and then closed. Actually, the worst-handled thing I've seen is a shell script appending a bunch of things to a file because ->flush() syncs the file each time it is closed:-/ What would you recommend instead? I'm currently trying and keep track of what needs to be written so that I only write what's changed to the server, rather than writing only whole pages. David From 1585062261113906907@xxx Sat Nov 25 18:06:08 +0000 2017 X-GM-THRID: 1584957627109406089 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread