Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753887AbbFDRJG (ORCPT ); Thu, 4 Jun 2015 13:09:06 -0400 Received: from mga03.intel.com ([134.134.136.65]:15952 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752426AbbFDRJE convert rfc822-to-8bit (ORCPT ); Thu, 4 Jun 2015 13:09:04 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,553,1427785200"; d="scan'208";a="705409885" From: "Luck, Tony" To: Xishi Qiu , Andrew Morton , "nao.horiguchi@gmail.com" , Yinghai Lu , "H. Peter Anvin" , Thomas Gleixner , "mingo@elte.hu" , Xiexiuqi , Hanjun Guo CC: Linux MM , LKML Subject: RE: [RFC PATCH 10/12] mm: add the buddy system interface Thread-Topic: [RFC PATCH 10/12] mm: add the buddy system interface Thread-Index: AQHQnscWKDg7SoiYFUq3OAjydtKYB52cktCg Date: Thu, 4 Jun 2015 17:09:03 +0000 Message-ID: <3908561D78D1C84285E8C5FCA982C28F32A8D5C7@ORSMSX114.amr.corp.intel.com> References: <55704A7E.5030507@huawei.com> <55704CC4.8040707@huawei.com> In-Reply-To: <55704CC4.8040707@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 908 Lines: 22 +#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(...)) -- 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/