Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5070814imb; Thu, 7 Mar 2019 07:08:59 -0800 (PST) X-Google-Smtp-Source: APXvYqwHe8f6DWQkpfavIaW+qfWmlCDBcX4fcV/zdainfwvZJUFrZA4EW9isLMZtFbDOukcOlglg X-Received: by 2002:a17:902:ab95:: with SMTP id f21mr13659889plr.188.1551971339003; Thu, 07 Mar 2019 07:08:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551971338; cv=none; d=google.com; s=arc-20160816; b=wEaZqkU4Ufloz2Ov1uFQkVygVCZZkC5iou4z+WESgtEFfpJFadlJiCsyq71ieWKDD5 loQyMd37DqhXBoW84R7PeNxczYByeS6LZoNyk3wpSjTnCkHiug471lQZeQnPJFrAts9T p/OY2BsoGEiqfzttbgZjiM9G0r8lZzirfRYGFZ8zl5vWYZWeubvtXILcUX6TeGyjZcSx BezIZXrfSGBmeJ294HzUdIyQSdVwF9MzmJwZbVqV8t6ZuFLxw4WEee0WZjCiBk903X5o qY9h0JZU6XbPPLu0Ajo3vuHJqZhbpFz9D+mxu/+gPzpDkzDPrrsUT1zIkiVrbfGLED1Q PIZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qb+k4GhrBX2hxsqg3i9im3MoXFh0HQnNOWfXG9OtdlM=; b=ZtVKxbWUd2d8LqJUy9N7uPoXt2keMZKFlYCLwXTISuJ9UEJ05u1J0km7e8mdu064lU fuhoyKTjLFTrFOIpoDxZrUs3YJvX9zLlyBsr0hCVVEI5ae31SS3+rcHi3lmlkVrYH4YX Qf1tRBuQ9MXpJ9spBjkoeHvp1stlf45+EFaDdZLEkRno9WeEy/OZSCHhb7G9G92JC5v5 TNHLugbFhjJhDo7lMTdTGt/9lvX+3RSaQ6knCkjIGT4/glk4KuGufUrv0i6EuvjZ8nh3 YJkLQbsW9hle2d0fEXcphzHLbtWLTTpkyMkwa3UFRGoomfuRgucsNwP/3ODyLsumCH7X 19vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=hcf+6bUq; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d63si4441426pfg.40.2019.03.07.07.08.43; Thu, 07 Mar 2019 07:08:58 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=hcf+6bUq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726334AbfCGPGZ (ORCPT + 99 others); Thu, 7 Mar 2019 10:06:25 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:37740 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726224AbfCGPGZ (ORCPT ); Thu, 7 Mar 2019 10:06:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=qb+k4GhrBX2hxsqg3i9im3MoXFh0HQnNOWfXG9OtdlM=; b=hcf+6bUqLpzgnUybBrYqB2G8Z UmmQcyI+2HIvQ9/9P3mpkBnEdqombSYLvaqqgyJKyY89ZsAONGFwjRH8ebdUoaPTpiEH5w4+TcOTq RLivVxI3g6nzUUEQjhHl9fcEWv+qn52w7zxcRpTvi8AS5A/kJ8OejMz3AoxjUyhMQn4s40RTLlGWR Fdd8SchL2qZRJCRGTBQzaTMtRqfJA1YUGSz2v9QTcTRpvqMNmB0hm/PygVem4AOpBOHoDjhLKMkYx pgwhbailvbUIl9xKaqyEIofDgJdoWdYpmsHscFfvEKNfpGfDoT8eLSZ4QXy1ZnTlzpt/FuQ4DSNBG HvecyzSNA==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1ubI-00016F-1H; Thu, 07 Mar 2019 15:06:24 +0000 Date: Thu, 7 Mar 2019 07:06:23 -0800 From: Matthew Wilcox To: William Kucharski Cc: "Kirill A. Shutemov" , Linux-MM , linux-fsdevel@vger.kernel.org, open list , Hugh Dickins , Jan Kara , Song Liu Subject: Re: [PATCH v3] page cache: Store only head pages in i_pages Message-ID: <20190307150623.GL13380@bombadil.infradead.org> References: <20190215222525.17802-1-willy@infradead.org> <863F9255-E992-402F-827D-DA5F4661B9AB@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <863F9255-E992-402F-827D-DA5F4661B9AB@oracle.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 06, 2019 at 02:36:35AM -0700, William Kucharski wrote: > > Other than the bug Song found in memfd_tag_pins(), I'd like to suggest two quick > but pedantic changes to mm/filemap.c: > > Though not modified in this patch, in line 284, the parenthesis should be moved > to after the period: > > * modified.) The function expects only THP head pages to be present in the https://english.stackexchange.com/questions/6632/where-does-the-period-go-when-using-parentheses disagrees with you > > + * Move to the next page in the vector if this is a small page > > + * or the index is of the last page in this compound page). > > A few lines later, there is an extraneous parenthesis, and the comment could be a bit > clearer. > > Might I suggest: > > * Move to the next page in the vector if this is a PAGESIZE > * page or if the index is of the last PAGESIZE page within > * this compound page. > > You can say "base" instead of "PAGESIZE," but "small" seems open to interpretation. Agreed on the spurios close paren. The THP documentation prefers the term 'regular page', so I went with: * Move to the next page in the vector if this is a regular * page or the index is of the last sub-page of this compound * page. > I haven't run across any problems and have been hammering the code for over five days > without issue; all my testing was with transparent_hugepage/enabled set to > "always." > > Tested-by: William Kucharski > Reviewed-by: William Kucharski Thanks!