From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757313AbaKTOua (ORCPT ); Thu, 20 Nov 2014 09:50:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39446 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756498AbaKTOu2 (ORCPT ); Thu, 20 Nov 2014 09:50:28 -0500 Message-ID: <546DFFA1.4030700@redhat.com> Date: Thu, 20 Nov 2014 09:50:09 -0500 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Konstantin Khlebnikov , Michel Lespinasse CC: Vlastimil Babka , Andrew Morton , Hugh Dickins , Andrea Arcangeli , Linux Kernel Mailing List , "linux-mm@kvack.org" , Tim Hartrick , Michal Hocko Subject: Re: [PATCH] Repeated fork() causes SLAB to grow without bound References: <502D42E5.7090403@redhat.com> <20120822032057.GA30871@google.com> <50345232.4090002@redhat.com> <20130603195003.GA31275@evergreen.ssec.wisc.edu> <20141114163053.GA6547@cosmos.ssec.wisc.edu> <20141117160212.b86d031e1870601240b0131d@linux-foundation.org> <20141118014135.GA17252@cosmos.ssec.wisc.edu> <546AB1F5.6030306@redhat.com> <20141118121936.07b02545a0684b2cc839a10c@linux-foundation.org> <546BDB29.9050403@suse.cz> <546CC0CD.40906@suse.cz> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11/20/2014 09:42 AM, Konstantin Khlebnikov wrote: > I'm thinking about limitation for reusing anon_vmas which might > increase performance without breaking asymptotic estimation of > count anon_vma in the worst case. For example this heuristic: allow > to reuse only anon_vma with single direct descendant. It seems > there will be arount up to two times more anon_vmas but > false-aliasing must be much lower. It may even be possible to not create a child anon_vma for the first child a parent forks, but only create a new anon_vma once the parent clones a second child (alive at the same time as the first child). That still takes care of things like apache or sendmail, but would not create infinite anon_vmas for a task that keeps forking itself to infinite depth without calling exec... - -- All rights reversed -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUbf+hAAoJEM553pKExN6DxhQH/1QL+9GdhaSx7EQnRcbDRcHi GuEfMU0g9Kv4ad+oPSQnH/L7vJMJAYeh5ZJGH+rOykWHp3sGReqDZOnzpXRAe11z 1cSC1BJsndzrv9wX8niFpuKpYbF0IP+ckv3qaEzWtm5yCRyhHVZfr6b794Y4K9jF z2EPPu1vAAldbkx1VlYTwofBA5lESL5UmrFvH4ouI7BeWYSEe6BgVCbvK+K5fANT ketdA5R08xyUAcXDa+28qpBYkdWnxNhwqseDoXCW8SOFNwWbLDI6GRfrsCNku13i Gi41h3uEuIAGDf+AU/GMjiymgwutCOGq+cfZlszELaRvHmDpNGYdPv1llghNg7Q= =Vk+H -----END PGP SIGNATURE----- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yh0-f51.google.com (mail-yh0-f51.google.com [209.85.213.51]) by kanga.kvack.org (Postfix) with ESMTP id CAA106B0071 for ; Thu, 20 Nov 2014 10:18:35 -0500 (EST) Received: by mail-yh0-f51.google.com with SMTP id a41so1420074yho.10 for ; Thu, 20 Nov 2014 07:18:35 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id c68si2909423qga.110.2014.11.20.07.18.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Nov 2014 07:18:34 -0800 (PST) Message-ID: <546DFFA1.4030700@redhat.com> Date: Thu, 20 Nov 2014 09:50:09 -0500 From: Rik van Riel MIME-Version: 1.0 Subject: Re: [PATCH] Repeated fork() causes SLAB to grow without bound References: <502D42E5.7090403@redhat.com> <20120822032057.GA30871@google.com> <50345232.4090002@redhat.com> <20130603195003.GA31275@evergreen.ssec.wisc.edu> <20141114163053.GA6547@cosmos.ssec.wisc.edu> <20141117160212.b86d031e1870601240b0131d@linux-foundation.org> <20141118014135.GA17252@cosmos.ssec.wisc.edu> <546AB1F5.6030306@redhat.com> <20141118121936.07b02545a0684b2cc839a10c@linux-foundation.org> <546BDB29.9050403@suse.cz> <546CC0CD.40906@suse.cz> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Konstantin Khlebnikov , Michel Lespinasse Cc: Vlastimil Babka , Andrew Morton , Hugh Dickins , Andrea Arcangeli , Linux Kernel Mailing List , "linux-mm@kvack.org" , Tim Hartrick , Michal Hocko -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11/20/2014 09:42 AM, Konstantin Khlebnikov wrote: > I'm thinking about limitation for reusing anon_vmas which might > increase performance without breaking asymptotic estimation of > count anon_vma in the worst case. For example this heuristic: allow > to reuse only anon_vma with single direct descendant. It seems > there will be arount up to two times more anon_vmas but > false-aliasing must be much lower. It may even be possible to not create a child anon_vma for the first child a parent forks, but only create a new anon_vma once the parent clones a second child (alive at the same time as the first child). That still takes care of things like apache or sendmail, but would not create infinite anon_vmas for a task that keeps forking itself to infinite depth without calling exec... - -- All rights reversed -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUbf+hAAoJEM553pKExN6DxhQH/1QL+9GdhaSx7EQnRcbDRcHi GuEfMU0g9Kv4ad+oPSQnH/L7vJMJAYeh5ZJGH+rOykWHp3sGReqDZOnzpXRAe11z 1cSC1BJsndzrv9wX8niFpuKpYbF0IP+ckv3qaEzWtm5yCRyhHVZfr6b794Y4K9jF z2EPPu1vAAldbkx1VlYTwofBA5lESL5UmrFvH4ouI7BeWYSEe6BgVCbvK+K5fANT ketdA5R08xyUAcXDa+28qpBYkdWnxNhwqseDoXCW8SOFNwWbLDI6GRfrsCNku13i Gi41h3uEuIAGDf+AU/GMjiymgwutCOGq+cfZlszELaRvHmDpNGYdPv1llghNg7Q= =Vk+H -----END PGP SIGNATURE----- -- 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