From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755287AbbLRCMv (ORCPT ); Thu, 17 Dec 2015 21:12:51 -0500 Received: from mgwkm04.jp.fujitsu.com ([202.219.69.171]:22380 "EHLO mgwkm04.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752601AbbLRCMu (ORCPT ); Thu, 17 Dec 2015 21:12:50 -0500 X-SecurityPolicyCheck: OK by SHieldMailChecker v2.3.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20150223 X-SHieldMailCheckerMailID: 6c63b356b7764af49c66e0d85f8e583e Subject: Re: [PATCH v3 2/2] mm: Introduce kernelcore=mirror option To: "Luck, Tony" , Xishi Qiu References: <1449631109-14756-1-git-send-email-izumi.taku@jp.fujitsu.com> <1449631177-14863-1-git-send-email-izumi.taku@jp.fujitsu.com> <56679FDC.1080800@huawei.com> <3908561D78D1C84285E8C5FCA982C28F39F7F4CD@ORSMSX114.amr.corp.intel.com> <5668D1FA.4050108@huawei.com> <56691819.3040105@huawei.com> <566A9AE1.7020001@huawei.com> <56722258.6030800@huawei.com> <567223A7.9090407@jp.fujitsu.com> <56723E8B.8050201@huawei.com> <567241BE.5030806@jp.fujitsu.com> <3908561D78D1C84285E8C5FCA982C28F39F882E8@ORSMSX114.amr.corp.intel.com> Cc: "Izumi, Taku" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "akpm@linux-foundation.org" , "mel@csn.ul.ie" , "Hansen, Dave" , "matt@codeblueprint.co.uk" From: Kamezawa Hiroyuki Message-ID: <56736B7D.3040709@jp.fujitsu.com> Date: Fri, 18 Dec 2015 11:12:13 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F39F882E8@ORSMSX114.amr.corp.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/12/18 3:43, Luck, Tony wrote: >>>> As Tony requested, we may need a knob to stop a fallback in "movable->normal", later. >>>> >>> >>> If the mirrored memory is small and the other is large, >>> I think we can both enable "non-mirrored -> normal" and "normal -> non-mirrored". >> >> Size of mirrored memory can be configured by software(EFI var). >> So, having both is just overkill and normal->non-mirroed fallback is meaningless considering >> what the feature want to guarantee. > > In the original removable usage we wanted to guarantee that Linux did not allocate any > kernel objects in removable memory - because that would prevent later removal of that > memory. > > Mirror case is the same - we don't want to allocate kernel structures in non-mirrored memory > because an uncorrectable error in one of them would crash the system. > > But I think some users might like some flexibility here. If the system doesn't have enough > memory for the kernel (non-movable or mirrored), then it seems odd to end up crashing > the system at the point of memory exhaustion (a likely result ... the kernel can try to reclaim > some pages from SLAB, but that might only return a few pages, if the shortage continues > the system will perform poorly and eventually fail). > > The whole point of removable memory or mirrored memory is to provide better availability. > > I'd vote for a mode where running out of memory for kernel results in a > > warn_on_once("Ran out of mirrored/non-removable memory for kernel - now allocating from all zones\n") > > because I think most people would like the system to stay up rather than worry about some future problem that may never happen. Hmm...like this ? sysctl.vm.fallback_mirror_memory = 0 // never fallback # default. sysctl.vm.fallback_mirror_memory = 1 // the user memory may be allocated from mirrored zone. sysctl.vm.fallback_mirror_memory = 2 // usually kernel allocates memory from mirrored zone before OOM. sysctl.vm.fallback_mirror_memory = 3 // 1+2 However I believe my customer's choice is always 0, above implementation can be done in a clean way. (adding a flag to zones (mirrored or not) and controlling fallback zonelist walk.) BTW, we need this Taku's patch to make a progress. I think other devs should be done in another development cycle. What does he need to get your Acks ? Thanks, -Kame