Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1421496pxy; Fri, 23 Apr 2021 07:42:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6BP4R1C29kSJczNJQ0CXHYb0I7T3HC1cXvO6/HwdbgE0o7AaocionS94LxE1D1/OL7OTv X-Received: by 2002:a63:40c1:: with SMTP id n184mr4056627pga.219.1619188973097; Fri, 23 Apr 2021 07:42:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619188973; cv=none; d=google.com; s=arc-20160816; b=t/UCaRnHGz8g5QgBLvuIld1pV43o66mhAMt07NRyUbEv+74HT4g6c5b7RWve637ezo VLYZLM9TUY5g2ghDmw0K9D/JD2hR8hRihrHnStaTtt5sUz9/GkzRmNX2nEJb2Aod1lTG CFnyJ3YPz0vD2gCG1s0vMgv9qojXJeHNbIpjJbxUkctNaeXJux/hdhpzqmG6fwOgwoCb YFuLQT1CLr+SsHCzcK6JgkYbjnmjxTiH/BOPnpJKXzZlj94pVP6O3p85zYxy1mljzHJ+ GDbGpZE+EqaVydGCpaScJQjPQUCcqPTnXYwCcZ1G9MnBUlDet3ykIkYNpGVo7Vmk4Gzv 8b8w== 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; bh=kXw5/5r60rG9pDF4ouHzJqnHQEsbS6ce3ewV/Bi5p7Y=; b=u/TS5gfOTeDwqC90l5p5xY5klzy94c7xTlFn9ppq0RwzQ4UXWm9vZw7Fe8o+jFpC14 j1Ahz75CyAlIhwFqhI5Tsg/iOqi0Fwv1zd7JUqo4HbzVFwSvJ8CebmHjn2btR/nesAwV N3YPqK5QbcjaRSZyFdbxJVHRbk5Km7fJtqXtYU8FDkYaf4NW+j7990iayosBca+mo3EQ qrWih7R/c6cVSFxjcmmrKvIwCe3jbbsTGDdXwWceH3bj5jbTt0zX0WhQT+v/GMzEZ0dm qQiE8CvdeBDk7etL+K34IdCE7Dzi4/Y6MUhDglLX5JB+7SiYEK89GkXUD+5DtJpdLjxm ucSg== 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 m17si7051075pgv.194.2021.04.23.07.42.40; Fri, 23 Apr 2021 07:42:53 -0700 (PDT) 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 S231383AbhDWOmC (ORCPT + 99 others); Fri, 23 Apr 2021 10:42:02 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:40274 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230416AbhDWOmB (ORCPT ); Fri, 23 Apr 2021 10:42:01 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 13NEeckv032357 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Apr 2021 10:40:39 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 8FF8315C3B0D; Fri, 23 Apr 2021 10:40:38 -0400 (EDT) Date: Fri, 23 Apr 2021 10:40:38 -0400 From: "Theodore Ts'o" To: Jan Kara Cc: Christoph Hellwig , Zhang Yi , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, adilger.kernel@dilger.ca, yukuai3@huawei.com Subject: Re: [RFC PATCH v2 7/7] ext4: fix race between blkdev_releasepage() and ext4_put_super() Message-ID: References: <20210414134737.2366971-1-yi.zhang@huawei.com> <20210414134737.2366971-8-yi.zhang@huawei.com> <20210415145235.GD2069063@infradead.org> <20210420130841.GA3618564@infradead.org> <20210421134634.GT8706@quack2.suse.cz> <20210422090410.GA26221@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210422090410.GA26221@quack2.suse.cz> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Apr 22, 2021 at 11:04:11AM +0200, Jan Kara wrote: > Yes, I understand that. What I was more asking about is: Does it really > matter we leave those buffer heads and journal heads unreclaimed. I > understand it could be triggering premature OOM in theory but is it a > problem in practice? Was there some observed practical case for which this > was added or was it just added due to the theoretical concern? I was doing some research, and found the mail thread which inspired bdev_try_to_free_page(): https://lore.kernel.org/linux-ext4/20081202200647.72cc5807.toshi.okajima@jp.fujitsu.com/ From what I can tell Toshi Okajima did have a test workload which would trigger blkdev_releasepage(). He didn't specify it in the mail thread as near as I can tell, but he did use it to test the page. Thinking about it, it shouldn't be hard to trigger it via something like: find /mnt -print0 | xargs -0 touch in a memory contrained box with a large file system attached (a bookshelf NAS scenario). Under the right circumstances, I'm pretty sure a premature OOM could be demonstrated. - Ted