Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932365AbbFEDRa (ORCPT ); Thu, 4 Jun 2015 23:17:30 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:13226 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932313AbbFEDR2 (ORCPT ); Thu, 4 Jun 2015 23:17:28 -0400 Message-ID: <55711428.8020006@huawei.com> Date: Fri, 5 Jun 2015 11:14:48 +0800 From: Xishi Qiu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 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 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 X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1033 Lines: 35 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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/