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,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham 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 34CE5C3A5A2 for ; Tue, 10 Sep 2019 12:20:41 +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 071D620872 for ; Tue, 10 Sep 2019 12:20:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZGyAqA41" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 071D620872 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=5LHBECupoXBFu/1XPzGhpNvJOrm6yVrshWZeRAIDNsg=; b=ZGyAqA41DKQR+6 cPKukDMKAFxmMjg8XkiuXQxY/3XBw6tw5DfIrllmPdWIrk/N+TeqBLCerWvQU5YhTBE8DBy9Btqzg 8FEgUZywGS5NTw77ztNLNgYUDKDV/ZJ+o5XtVa1kfaURFo7AMAasPq+3RgDoDJJ/0EVhPSiwJKgIn WnbYFmOCi+lQqs6Vo0WAlwQqIYVg8JF/bAPnCcZd+IhaZv0ey7Mw4uv2tqy6glZjiEk1ZQ0ZLaK/0 7jbjBlLEzo19e4I3rh9ujmFe/cptfND0Q8SbX6CG58eO6ZrPHod5m8yPVGJTrYifbths0TAymTfDA 99qp2ygh0grkM6dvsJRA==; 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 1i7f8N-0002eZ-If; Tue, 10 Sep 2019 12:20:35 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i7f8K-0002dn-Tw for linux-arm-kernel@lists.infradead.org; Tue, 10 Sep 2019 12:20:34 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 80E9FABCE; Tue, 10 Sep 2019 12:20:31 +0000 (UTC) Date: Tue, 10 Sep 2019 14:20:30 +0200 From: Michal Hocko To: Alexander Duyck Subject: Re: [PATCH v9 2/8] mm: Adjust shuffle code to allow for future coalescing Message-ID: <20190910122030.GV2063@dhcp22.suse.cz> References: <20190907172225.10910.34302.stgit@localhost.localdomain> <20190907172520.10910.83100.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190907172520.10910.83100.stgit@localhost.localdomain> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190910_052033_116987_2A21EA0E X-CRM114-Status: GOOD ( 11.86 ) 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, lcapitulino@redhat.com, linux-mm@kvack.org, alexander.h.duyck@linux.intel.com, 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, konrad.wilk@oracle.com, dan.j.williams@intel.com, linux-arm-kernel@lists.infradead.org, osalvador@suse.de, nitesh@redhat.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 Sat 07-09-19 10:25:20, Alexander Duyck wrote: > From: Alexander Duyck > > Move the head/tail adding logic out of the shuffle code and into the > __free_one_page function since ultimately that is where it is really > needed anyway. By doing this we should be able to reduce the overhead > and can consolidate all of the list addition bits in one spot. This changelog doesn't really explain why we want this. You are reshuffling the code, allright, but why do we want to reshuffle? Is the result readability a better code reuse or something else? Where does the claimed reduced overhead coming from? >From a quick look buddy_merge_likely looks nicer than the code splat we have. Good. But then > Reviewed-by: Dan Williams > Signed-off-by: Alexander Duyck [...] > - if (is_shuffle_order(order)) > - add_to_free_area_random(page, &zone->free_area[order], > - migratetype); > + area = &zone->free_area[order]; > + if (is_shuffle_order(order) ? shuffle_pick_tail() : > + buddy_merge_likely(pfn, buddy_pfn, page, order)) Ouch this is just awful don't you think? -- Michal Hocko SUSE Labs _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel