From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:38208 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758443AbcDMBtx (ORCPT ); Tue, 12 Apr 2016 21:49:53 -0400 Subject: Re: [PATCH 0/3] writeback: minor tweaks To: Dave Chinner References: <1460486633-26099-1-git-send-email-axboe@fb.com> <20160413000857.GB10643@dastard> CC: , , From: Jens Axboe Message-ID: <570DA5B9.3000507@fb.com> Date: Tue, 12 Apr 2016 19:49:45 -0600 MIME-Version: 1.0 In-Reply-To: <20160413000857.GB10643@dastard> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 04/12/2016 06:08 PM, Dave Chinner wrote: > On Tue, Apr 12, 2016 at 12:43:50PM -0600, Jens Axboe wrote: >> Hi, >> >> Three top level patches out of the writeback throttling patchset, that >> I think should make it into mainline. No functional changes in the >> first two patches, and the last patch just bumps reclaim/sync >> writeback to use WRITE_SYNC as a hint to the block layer. > > Whatever happened to adding a new flag to indicate that write > requests can be throttled, rather than overloading WRITE_SYNC with > yet another (conflicting) meaning? WRITE_SYNC means someone will be waiting for it. This just extends it to cover more instances where that is the case (reclaim, for_sync). For background writes, we'll want to split WRITE into WRITE and WRITE_BACKGROUND. Alternatively, I can stop extending WRITE_SYNC for the other parts, and only do the background part. But I think those parts makes sense. > I've already pointed out the problems associated with tagging async, > bulk writes as synchronous writes so that a lower layer can avoid I think that's our miscommunication. It's not my intent to tag async writes as sync. If we're doing reclaim, presumable someone is waiting for those pages to be cleaned. Hence sync. Ditto for for_sync. > throttling them. Please add a new flag for communicating whether > writes can be throttled to the block layer instead of reusing > WRITE_SYNC. If someone is waiting for them, they won't be throttled as hard (WRITE_SYNC, WRITE_ODIRECT, etc). If someone is not waiting for them (WRITE), then we can throttle a bit more. That's my intent. We can add WRITE_BACKGROUND, but then we have one more write type. Why not just leave WRITE as the background type of write? -- Jens Axboe