Re: [PATCH] mm/slub: skip node in case there is no slab to acquire

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 13, 2018 at 02:17:51PM +0100, Michal Hocko wrote:
>On Thu 08-11-18 09:12:04, Wei Yang wrote:
>> for_each_zone_zonelist() iterates the zonelist one by one, which means
>> it will iterate on zones on the same node. While get_partial_node()
>> checks available slab on node base instead of zone.
>> 
>> This patch skip a node in case get_partial_node() fails to acquire slab
>> on that node.
>
>If this is an optimization then it should be accompanied by some
>numbers.

Let me try to get some test result.

Do you have some suggestion on the test suite? Is kernel build a proper
test?

>
>> @@ -1882,6 +1882,9 @@ static void *get_any_partial(struct kmem_cache *s, gfp_t flags,
>>  	enum zone_type high_zoneidx = gfp_zone(flags);
>>  	void *object;
>>  	unsigned int cpuset_mems_cookie;
>> +	nodemask_t nmask = node_states[N_MEMORY];
>
>This will allocate a large bitmask on the stack and that is no-go for
>something that might be called from a potentially deep call stack
>already. Also are you sure that the micro-optimization offsets the
>copying overhead?
>

You are right. I didn't pay attention to this.

I got one other idea to achieve this effect, like the one in
get_page_from_freelist().

In get_page_from_freelist(), we use last_pgdat_dirty_limit to track the
last node out of dirty limit. I am willing to borrow this idea in
get_any_partial() to skip a node.

Well, let me do some tests to see whether this is visible.

>-- 
>Michal Hocko
>SUSE Labs

-- 
Wei Yang
Help you, Help me




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux