Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1181692pxf; Fri, 12 Mar 2021 04:03:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAI05VbD+Uc4X78dItUh/XECE3IDd4PvESnBc/sd7ydNnI2ePXvOKciyurYWkWb/wA2EP3 X-Received: by 2002:a17:906:38da:: with SMTP id r26mr8329949ejd.251.1615550595308; Fri, 12 Mar 2021 04:03:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615550595; cv=none; d=google.com; s=arc-20160816; b=hFP6dTsP2IiTo9Eack5KC0GNSLFBqOAcT7ep8mfZ2Qh/LAFDJDXo+PxkaugYDB839N HAZLZxyo66dZW9PIVv4ZlemlzmILASt3IuYMrfADziG72/j9VsW215uQLEeKTcZ1+C63 S/m7mOOcSy+0vXpqd4yrUypTshtrVzysXbcIye7X541Xgv56dVQ4pfHauyVCoTXT7j8o wCk2jjf+c60Z4kwEPOzc5AzbGAsrVyI0byKQrxa1W1IsRactiZirtI7615Pj3/ZeyU1a B4Icv2Pu8k00w23waGIpSTamLHudpOykX7XIB+gouRq6Y0EZp9NaxtSzfv/VkaZi+q9S uG8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=/YD6Q71Aksymyb9dGOjs1wIYzShPMYRZ/V0FzuY3l0I=; b=N2XoAGyLiTCUlgMN92tG3Hj2RD+c4ZSwqQPJNglwFY1zYDMiRFL33+eUnSvAprpliX mhBtiMRaR8YPTcEtQ6O5HQq+p0tHgqicvU0yGWpvSsHsi6SXg0ojAly10ke8cY8adIoO /hOMMlK4rMFVQkEj3MyUigBN5kPEisJdT317VyR2cgLC3h0aFvb6iy17eNH8G47ir5+3 qwx9qopDyG3eZnPWGSGEilYVaja+lSfBtFhY49Sp2pgwbH3QdBfDYWFb/2j1/rwrMK3u wu9rrvBgoBqohyJOGRO6qFZ8WkZwJFYw4IuFNviTdxZ+8pSif+hYjbd1viDXzsRj19MQ QyFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LpbC3R8Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h13si3780277edq.173.2021.03.12.04.02.52; Fri, 12 Mar 2021 04:03:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LpbC3R8Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229799AbhCLMBu (ORCPT + 99 others); Fri, 12 Mar 2021 07:01:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:21285 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231741AbhCLMB1 (ORCPT ); Fri, 12 Mar 2021 07:01:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615550486; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/YD6Q71Aksymyb9dGOjs1wIYzShPMYRZ/V0FzuY3l0I=; b=LpbC3R8QKZ1iaXO+uHrU1JSWRgL2AhJFIR093tBbYEJRC2KZ3zJt6i/MZ+Voah8A+UibVZ lfN6Y4da+aJbkjXHY5+OpFsYFNoQMmOum8fqrpwnvMaEN9wv4CL/pIBoJBDcRUSSBwbrkb pYyf0GOtHmwEhNEKRB7ZPIHiciHlM6Q= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-112-FaWDElQNOj-6zJZCRj3vow-1; Fri, 12 Mar 2021 07:01:24 -0500 X-MC-Unique: FaWDElQNOj-6zJZCRj3vow-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CF313D6809; Fri, 12 Mar 2021 12:01:12 +0000 (UTC) Received: from carbon (unknown [10.36.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7A5CF5C1C4; Fri, 12 Mar 2021 12:01:10 +0000 (UTC) Date: Fri, 12 Mar 2021 13:01:08 +0100 From: Jesper Dangaard Brouer To: Mel Gorman Cc: Shay Agroskin , Andrew Morton , Chuck Lever , LKML , Linux-Net , Linux-MM , Linux-NFS , brouer@redhat.com Subject: Re: [PATCH 2/5] mm/page_alloc: Add a bulk page allocator Message-ID: <20210312130108.65b83747@carbon> In-Reply-To: <20210310113836.GQ3697@techsingularity.net> References: <20210301161200.18852-1-mgorman@techsingularity.net> <20210301161200.18852-3-mgorman@techsingularity.net> <20210310113836.GQ3697@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 10 Mar 2021 11:38:36 +0000 Mel Gorman wrote: > On Wed, Mar 10, 2021 at 01:04:17PM +0200, Shay Agroskin wrote: > > > > Mel Gorman writes: > > > > > > > > diff --git a/include/linux/gfp.h b/include/linux/gfp.h > > > index 8572a1474e16..4903d1cc48dc 100644 > > > --- a/include/linux/gfp.h > > > +++ b/include/linux/gfp.h > > > @@ -515,6 +515,10 @@ static inline int arch_make_page_accessible(struct > > > page *page) > > > } > > > #endif > > > +int __alloc_pages_bulk_nodemask(gfp_t gfp_mask, int preferred_nid, > > > + nodemask_t *nodemask, int nr_pages, > > > + struct list_head *list); > > > + > > > struct page * > > > __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, int > > > preferred_nid, > > > nodemask_t *nodemask); > > > @@ -525,6 +529,14 @@ __alloc_pages(gfp_t gfp_mask, unsigned int order, > > > int preferred_nid) > > > return __alloc_pages_nodemask(gfp_mask, order, preferred_nid, NULL); > > > } > > > +/* Bulk allocate order-0 pages */ > > > +static inline unsigned long > > > +alloc_pages_bulk(gfp_t gfp_mask, unsigned long nr_pages, struct > > > list_head *list) > > > +{ > > > + return __alloc_pages_bulk_nodemask(gfp_mask, numa_mem_id(), NULL, > > > + nr_pages, list); > > > > Is the second line indentation intentional ? Why not align it to the first > > argument (gfp_mask) ? > > > > No particular reason. I usually pick this as it's visually clearer to me > that it's part of the same line when the multi-line is part of an if block. > > > > +} > > > + [...] > > > > Same indentation comment as before > > > > Again, simple personal perference to avoid any possibility it's mixed > up with a later line. There has not been consistent code styling > enforcement of what indentation style should be used for a multi-line > within mm/page_alloc.c Hi Shay, it is might be surprising that indentation style actually differs slightly in different parts of the kernel. I started in networking area of the kernel, and I was also surprised when I started working in MM area that the coding style differs. I can tell you that the indentation style Mel choose is consistent with the code styling in MM area. I usually respect that even-though I prefer the networking style as I was "raised" with that style. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer