From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755288AbbCMMN2 (ORCPT ); Fri, 13 Mar 2015 08:13:28 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:41302 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753534AbbCMMN0 (ORCPT ); Fri, 13 Mar 2015 08:13:26 -0400 From: Roman Pen Cc: Roman Pen , Andrew Morton , Nick Piggin , Eric Dumazet , Joonsoo Kim , David Rientjes , WANG Chao , Fabian Frederick , Christoph Lameter , Gioh Kim , Rob Jones , linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH 0/3] [RFC] mm/vmalloc: fix possible exhaustion of vmalloc space Date: Fri, 13 Mar 2015 21:12:54 +0900 Message-Id: <1426248777-19768-1-git-send-email-r.peniaev@gmail.com> X-Mailer: git-send-email 2.2.2 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello all. Recently I came across high fragmentation of vm_map_ram allocator: vmap_block has free space, but still new blocks continue to appear. Further investigation showed that certain mapping/unmapping sequence can exhaust vmalloc space. On small 32bit systems that's not a big problem, cause purging will be called soon on a first allocation failure (alloc_vmap_area), but on 64bit machines, e.g. x86_64 has 45 bits of vmalloc space, that can be a disaster. Fixing this I also did some tweaks in allocation logic of a new vmap block and replaced dirty bitmap with min/max dirty range values to make the logic simpler. I would like to receive comments on the following three patches. Thanks. Roman Pen (3): mm/vmalloc: fix possible exhaustion of vmalloc space caused by vm_map_ram allocator mm/vmalloc: occupy newly allocated vmap block just after allocation mm/vmalloc: get rid of dirty bitmap inside vmap_block structure mm/vmalloc.c | 94 ++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 54 insertions(+), 40 deletions(-) Cc: Andrew Morton Cc: Nick Piggin Cc: Eric Dumazet Cc: Joonsoo Kim Cc: David Rientjes Cc: WANG Chao Cc: Fabian Frederick Cc: Christoph Lameter Cc: Gioh Kim Cc: Rob Jones Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org -- 1.9.3