Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1175477pxb; Wed, 4 Nov 2020 01:53:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwhzXzgOGEXbBuYwCiAMl39xuX4KxfWcXanETKeIzxq01mekNUPYThhg0d1AN2tw3vSjcWr X-Received: by 2002:a05:6402:22c6:: with SMTP id dm6mr5184324edb.139.1604483591072; Wed, 04 Nov 2020 01:53:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604483591; cv=none; d=google.com; s=arc-20160816; b=uZzrNyzDL+Yi5pD51U87V5RAd5t4EyXUMkCjDdY9slzEx4KYigRACOnRm26IeGNz2m 6iHOh1Pe1KnuFe0r+k2sgrdmToCcuGKokpasB3n7wuiBjWV0T2qBI6zstaX9oimtmgTX Jhl6mMXCoWgaIIfT7tksWHYD7mAeRzOk55v/tNxykXqjhlXZfpv4dXjj+qVCKMiArBdX sHip5xv9N8ebeC9GBj7MOtBDVdl+TYBC/OlhX1+ahImgceN47etMlxbOTF5n1BwQqXPw /Gr2iBLiTw5HNqEmf5UXmfrHiGCHoO+QEf7SpCD5mMJ7k1hF7yB8jrIfae3e7CDXLAFB hR2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=QbvSQ5oazLhr/w+xUBtLWqF4fm76jJhtkAgydtvl5n8=; b=gwSNgMacEICWyebmYA6oyGh2cbYlk4E58kmHlfXm9WVIPzx9tHGI0+LYlmAB1yMD7x YEAdJFzTyIme3Twh8b91t4kUFqGzoqUqr4G5lcaiKK/ziA7EEvZda/4+eyp2LKyzQkZH xBzK+2Nhg0FobSrBOd032YM6tTTRmDTvRcKdX9IjxnAMR1Ht9nxtO7H3sZ/YLwObCFPl Oqm+ZGlP7FGduIApnjcmttrDmJAkHZOr634uPic1n3ldMhAmuPCMrqprU9oJFvp0drOl 8ffpVBV4hewbmNsIC/o6fOz+l02Q4jHSXBg3f67g7RGu3yLUQs4s3TijJ/1wwwi9T0UK 2DDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e14si1119229ejb.495.2020.11.04.01.52.37; Wed, 04 Nov 2020 01:53:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726434AbgKDJwc (ORCPT + 99 others); Wed, 4 Nov 2020 04:52:32 -0500 Received: from mx2.suse.de ([195.135.220.15]:43596 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726029AbgKDJwc (ORCPT ); Wed, 4 Nov 2020 04:52:32 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 79944AFB5; Wed, 4 Nov 2020 09:52:30 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id C4AD31E1305; Wed, 4 Nov 2020 10:52:29 +0100 (CET) Date: Wed, 4 Nov 2020 10:52:29 +0100 From: Jan Kara To: harshad shirwadkar Cc: Jan Kara , Ext4 Developers List , "Theodore Y. Ts'o" Subject: Re: [PATCH 02/10] ext4: mark fc ineligible if inode gets evictied due to mem pressure Message-ID: <20201104095229.GA5600@quack2.suse.cz> References: <20201031200518.4178786-1-harshadshirwadkar@gmail.com> <20201031200518.4178786-3-harshadshirwadkar@gmail.com> <20201103141331.GF3440@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue 03-11-20 10:33:47, harshad shirwadkar wrote: > On Tue, Nov 3, 2020 at 6:13 AM Jan Kara wrote: > > > diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c > > > index b96a18679a27..52ff71236290 100644 > > > --- a/fs/ext4/inode.c > > > +++ b/fs/ext4/inode.c > > > @@ -327,6 +327,7 @@ void ext4_evict_inode(struct inode *inode) > > > ext4_xattr_inode_array_free(ea_inode_array); > > > return; > > > no_delete: > > > + ext4_fc_mark_ineligible(inode->i_sb, EXT4_FC_REASON_MEM_CRUNCH); > > > ext4_clear_inode(inode); /* We must guarantee clearing of inode... */ > > > } > > > > This will make fs ineligible on every inode reclaim. Even if the inode was > > clean, not part of any FC. I guess this is too aggressive... > Right, I missed that, so first checking if the inode is on FC list and > then marking the FS as ineligible should suffice? Yes, that looks good to me. Honza -- Jan Kara SUSE Labs, CR