From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754397AbbCQV62 (ORCPT ); Tue, 17 Mar 2015 17:58:28 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52163 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753888AbbCQV6Z (ORCPT ); Tue, 17 Mar 2015 17:58:25 -0400 Date: Tue, 17 Mar 2015 14:58:23 -0700 From: Andrew Morton To: Roman Peniaev Cc: Joonsoo Kim , Eric Dumazet , 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: Re: [PATCH 1/3] mm/vmalloc: fix possible exhaustion of vmalloc space caused by vm_map_ram allocator Message-Id: <20150317145823.3213cba4dc629c716df0fdd9@linux-foundation.org> In-Reply-To: References: <1426248777-19768-1-git-send-email-r.peniaev@gmail.com> <1426248777-19768-2-git-send-email-r.peniaev@gmail.com> <20150317045608.GA22902@js1304-P5Q-DELUXE> <20150317072952.GA23143@js1304-P5Q-DELUXE> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Mar 2015 17:22:46 +0900 Roman Peniaev wrote: > >> My second patch fixes this problem. > >> I occupy the block on allocation and avoid jumping to the search loop. > > > > I'm not sure that this fixes above case. > > 'vm_map_ram (3) * 85' means 85 times vm_map_ram() calls. > > > > First vm_map_ram(3) caller could get benefit from your second patch. > > But, second caller and the other callers in each iteration could not > > get benefit and should iterate whole list to find suitable free block, > > because this free block is put to the tail of the list. Am I missing > > something? > > You are missing the fact that we occupy blocks in 2^n. > So in your example 4 page slots will be occupied (order is 2), not 3. Could you please - update the changelogs so they answer the questions which Joonsoo Kim and Gioh Kim asked - write a little in-kernel benchmark to test the scenario which Joonsoo described and include the before and after timing results in the changelogs - resend the patchset Thanks. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 17 Mar 2015 14:58:23 -0700 From: Andrew Morton To: Roman Peniaev Cc: Joonsoo Kim , Eric Dumazet , 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: Re: [PATCH 1/3] mm/vmalloc: fix possible exhaustion of vmalloc space caused by vm_map_ram allocator Message-Id: <20150317145823.3213cba4dc629c716df0fdd9@linux-foundation.org> In-Reply-To: References: <1426248777-19768-1-git-send-email-r.peniaev@gmail.com> <1426248777-19768-2-git-send-email-r.peniaev@gmail.com> <20150317045608.GA22902@js1304-P5Q-DELUXE> <20150317072952.GA23143@js1304-P5Q-DELUXE> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: On Tue, 17 Mar 2015 17:22:46 +0900 Roman Peniaev wrote: > >> My second patch fixes this problem. > >> I occupy the block on allocation and avoid jumping to the search loop. > > > > I'm not sure that this fixes above case. > > 'vm_map_ram (3) * 85' means 85 times vm_map_ram() calls. > > > > First vm_map_ram(3) caller could get benefit from your second patch. > > But, second caller and the other callers in each iteration could not > > get benefit and should iterate whole list to find suitable free block, > > because this free block is put to the tail of the list. Am I missing > > something? > > You are missing the fact that we occupy blocks in 2^n. > So in your example 4 page slots will be occupied (order is 2), not 3. Could you please - update the changelogs so they answer the questions which Joonsoo Kim and Gioh Kim asked - write a little in-kernel benchmark to test the scenario which Joonsoo described and include the before and after timing results in the changelogs - resend the patchset Thanks. -- 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