Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 6 Oct 2001 10:44:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 6 Oct 2001 10:44:28 -0400 Received: from artax.karlin.mff.cuni.cz ([195.113.31.125]:270 "EHLO artax.karlin.mff.cuni.cz") by vger.kernel.org with ESMTP id ; Sat, 6 Oct 2001 10:44:21 -0400 Date: Sat, 6 Oct 2001 16:44:43 +0200 (CEST) From: Mikulas Patocka To: Rik van Riel cc: Krzysztof Rusocki , linux-xfs@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: %u-order allocation failed In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="1908636959-741352904-1002379483=:29342" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --1908636959-741352904-1002379483=:29342 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sat, 6 Oct 2001, Rik van Riel wrote: > On Sat, 6 Oct 2001, Mikulas Patocka wrote: > > > Buddy allocator is broken - kill it. Or at least do not misuse it for > > anything except kernel or driver initialization. > > Please send patches to get rid of the buddy allocator while > still making it possible to allocate contiguous chunks of > memory. > > If you have any idea on how to fix things, this would be a > good time to let us know. Here goes the fix. (note that I didn't try to compile it so there may be bugs, but you see the point). kmalloc should be fixed too (used badly for example in select.c - and yes - I have seen real world bugreports for poll randomly failing with ENOMEM), but it will be hard to audit all drivers that they do not try to use dma on kmallocated memory. Mikulas --1908636959-741352904-1002379483=:29342 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="vmalloc.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: ZGlmZiAtdSAtciBsaW51eC1vcmlnL2luY2x1ZGUvYXNtLWkzODYvcHJvY2Vz c29yLmggbGludXgvaW5jbHVkZS9hc20taTM4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gcGFnZSAqIHBhZ2U7 DQogDQogCXBhZ2UgPSBhbGxvY19wYWdlcyhnZnBfbWFzaywgb3JkZXIpOw0K LQlpZiAoIXBhZ2UpDQotCQlyZXR1cm4gMDsNCi0JcmV0dXJuICh1bnNpZ25l ZCBsb25nKSBwYWdlX2FkZHJlc3MocGFnZSk7DQorCWlmIChwYWdlKSByZXR1 cm4gKHVuc2lnbmVkIGxvbmcpIHBhZ2VfYWRkcmVzcyhwYWdlKTsNCisJaWYg KGdmcF9tYXNrICYgX19HRlBfVk1BTExPQykgcmV0dXJuICh1bnNpZ25lZCBs b25nKV9fdm1hbGxvYyhQQUdFX1NJWkUgPDwgb3JkZXIsIGdmcF9tYXNrLCBQ QUdFX0tFUk5FTCk7DQorCXJldHVybiAwOw0KIH0NCiANCiB1bnNpZ25lZCBs b25nIGdldF96ZXJvZWRfcGFnZSh1bnNpZ25lZCBpbnQgZ2ZwX21hc2spDQpA QCAtNDQ3LDYgKzQ0OCwxMCBAQA0KIA0KIHZvaWQgZnJlZV9wYWdlcyh1bnNp Z25lZCBsb25nIGFkZHIsIHVuc2lnbmVkIGludCBvcmRlcikNCiB7DQorCWlm IChhZGRyID49IFZNQUxMT0NfU1RBUlQgJiYgYWRkciA8IFZNQUxMT0NfRU5E KSB7DQorCQl2ZnJlZSgodm9pZCAqKWFkZHIpOw0KKwkJcmV0dXJuOw0KKwl9 DQogCWlmIChhZGRyICE9IDApDQogCQlfX2ZyZWVfcGFnZXModmlydF90b19w YWdlKGFkZHIpLCBvcmRlcik7DQogfQ0K --1908636959-741352904-1002379483=:29342-- - 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/