From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by kanga.kvack.org (Postfix) with ESMTP id 7EEBD900016 for ; Thu, 4 Jun 2015 23:19:43 -0400 (EDT) Received: by padj3 with SMTP id j3so41714232pad.0 for ; Thu, 04 Jun 2015 20:19:43 -0700 (PDT) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com. [58.251.152.64]) by mx.google.com with ESMTPS id dv10si1549670pdb.202.2015.06.04.20.19.41 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 04 Jun 2015 20:19:42 -0700 (PDT) Message-ID: <55711428.8020006@huawei.com> Date: Fri, 5 Jun 2015 11:14:48 +0800 From: Xishi Qiu MIME-Version: 1.0 Subject: Re: [RFC PATCH 10/12] mm: add the buddy system interface References: <55704A7E.5030507@huawei.com> <55704CC4.8040707@huawei.com> <3908561D78D1C84285E8C5FCA982C28F32A8D5C7@ORSMSX114.amr.corp.intel.com> In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F32A8D5C7@ORSMSX114.amr.corp.intel.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: "Luck, Tony" Cc: Andrew Morton , "nao.horiguchi@gmail.com" , Yinghai Lu , "H. Peter Anvin" , Thomas Gleixner , "mingo@elte.hu" , Xiexiuqi , Hanjun Guo , Linux MM , LKML On 2015/6/5 1:09, Luck, Tony wrote: > +#ifdef CONFIG_MEMORY_MIRROR > + if (change_to_mirror(gfp_mask, ac.high_zoneidx)) > + ac.migratetype = MIGRATE_MIRROR; > +#endif > > We may have to be smarter than this here. I'd like to encourage the > enterprise Linux distributions to set CONFIG_MEMORY_MIRROR=y > But the reality is that most systems will not configure any mirrored > memory - so we don't want the common code path for memory > allocation to call functions that set the migrate type, try to allocate > and then fall back to a non-mirror when that may be a complete waste > of time. > > Maybe a global "got_mirror" that is true if we have some mirrored > memory. Then code is > > if (got_mirror && change_to_mirror(...)) > Yes, I will change next time. Thanks, > . > -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org