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=-5.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 B7F38C4740C for ; Mon, 9 Sep 2019 15:35:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 85EDA21924 for ; Mon, 9 Sep 2019 15:35:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="wHAxZhcK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388386AbfIIPfe (ORCPT ); Mon, 9 Sep 2019 11:35:34 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:34290 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726581AbfIIPfe (ORCPT ); Mon, 9 Sep 2019 11:35:34 -0400 Received: by mail-ed1-f67.google.com with SMTP id c20so4353985eds.1 for ; Mon, 09 Sep 2019 08:35:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=MTFOT5bdM6X72YjVAZIbcsExbwxE+XqxokMEIsUljgM=; b=wHAxZhcK+gVPgAgJF9PbCYhlVGAsrovsuFXW5bqK8U3w5EFk2zZCX1PS4KAWztk+tV aZPQUgB2szFFTowwsoVdApg2W0IWLJC/PYf3C5DTflhYhuY+iO5/3mwiha3DgnVu+Gnx v7L3al5qh8zdC+vfxTXAPiBMUhFc8k3n4NzOwwxptdbzgwK+T4XW/yezGIalQ9lX0P7U zpPoMANq/LhN3bwqGkzdrMNI2S7izV0couusSwfyWmSfxsP24uBJ1IzeHkipd6qvJrDP qP3aTxM2VI4aaPYi2lI4N2kG0/wn8MF3cHPJGzk9gZILa1VAr8ILUgrz4z2kJLX/t/vz 1Hfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=MTFOT5bdM6X72YjVAZIbcsExbwxE+XqxokMEIsUljgM=; b=ZVn6qH9fSyGRz2L1JNibqHf9VRcoykUQgm/G+uml2WnPKJYPowyF8UIRgY+b57E9Qh qDl0Ogk83NKu0+l/S4KH1odF6FN8iiBjqppKiJRAf4pzOrArql4OhrxuESOBuzb3c+t2 qn8n4cJxqB4c+jZY7WkHZFJyH0bZvcfajkB4ZAKwancCAVHRksekjR/K5v2/rxmgkvtJ Wfg3AD0io2kUq6hf5r1Gdlo5dhJugR6X47R5oMnYPoBedBGruE0g3TyIV+YTIHXc8H6T Sdwehnj7/R5cJMFPkfeDqn98oPGmhmTuQpIYpjbcBs/pNj86WkAT2cw1aEvvrj4OKzW7 s0+Q== X-Gm-Message-State: APjAAAVrm2CCMBDzaYexjDM49S1GpzRSlYp0yc85D4OID7W+gUssjioN Ly1dFpM21E4jukF9mpApcXtjWg== X-Google-Smtp-Source: APXvYqwJ7k9v4XDLW5K97XhqdK5YLrM7D4qHSrwZ/QMa9DMyngci97EGxAlQTwRoMZkMga2tS9GZKw== X-Received: by 2002:a50:d084:: with SMTP id v4mr25600401edd.48.1568043331860; Mon, 09 Sep 2019 08:35:31 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id j5sm3017703edj.62.2019.09.09.08.35.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Sep 2019 08:35:31 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id CD6C71003B5; Mon, 9 Sep 2019 18:35:29 +0300 (+03) Date: Mon, 9 Sep 2019 18:35:29 +0300 From: "Kirill A. Shutemov" To: Alexander Duyck Cc: Alexander Duyck , virtio-dev@lists.oasis-open.org, kvm@vger.kernel.org, mst@redhat.com, catalin.marinas@arm.com, david@redhat.com, dave.hansen@intel.com, linux-kernel@vger.kernel.org, willy@infradead.org, mhocko@kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, will@kernel.org, linux-arm-kernel@lists.infradead.org, osalvador@suse.de, yang.zhang.wz@gmail.com, pagupta@redhat.com, konrad.wilk@oracle.com, nitesh@redhat.com, riel@surriel.com, lcapitulino@redhat.com, wei.w.wang@intel.com, aarcange@redhat.com, ying.huang@intel.com, pbonzini@redhat.com, dan.j.williams@intel.com, fengguang.wu@intel.com, kirill.shutemov@linux.intel.com Subject: Re: [PATCH v9 2/8] mm: Adjust shuffle code to allow for future coalescing Message-ID: <20190909153529.3crs74uraos27ffh@box> References: <20190907172225.10910.34302.stgit@localhost.localdomain> <20190907172520.10910.83100.stgit@localhost.localdomain> <20190909094700.bbslsxpuwvxmodal@box> <22a896255cba877cf820f552667e1bc14268fa20.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22a896255cba877cf820f552667e1bc14268fa20.camel@linux.intel.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 09, 2019 at 08:22:11AM -0700, Alexander Duyck wrote: > > > + area = &zone->free_area[order]; > > > + if (is_shuffle_order(order) ? shuffle_pick_tail() : > > > + buddy_merge_likely(pfn, buddy_pfn, page, order)) > > > > Too loaded condition to my taste. Maybe > > > > bool to_tail; > > ... > > if (is_shuffle_order(order)) > > to_tail = shuffle_pick_tail(); > > else if (buddy_merge_likely(pfn, buddy_pfn, page, order)) > > to_tail = true; > > else > > to_tail = false; > > I can do that, although I would tweak this slightly and do something more > like: > if (is_shuffle_order(order)) > to_tail = shuffle_pick_tail(); > else > to_tail = buddy+_merge_likely(pfn, buddy_pfn, page, order); Okay. Looks fine. > > if (to_tail) > > add_to_free_area_tail(page, area, migratetype); > > else > > add_to_free_area(page, area, migratetype); > > > > > + add_to_free_area_tail(page, area, migratetype); > > > else > > > - add_to_free_area(page, &zone->free_area[order], migratetype); > > > - > > > + add_to_free_area(page, area, migratetype); > > > } > > > > > > /* > > > diff --git a/mm/shuffle.c b/mm/shuffle.c > > > index 9ba542ecf335..345cb4347455 100644 > > > --- a/mm/shuffle.c > > > +++ b/mm/shuffle.c > > > @@ -4,7 +4,6 @@ > > > #include > > > #include > > > #include > > > -#include > > > #include > > > #include "internal.h" > > > #include "shuffle.h" > > > > Why do you move #include from .c to .h? > > It's not obvious to me. > > Because I had originally put the shuffle logic in an inline function. I > can undo that now as I when back to doing the randomness in the .c > sometime v5 I believe. Yes, please. It's needless change now. > > > > @@ -190,8 +189,7 @@ struct batched_bit_entropy { > > > > > > static DEFINE_PER_CPU(struct batched_bit_entropy, batched_entropy_bool); > > > > > > -void add_to_free_area_random(struct page *page, struct free_area *area, > > > - int migratetype) > > > +bool __shuffle_pick_tail(void) > > > { > > > struct batched_bit_entropy *batch; > > > unsigned long entropy; > > > @@ -213,8 +211,5 @@ void add_to_free_area_random(struct page *page, struct free_area *area, > > > batch->position = position; > > > entropy = batch->entropy_bool; > > > > > > - if (1ul & (entropy >> position)) > > > - add_to_free_area(page, area, migratetype); > > > - else > > > - add_to_free_area_tail(page, area, migratetype); > > > + return 1ul & (entropy >> position); > > > } > > > diff --git a/mm/shuffle.h b/mm/shuffle.h > > > index 777a257a0d2f..0723eb97f22f 100644 > > > --- a/mm/shuffle.h > > > +++ b/mm/shuffle.h > > > @@ -3,6 +3,7 @@ > > > #ifndef _MM_SHUFFLE_H > > > #define _MM_SHUFFLE_H > > > #include > > > +#include > > > > > > /* > > > * SHUFFLE_ENABLE is called from the command line enabling path, or by > > > @@ -22,6 +23,7 @@ enum mm_shuffle_ctl { > > > DECLARE_STATIC_KEY_FALSE(page_alloc_shuffle_key); > > > extern void page_alloc_shuffle(enum mm_shuffle_ctl ctl); > > > extern void __shuffle_free_memory(pg_data_t *pgdat); > > > +extern bool __shuffle_pick_tail(void); > > > static inline void shuffle_free_memory(pg_data_t *pgdat) > > > { > > > if (!static_branch_unlikely(&page_alloc_shuffle_key)) > > > @@ -43,6 +45,11 @@ static inline bool is_shuffle_order(int order) > > > return false; > > > return order >= SHUFFLE_ORDER; > > > } > > > + > > > +static inline bool shuffle_pick_tail(void) > > > +{ > > > + return __shuffle_pick_tail(); > > > +} > > > > I don't see a reason in __shuffle_pick_tail() existing if you call it > > unconditionally. > > That is for compilation purposes. The function is not used in the > shuffle_pick_tail below that always returns false. Wouldn't it be the same if you rename __shuffle_pick_tail() to shuffle_pick_tail() and put its declaration under the same #ifdef? -- Kirill A. Shutemov 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=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 BD9F8C4740A for ; Mon, 9 Sep 2019 15:35:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 90FE42089F for ; Mon, 9 Sep 2019 15:35:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iK0b53LU"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=shutemov-name.20150623.gappssmtp.com header.i=@shutemov-name.20150623.gappssmtp.com header.b="wHAxZhcK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 90FE42089F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rbRmFZH0n4XHfGZFnXGuyko0BaeuDUBSND/GVPXJxas=; b=iK0b53LUgAPQKU jOcj/NgNN2qoRtDZ4w5fiGJxd3dEuEw+LDMXttN1BIPhpg+5AM6ifAJqXQ+qFAY9IgFvuQlO7V9BI eSLH4woM3qJ+nclrFWiG3FBTXeQhmUFvWnRpzY3UkY3dSfqEEm28Y1yzjSQQgCc+IRiaRMPe4vG8D gsjRpIGkiUXPX2YqVm8A2pT6C+SlT2xBFyBf/fCUXn9Kc4A7BuWsj3TGmUX96NK+7sm3Y/pga9/qG MLxpKt+Bf4sJBcoq15zagDi64Gww4yZqR6j9dGK2oNvUBEViHkud1U6BgntMT51AWyjGYH9p8JxPl XG0i/LjAHej2sGjVEmvg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i7LhZ-00087a-CL; Mon, 09 Sep 2019 15:35:37 +0000 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i7LhV-00085P-CG for linux-arm-kernel@lists.infradead.org; Mon, 09 Sep 2019 15:35:34 +0000 Received: by mail-ed1-x544.google.com with SMTP id i1so13391525edv.4 for ; Mon, 09 Sep 2019 08:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=MTFOT5bdM6X72YjVAZIbcsExbwxE+XqxokMEIsUljgM=; b=wHAxZhcK+gVPgAgJF9PbCYhlVGAsrovsuFXW5bqK8U3w5EFk2zZCX1PS4KAWztk+tV aZPQUgB2szFFTowwsoVdApg2W0IWLJC/PYf3C5DTflhYhuY+iO5/3mwiha3DgnVu+Gnx v7L3al5qh8zdC+vfxTXAPiBMUhFc8k3n4NzOwwxptdbzgwK+T4XW/yezGIalQ9lX0P7U zpPoMANq/LhN3bwqGkzdrMNI2S7izV0couusSwfyWmSfxsP24uBJ1IzeHkipd6qvJrDP qP3aTxM2VI4aaPYi2lI4N2kG0/wn8MF3cHPJGzk9gZILa1VAr8ILUgrz4z2kJLX/t/vz 1Hfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=MTFOT5bdM6X72YjVAZIbcsExbwxE+XqxokMEIsUljgM=; b=cnmjuqPpwOUwPnSWX7OPu4oS9UbnbvCWwsCeZSmUNxBXsb34ZxGYHBrEn53S3Ua8SQ HjZKmp5A+7mHCbOVvbqIm+T/UzMTDwyrweIsV09kwYB0XNAovTd9PRS+YcjvS00tMWjc sJuonjpDoxyPfcIostVHfOeHFIkmy7nERgrUPVgi2wD6akkxRXN3SUPwFSTMBIcxzxVP cvAODrJB5TzjO141Mak5velq7GE95fJ+j7NYQgnsJ9qQBZ0e9r6KvhkXRy1lcWS/nDAb h/H/0dl+p4SXsf/q4wV9GeX70Uq6SrQpqvOd9wuRH9QVOo9LBz+YtfxBiEWFPkTeYb8I cu2A== X-Gm-Message-State: APjAAAXDtq0iJrk/mrkSMZ2pBDo9trM37JNJb+RCGSy3krNtQbvljxUA BK+nQ6Z9nxQbPs2hDImjjDmMCg== X-Google-Smtp-Source: APXvYqwJ7k9v4XDLW5K97XhqdK5YLrM7D4qHSrwZ/QMa9DMyngci97EGxAlQTwRoMZkMga2tS9GZKw== X-Received: by 2002:a50:d084:: with SMTP id v4mr25600401edd.48.1568043331860; Mon, 09 Sep 2019 08:35:31 -0700 (PDT) Received: from box.localdomain ([86.57.175.117]) by smtp.gmail.com with ESMTPSA id j5sm3017703edj.62.2019.09.09.08.35.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Sep 2019 08:35:31 -0700 (PDT) Received: by box.localdomain (Postfix, from userid 1000) id CD6C71003B5; Mon, 9 Sep 2019 18:35:29 +0300 (+03) Date: Mon, 9 Sep 2019 18:35:29 +0300 From: "Kirill A. Shutemov" To: Alexander Duyck Subject: Re: [PATCH v9 2/8] mm: Adjust shuffle code to allow for future coalescing Message-ID: <20190909153529.3crs74uraos27ffh@box> References: <20190907172225.10910.34302.stgit@localhost.localdomain> <20190907172520.10910.83100.stgit@localhost.localdomain> <20190909094700.bbslsxpuwvxmodal@box> <22a896255cba877cf820f552667e1bc14268fa20.camel@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <22a896255cba877cf820f552667e1bc14268fa20.camel@linux.intel.com> User-Agent: NeoMutt/20180716 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190909_083533_465367_FD7FBA9A X-CRM114-Status: GOOD ( 21.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yang.zhang.wz@gmail.com, pagupta@redhat.com, kvm@vger.kernel.org, david@redhat.com, catalin.marinas@arm.com, Alexander Duyck , mhocko@kernel.org, linux-mm@kvack.org, will@kernel.org, aarcange@redhat.com, virtio-dev@lists.oasis-open.org, mst@redhat.com, willy@infradead.org, wei.w.wang@intel.com, ying.huang@intel.com, riel@surriel.com, dan.j.williams@intel.com, lcapitulino@redhat.com, linux-arm-kernel@lists.infradead.org, osalvador@suse.de, nitesh@redhat.com, konrad.wilk@oracle.com, dave.hansen@intel.com, linux-kernel@vger.kernel.org, pbonzini@redhat.com, akpm@linux-foundation.org, fengguang.wu@intel.com, kirill.shutemov@linux.intel.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Sep 09, 2019 at 08:22:11AM -0700, Alexander Duyck wrote: > > > + area = &zone->free_area[order]; > > > + if (is_shuffle_order(order) ? shuffle_pick_tail() : > > > + buddy_merge_likely(pfn, buddy_pfn, page, order)) > > > > Too loaded condition to my taste. Maybe > > > > bool to_tail; > > ... > > if (is_shuffle_order(order)) > > to_tail = shuffle_pick_tail(); > > else if (buddy_merge_likely(pfn, buddy_pfn, page, order)) > > to_tail = true; > > else > > to_tail = false; > > I can do that, although I would tweak this slightly and do something more > like: > if (is_shuffle_order(order)) > to_tail = shuffle_pick_tail(); > else > to_tail = buddy+_merge_likely(pfn, buddy_pfn, page, order); Okay. Looks fine. > > if (to_tail) > > add_to_free_area_tail(page, area, migratetype); > > else > > add_to_free_area(page, area, migratetype); > > > > > + add_to_free_area_tail(page, area, migratetype); > > > else > > > - add_to_free_area(page, &zone->free_area[order], migratetype); > > > - > > > + add_to_free_area(page, area, migratetype); > > > } > > > > > > /* > > > diff --git a/mm/shuffle.c b/mm/shuffle.c > > > index 9ba542ecf335..345cb4347455 100644 > > > --- a/mm/shuffle.c > > > +++ b/mm/shuffle.c > > > @@ -4,7 +4,6 @@ > > > #include > > > #include > > > #include > > > -#include > > > #include > > > #include "internal.h" > > > #include "shuffle.h" > > > > Why do you move #include from .c to .h? > > It's not obvious to me. > > Because I had originally put the shuffle logic in an inline function. I > can undo that now as I when back to doing the randomness in the .c > sometime v5 I believe. Yes, please. It's needless change now. > > > > @@ -190,8 +189,7 @@ struct batched_bit_entropy { > > > > > > static DEFINE_PER_CPU(struct batched_bit_entropy, batched_entropy_bool); > > > > > > -void add_to_free_area_random(struct page *page, struct free_area *area, > > > - int migratetype) > > > +bool __shuffle_pick_tail(void) > > > { > > > struct batched_bit_entropy *batch; > > > unsigned long entropy; > > > @@ -213,8 +211,5 @@ void add_to_free_area_random(struct page *page, struct free_area *area, > > > batch->position = position; > > > entropy = batch->entropy_bool; > > > > > > - if (1ul & (entropy >> position)) > > > - add_to_free_area(page, area, migratetype); > > > - else > > > - add_to_free_area_tail(page, area, migratetype); > > > + return 1ul & (entropy >> position); > > > } > > > diff --git a/mm/shuffle.h b/mm/shuffle.h > > > index 777a257a0d2f..0723eb97f22f 100644 > > > --- a/mm/shuffle.h > > > +++ b/mm/shuffle.h > > > @@ -3,6 +3,7 @@ > > > #ifndef _MM_SHUFFLE_H > > > #define _MM_SHUFFLE_H > > > #include > > > +#include > > > > > > /* > > > * SHUFFLE_ENABLE is called from the command line enabling path, or by > > > @@ -22,6 +23,7 @@ enum mm_shuffle_ctl { > > > DECLARE_STATIC_KEY_FALSE(page_alloc_shuffle_key); > > > extern void page_alloc_shuffle(enum mm_shuffle_ctl ctl); > > > extern void __shuffle_free_memory(pg_data_t *pgdat); > > > +extern bool __shuffle_pick_tail(void); > > > static inline void shuffle_free_memory(pg_data_t *pgdat) > > > { > > > if (!static_branch_unlikely(&page_alloc_shuffle_key)) > > > @@ -43,6 +45,11 @@ static inline bool is_shuffle_order(int order) > > > return false; > > > return order >= SHUFFLE_ORDER; > > > } > > > + > > > +static inline bool shuffle_pick_tail(void) > > > +{ > > > + return __shuffle_pick_tail(); > > > +} > > > > I don't see a reason in __shuffle_pick_tail() existing if you call it > > unconditionally. > > That is for compilation purposes. The function is not used in the > shuffle_pick_tail below that always returns false. Wouldn't it be the same if you rename __shuffle_pick_tail() to shuffle_pick_tail() and put its declaration under the same #ifdef? -- Kirill A. Shutemov _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel