Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932298Ab1EIWch (ORCPT ); Mon, 9 May 2011 18:32:37 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:60802 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753532Ab1EIWcf (ORCPT ); Mon, 9 May 2011 18:32:35 -0400 MIME-Version: 1.0 In-Reply-To: <1304979549.4865.56.camel@mulgrave.site> References: <1304979549.4865.56.camel@mulgrave.site> From: Linus Torvalds Date: Mon, 9 May 2011 15:31:42 -0700 Message-ID: Subject: Re: [PATCH] Don't mlock guardpage if the stack is growing up To: James Bottomley Cc: Mikulas Patocka , Tony Luck , Fenghua Yu , Hugh Dickins , linux-kernel@vger.kernel.org, linux-parisc@vger.kernel.org, Michel Lespinasse , Oleg Nesterov , linux-ia64@vger.kernel.org Content-Type: multipart/mixed; boundary=002354477dba8c26c904a2df68c4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1638 Lines: 38 --002354477dba8c26c904a2df68c4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, May 9, 2011 at 3:19 PM, James Bottomley wrote: > > So I can test the patch, if you tell me how. =A0I don't use lvm2, so it > would have to be a simple test case. Something like the attached. Run it as root (it needs root just for the mlockall), and see whether the stack it shows changes. With current kernels, I think the stack expands by one page during the mlockall (for STACK_GROWSUP), with the patch it shouldn't. Linus --002354477dba8c26c904a2df68c4 Content-Type: text/x-csrc; charset=US-ASCII; name="t.c" Content-Disposition: attachment; filename="t.c" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gnhzk71z0 I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KI2luY2x1ZGUgPHN5cy9tbWFu Lmg+CgpzdGF0aWMgdm9pZCBzaG93X3N0YWNrKHZvaWQpCnsKCUZJTEUgKm1hcDsKCWNoYXIgYnVm WzEwMDBdOwoKCW1hcCA9IGZvcGVuKCIvcHJvYy9zZWxmL21hcHMiLCAiciIpOwoJaWYgKCFtYXAp CgkJcmV0dXJuOwoKCXdoaWxlIChmZ2V0cyhidWYsIDEwMDAsIG1hcCkpIHsKCQlpZiAoIXN0cnN0 cihidWYsICJbc3RhY2tdIikpCgkJCWNvbnRpbnVlOwoJCWZwdXRzKGJ1Ziwgc3Rkb3V0KTsKCX0K CglmY2xvc2UobWFwKTsKfQoKaW50IG1haW4odm9pZCkKewoJc2hvd19zdGFjaygpOwoJbWxvY2th bGwoTUNMX0NVUlJFTlQgfCBNQ0xfRlVUVVJFKTsKCXNob3dfc3RhY2soKTsKCXJldHVybiAwOwp9 Cg== --002354477dba8c26c904a2df68c4-- -- 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/