From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941648AbdAGShu (ORCPT ); Sat, 7 Jan 2017 13:37:50 -0500 Received: from mail-io0-f172.google.com ([209.85.223.172]:35795 "EHLO mail-io0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S941562AbdAGShm (ORCPT ); Sat, 7 Jan 2017 13:37:42 -0500 MIME-Version: 1.0 In-Reply-To: <20170107092746.GC5047@dhcp22.suse.cz> References: <20170106095115.GG5556@dhcp22.suse.cz> <20170106100433.GH5556@dhcp22.suse.cz> <20170106121642.GJ5556@dhcp22.suse.cz> <1483740889.9712.44.camel@edumazet-glaptop3.roam.corp.google.com> <20170107092746.GC5047@dhcp22.suse.cz> From: Eric Dumazet Date: Sat, 7 Jan 2017 10:37:41 -0800 Message-ID: Subject: Re: weird allocation pattern in alloc_ila_locks To: Michal Hocko Cc: Eric Dumazet , Tom Herbert , linux-mm@kvack.org, LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 7, 2017 at 1:27 AM, Michal Hocko wrote: > On Fri 06-01-17 14:14:49, Eric Dumazet wrote: >> I believe the intent was to get NUMA spreading, a bit like what we have >> in alloc_large_system_hash() when hashdist == HASHDIST_DEFAULT > > Hmm, I am not sure this works as expected then. Because it is more > likely that all pages backing the vmallocked area will come from the > local node than spread around more nodes. Or did I miss your point? Well, you missed that vmalloc() is aware of NUMA policies. If current process has requested interleave on 2 nodes (as it is done at boot time on a dual node system), then vmalloc() of 8 pages will allocate 4 pages on each node. If you force/attempt a kmalloc() of one order-3 page, chances are very high to get all memory on one single node.