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 X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE156C433E0 for ; Wed, 10 Jun 2020 15:54:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 90C87206F4 for ; Wed, 10 Jun 2020 15:54:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728527AbgFJPy6 (ORCPT ); Wed, 10 Jun 2020 11:54:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:42498 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728431AbgFJPy5 (ORCPT ); Wed, 10 Jun 2020 11:54:57 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6512FAD09; Wed, 10 Jun 2020 15:55:00 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 5BB501E1283; Wed, 10 Jun 2020 17:54:56 +0200 (CEST) Date: Wed, 10 Jun 2020 17:54:56 +0200 From: Jan Kara To: Christoph Hellwig Cc: Jan Kara , linux-fsdevel@vger.kernel.org, Ted Tso , Martijn Coenen , tj@kernel.org Subject: Re: [PATCH 2/3] writeback: Fix sync livelock due to b_dirty_time processing Message-ID: <20200610155456.GB20677@quack2.suse.cz> References: <20200601091202.31302-1-jack@suse.cz> <20200601091904.4786-2-jack@suse.cz> <20200610150614.GB21733@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200610150614.GB21733@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed 10-06-20 08:06:14, Christoph Hellwig wrote: > On Mon, Jun 01, 2020 at 11:18:56AM +0200, Jan Kara wrote: > > When we are processing writeback for sync(2), move_expired_inodes() > > didn't set any inode expiry value (older_than_this). This can result in > > writeback never completing if there's steady stream of inodes added to > > b_dirty_time list as writeback rechecks dirty lists after each writeback > > round whether there's more work to be done. Fix the problem by using > > sync(2) start time is inode expiry value when processing b_dirty_time > > list similarly as for ordinarily dirtied inodes. This requires some > > refactoring of older_than_this handling which simplifies the code > > noticeably as a bonus. > > Looks sane, but if you touch all the older_than_this users can we > rename it to something more reasonable like oldest or oldest_jif? OK, I can certainly rename this. I've just realized that 'oldest' is really misleading since we are in fact processing inodes that were dirtied before the given time. So maybe name that 'dirtied_before'? Honza -- Jan Kara SUSE Labs, CR