Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 26 Oct 2001 12:58:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 26 Oct 2001 12:58:37 -0400 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:4100 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Fri, 26 Oct 2001 12:58:19 -0400 Date: Fri, 26 Oct 2001 09:57:02 -0700 (PDT) From: Linus Torvalds To: Zlatko Calusic cc: Jens Axboe , Marcelo Tosatti , , lkml Subject: Re: xmm2 - monitor Linux MM active/inactive lists graphically In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="168447515-392138068-1004115422=:2939" 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. --168447515-392138068-1004115422=:2939 Content-Type: TEXT/PLAIN; charset=US-ASCII On 26 Oct 2001, Zlatko Calusic wrote: > > When I find some time, I'll dig around that code. It is very > interesting part of the kernel, I'm sure, I just didn't have enough > time so far, to spend hacking on that part. Attached is a very untested patch (but hey, it compiles, so it must work, right?) against 2.4.14-pre2, that makes the batching be a high/low watermark thing instead. It actually simplified the code, but that is, of course, assuming that it works at all ;) (If I got the comparisons wrong, of if I update the counts wrong, your IO queue will probably stop cold. So be careful. The code is obvious enough, but typos and thinkos happen). Linus --168447515-392138068-1004115422=:2939 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=p2p3 Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=p2p3 ZGlmZiAtdSAtLXJlY3Vyc2l2ZSBwcmUyL2xpbnV4L2RyaXZlcnMvYmxvY2sv bGxfcndfYmxrLmMgbGludXgvZHJpdmVycy9ibG9jay9sbF9yd19ibGsuYw0K LS0tIHByZTIvbGludXgvZHJpdm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vbGludXgvaW5jbHVkZS9saW51eC9ibGtkZXYuaCBsaW51eC9pbmNs dWRlL2xpbnV4L2Jsa2Rldi5oDQotLS0gcHJlMi9saW51eC9pbmNsdWRlL2xp bnV4L2Jsa2Rldi5oCVR1ZSBPY3QgMjMgMjI6MDE6MDEgMjAwMQ0KKysrIGxp bnV4L2luY2x1ZGUvbGludXgvYmxrZGV2LmgJRnJpIE9jdCAyNiAwOTozNjo0 MSAyMDAxDQpAQCAtNjYsMTQgKzY2LDE3IEBADQogICovDQogI2RlZmluZSBR VUVVRV9OUl9SRVFVRVNUUwk4MTkyDQogDQorc3RydWN0IHJlcXVlc3RfbGlz dCB7DQorCXVuc2lnbmVkIGludCBjb3VudDsNCisJc3RydWN0IGxpc3RfaGVh ZCBmcmVlOw0KK307DQorDQogc3RydWN0IHJlcXVlc3RfcXVldWUNCiB7DQog CS8qDQogCSAqIHRoZSBxdWV1ZSByZXF1ZXN0IGZyZWVsaXN0LCBvbmUgZm9y IHJlYWRzIGFuZCBvbmUgZm9yIHdyaXRlcw0KIAkgKi8NCi0Jc3RydWN0IGxp c3RfaGVhZAlyZXF1ZXN0X2ZyZWVsaXN0WzJdOw0KLQlzdHJ1Y3QgbGlzdF9o ZWFkCXBlbmRpbmdfZnJlZWxpc3RbMl07DQotCWludAkJCXBlbmRpbmdfZnJl ZVsyXTsNCisJc3RydWN0IHJlcXVlc3RfbGlzdAlycVsyXTsNCiANCiAJLyoN CiAJICogVG9nZXRoZXIgd2l0aCBxdWV1ZV9oZWFkIGZvciBjYWNoZWxpbmUg c2hhcmluZw0K --168447515-392138068-1004115422=:2939-- - 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/