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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 A7A86C47425 for ; Fri, 2 Oct 2020 13:41:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 45C3C206E3 for ; Fri, 2 Oct 2020 13:41:32 +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="iexghG7s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45C3C206E3 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 9C30A6B006C; Fri, 2 Oct 2020 09:41:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9733A6B006E; Fri, 2 Oct 2020 09:41:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8398B6B0070; Fri, 2 Oct 2020 09:41:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0168.hostedemail.com [216.40.44.168]) by kanga.kvack.org (Postfix) with ESMTP id 546BC6B006C for ; Fri, 2 Oct 2020 09:41:31 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id F0DF4181AE878 for ; Fri, 2 Oct 2020 13:41:30 +0000 (UTC) X-FDA: 77327097540.08.cats17_250c916271a4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id CB3AD1819E764 for ; Fri, 2 Oct 2020 13:41:30 +0000 (UTC) X-HE-Tag: cats17_250c916271a4 X-Filterd-Recvd-Size: 3799 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Fri, 2 Oct 2020 13:41:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=YAy0v19KwKZlKr9ru/zVpzMUsVTEeJ2e3pekJyodo14=; b=iexghG7snc7QxKkez1o5os1/3C VMsVigSDzAim81w0WG62063q1/2M6oleyQVttaq/DwGZpvUko1TAcHMiTc7Y71fOc776brlCHNpL9 TF/rDja+6ZlYfSRQyLAmdcF816yQQD7Gh4cjTtX9zkHPhiQblkCbSro/WbJRcAl55o/FbkG8U4+cK ODEbYlsH/oL9/v8WuT6CkyJmXG3JPi8Quc8roDPCf51ax85lpPy9eX0zXlMe9YyE+ArPm6I6HfE9l /uwdBF13nEBfPVG49VpiveihT4b0xj7wbQ3rHDVvRI8ViBmr5WRPZYCia8pMZ2UvYjRxjqdaMXw/s NITHbeMw==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kOLJG-0008Pc-Cw; Fri, 02 Oct 2020 13:41:18 +0000 Date: Fri, 2 Oct 2020 14:41:18 +0100 From: Matthew Wilcox To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-hyperv@vger.kernel.org, xen-devel@lists.xenproject.org, linux-acpi@vger.kernel.org, Andrew Morton , Alexander Duyck , Vlastimil Babka , Oscar Salvador , Mel Gorman , Michal Hocko , Dave Hansen , Wei Yang , Mike Rapoport Subject: Re: [PATCH v1 1/5] mm/page_alloc: convert "report" flag of __free_one_page() to a proper flag Message-ID: <20201002134118.GA20115@casper.infradead.org> References: <20200928182110.7050-1-david@redhat.com> <20200928182110.7050-2-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200928182110.7050-2-david@redhat.com> 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 Mon, Sep 28, 2020 at 08:21:06PM +0200, David Hildenbrand wrote: > Let's prepare for additional flags and avoid long parameter lists of bools. > Follow-up patches will also make use of the flags in __free_pages_ok(), > however, I wasn't able to come up with a better name for the type - should > be good enough for internal purposes. > +/* Free One Page flags: for internal, non-pcp variants of free_pages(). */ > +typedef int __bitwise fop_t; That invites confusion with f_op. There's no reason to use _t as a suffix here ... why not free_f? > +/* > + * Skip free page reporting notification for the (possibly merged) page. (will > + * *not* mark the page reported, only skip the notification). ... Don't you mean "will not skip marking the page as reported, only skip the notification"? *reads code* No, I'm still confused. What does this sentence mean? Would it help to have a FOP_DEFAULT that has FOP_REPORT_NOTIFY set and then a FOP_SKIP_REPORT_NOTIFY define that is 0? > -static inline void __free_one_page(struct page *page, > - unsigned long pfn, > - struct zone *zone, unsigned int order, > - int migratetype, bool report) > +static inline void __free_one_page(struct page *page, unsigned long pfn, > + struct zone *zone, unsigned int order, > + int migratetype, fop_t fop_flags) Please don't over-indent like this. static inline void __free_one_page(struct page *page, unsigned long pfn, struct zone *zone, unsigned int order, int migratetype, fop_t fop_flags) reads just as well and then if someone needs to delete the 'static' later, they don't need to fiddle around with subsequent lines getting the whitespace to line up again.