Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 9 Mar 2003 23:27:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 9 Mar 2003 23:27:05 -0500 Received: from mail.gmx.net ([213.165.64.20]:528 "HELO mail.gmx.net") by vger.kernel.org with SMTP id ; Sun, 9 Mar 2003 23:27:01 -0500 Message-Id: <5.2.0.9.2.20030310052059.00c8f828@pop.gmx.net> X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Mon, 10 Mar 2003 05:42:04 +0100 To: rwhron@earthlink.net From: Mike Galbraith Subject: Re: scheduler starvation running irman with 2.5.64bk2 Cc: linux-kernel@vger.kernel.org, Ingo Molnar In-Reply-To: <20030309025015.GA2843@rushmore> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=====================_5116515==_" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6832 Lines: 107 --=====================_5116515==_ Content-Type: text/plain; charset="us-ascii"; format=flowed At 09:50 PM 3/8/2003 -0500, rwhron@earthlink.net wrote: >irman triggers some odd behavior with 2.5.64bk2 on uniprocessor >K6/2 475. "ps aux" hasn't returned for a couple hours, though >irman appears to be doing it's thing. I haven't tried irman on smp. OK, can you do the following to determine whether we're both seeing the _same_ problem? 1.) build the attached rtnice utility (don't remember who wrote/posted this) 2.) login on vt1 and set the shell SCHED_RR via rtnice -n 1 -p -d RR 3.) login on vt2 and renice that shell to -10 4.) login on another vt as a normal user, and start irman 5.) try login/out on another vt, or ps or _whatever_ (doesn't matter) until box is starving 6.) on vt2, try to do ps (it should hang despite -10 priority) 7.) on vt1, try to do ps (it should work just fine) cc to Ingo since stock .64 doesn't show this problem, and .64-combo and .64-B2 do. -Mike --=====================_5116515==_ Content-Type: text/plain; name="rtnice.c"; x-mac-type="42494E41"; x-mac-creator="74747874" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="rtnice.c" I2luY2x1ZGUgPH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CQlpZiAocG9saWN5ID09IFNDSEVEX1JSKSBwb2wgPSAiUlIiOwoKIAkJCWZwcmludGYo c3Rkb3V0LCIlczogc2NoZWR1bGVyICVzIHByaW9yaXR5ICVkLlxuIiwgcHJvZ25hbWUsIHBvbCwg cHJpb3JpdHkpOwoKCQkJZXhpdCgwKTsKIAkJfQoJfQoJaWYgKHBvbGljeSA9PSBTQ0hFRF9PVEhF UiB8fCBwb2xpY3kgPT0gU0NIRURfSURMRSkKCQlwcmlvcml0eSA9IDA7CgoJcGFyYW0uc2NoZWRf cHJpb3JpdHkgPSBwcmlvcml0eTsKCglpZiAoc2NoZWRfc2V0c2NoZWR1bGVyKHBpZCwgcG9saWN5 LCAmcGFyYW0pID09IC0xKQl7CgkJcGVycm9yKCJzY2hlZF9zZXRzY2hlZHVsZXIgZmFpbHMiKTsK CQlleGl0KDEzKTsKCX0KCglpZiAocGlkICE9IDApCXsgIC8qIG5vbi1sb2NhbCB0YXJnZXQgPT4g ZXhpdCAqLwoJCWV4aXQoMCk7Cgl9CgoJaWYgKCFhcmd2WzBdKQl7CgkJZnByaW50ZihzdGRlcnIs IiVzOiBubyB2YWxpZCBjb21tYW5kIGFyZ3MuXG4iLCBwcm9nbmFtZSk7CgkJZnByaW50ZihzdGRl cnIsIHVzYWdlLCBwcm9nbmFtZSk7CgoJCWV4aXQoMTQpOyAgLyogZG9uJ3QgZXhlYyBpZiB0YXJn ZXQgd2FzIG5vdCB1cyBvciBubyBhcmdzICAqLwoJfQoKCQkvKiB0aGUgYmlnIGxlYXAhICovCgkJ LyogaGFsOiBkYXZlLCB3aWxsIEkgZHJlYW0/ICovCgoJaWYgKCFleGVjdnAoYXJndlswXSwgJmFy Z3ZbMF0pKQl7CgkJcGVycm9yKCJydHJ1biBleGVjIGZhaWxzIik7CgkJZXhpdCgtMSk7Cgl9Cn0K --=====================_5116515==_-- - 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/