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=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 E1DB6C2BA83 for ; Thu, 13 Feb 2020 14:30:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 72A2920873 for ; Thu, 13 Feb 2020 14:30:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="QXUdB0/6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72A2920873 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CE9366B0553; Thu, 13 Feb 2020 09:30:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C9A646B0555; Thu, 13 Feb 2020 09:30:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B93336B0556; Thu, 13 Feb 2020 09:30:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0144.hostedemail.com [216.40.44.144]) by kanga.kvack.org (Postfix) with ESMTP id 9C33F6B0553 for ; Thu, 13 Feb 2020 09:30:13 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 398A8180AD807 for ; Thu, 13 Feb 2020 14:30:13 +0000 (UTC) X-FDA: 76485338706.12.honey66_1eda1dd1b012f X-HE-Tag: honey66_1eda1dd1b012f X-Filterd-Recvd-Size: 2434 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Thu, 13 Feb 2020 14:30:11 +0000 (UTC) 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; bh=KTXaMIDU0VI58k/CHPXmfgCSDh5X+93IZYgYYvIbxGE=; b=QXUdB0/6AYsObrEOZa7o4zPxjv UC2iUMIw08PUkLzXQ1OQAtizLfmmBWEkBW/lGlqfp7M0pym9jVcl7kZK/ic6rltzWi8GT5JzjmOlB xkqeUwFBAMD+Pf7pV6M2+XgBCL8C46dw966pg6hG+xm1EZ36yaMzhKmOkodRVxrPXzy8rDs2jaQjg VRdAFafSYz/LKKI4xNk0NB1RTHg+ta/h30n5fao/Su7dOFGe2C2LZb6a1Mo733D4OrFUUEedegjea V1nCfMOeF0/bPJ7k0/cRQEvadIZH8n7Uzkan1jx3F/UFGmz4Os4ZX2y3a3IYTDMgoipisXgBY450w GdED8D/Q==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2FVF-00084J-Mh; Thu, 13 Feb 2020 14:30:05 +0000 Date: Thu, 13 Feb 2020 06:30:05 -0800 From: Matthew Wilcox To: "Kirill A. Shutemov" Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 06/25] mm: Allow hpages to be arbitrary order Message-ID: <20200213143005.GL7778@bombadil.infradead.org> References: <20200212041845.25879-1-willy@infradead.org> <20200212041845.25879-7-willy@infradead.org> <20200213141107.ftfnenli72eburei@box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200213141107.ftfnenli72eburei@box> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Feb 13, 2020 at 05:11:07PM +0300, Kirill A. Shutemov wrote: > On Tue, Feb 11, 2020 at 08:18:26PM -0800, Matthew Wilcox wrote: > > From: "Matthew Wilcox (Oracle)" > > > > Remove the assumption in hpage_nr_pages() that compound pages are > > necessarily PMD sized. The return type needs to be signed as we need > > to use the negative value, eg when calling update_lru_size(). > > But should it be long? > Any reason to use macros instead of inline function? Huh, that does look like a bit of a weird change now you point it out. I'll change it back: static inline int hpage_nr_pages(struct page *page) { - if (unlikely(PageTransHuge(page))) - return HPAGE_PMD_NR; - return 1; + return compound_nr(page); }