From mboxrd@z Thu Jan 1 00:00:00 1970 From: peterz@infradead.org (Peter Zijlstra) Date: Thu, 26 Aug 2010 10:18:57 +0200 Subject: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator framework In-Reply-To: References: <1282310110.2605.976.camel@laptop> <20100825155814.25c783c7.akpm@linux-foundation.org> Message-ID: <1282810737.1975.240.camel@laptop> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, 2010-08-26 at 04:40 +0200, Micha? Nazarewicz wrote: > I think that the biggest problem is fragmentation here. For instance, > I think that a situation where there is enough free space but it's > fragmented so no single contiguous chunk can be allocated is a serious > problem. However, I would argue that if there's simply no space left, > a multimedia device could fail and even though it's not desirable, it > would not be such a big issue in my eyes. > > So, if only movable or discardable pages are allocated in CMA managed > regions all should work well. When a device needs memory discardable > pages would get freed and movable moved unless there is no space left > on the device in which case allocation would fail. If you'd actually looked at the page allocator you'd see its capable of doing exactly that! I has the notion of movable pages, it can defragment free space (called compaction). Use it! From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753162Ab0HZITY (ORCPT ); Thu, 26 Aug 2010 04:19:24 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:44983 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752998Ab0HZITW convert rfc822-to-8bit (ORCPT ); Thu, 26 Aug 2010 04:19:22 -0400 Subject: Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator framework From: Peter Zijlstra To: =?UTF-8?Q?Micha=C5=82?= Nazarewicz Cc: Andrew Morton , Hans Verkuil , Daniel Walker , Russell King , Jonathan Corbet , Mel Gorman , Pawel Osciak , Konrad Rzeszutek Wilk , linux-kernel@vger.kernel.org, FUJITA Tomonori , linux-mm@kvack.org, Kyungmin Park , Zach Pfeffer , Mark Brown , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Marek Szyprowski In-Reply-To: References: <1282310110.2605.976.camel@laptop> <20100825155814.25c783c7.akpm@linux-foundation.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Thu, 26 Aug 2010 10:18:57 +0200 Message-ID: <1282810737.1975.240.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2010-08-26 at 04:40 +0200, MichaƂ Nazarewicz wrote: > I think that the biggest problem is fragmentation here. For instance, > I think that a situation where there is enough free space but it's > fragmented so no single contiguous chunk can be allocated is a serious > problem. However, I would argue that if there's simply no space left, > a multimedia device could fail and even though it's not desirable, it > would not be such a big issue in my eyes. > > So, if only movable or discardable pages are allocated in CMA managed > regions all should work well. When a device needs memory discardable > pages would get freed and movable moved unless there is no space left > on the device in which case allocation would fail. If you'd actually looked at the page allocator you'd see its capable of doing exactly that! I has the notion of movable pages, it can defragment free space (called compaction). Use it! From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with ESMTP id 5944F6B01F1 for ; Thu, 26 Aug 2010 04:19:04 -0400 (EDT) Subject: Re: [PATCH/RFCv4 0/6] The Contiguous Memory Allocator framework From: Peter Zijlstra In-Reply-To: References: <1282310110.2605.976.camel@laptop> <20100825155814.25c783c7.akpm@linux-foundation.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 26 Aug 2010 10:18:57 +0200 Message-ID: <1282810737.1975.240.camel@laptop> Mime-Version: 1.0 Sender: owner-linux-mm@kvack.org To: =?UTF-8?Q?Micha=C5=82?= Nazarewicz Cc: Andrew Morton , Hans Verkuil , Daniel Walker , Russell King , Jonathan Corbet , Mel Gorman , Pawel Osciak , Konrad Rzeszutek Wilk , linux-kernel@vger.kernel.org, FUJITA Tomonori , linux-mm@kvack.org, Kyungmin Park , Zach Pfeffer , Mark Brown , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Marek Szyprowski List-ID: On Thu, 2010-08-26 at 04:40 +0200, Micha=C5=82 Nazarewicz wrote: > I think that the biggest problem is fragmentation here. For instance, > I think that a situation where there is enough free space but it's > fragmented so no single contiguous chunk can be allocated is a serious > problem. However, I would argue that if there's simply no space left, > a multimedia device could fail and even though it's not desirable, it > would not be such a big issue in my eyes. >=20 > So, if only movable or discardable pages are allocated in CMA managed > regions all should work well. When a device needs memory discardable > pages would get freed and movable moved unless there is no space left > on the device in which case allocation would fail.=20 If you'd actually looked at the page allocator you'd see its capable of doing exactly that! I has the notion of movable pages, it can defragment free space (called compaction). Use it! -- 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