Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S275530AbTHNUgL (ORCPT ); Thu, 14 Aug 2003 16:36:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S275535AbTHNUgL (ORCPT ); Thu, 14 Aug 2003 16:36:11 -0400 Received: from chaos.analogic.com ([204.178.40.224]:8576 "EHLO chaos.analogic.com") by vger.kernel.org with ESMTP id S275530AbTHNUgB (ORCPT ); Thu, 14 Aug 2003 16:36:01 -0400 Date: Thu, 14 Aug 2003 16:36:25 -0400 (EDT) From: "Richard B. Johnson" X-X-Sender: root@chaos Reply-To: root@chaos.analogic.com To: vladimir.kondratiev@intel.com cc: Linux kernel Subject: Kernel threads resource leakage Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="1678434306-1036104176-1060893385=:11823" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9073 Lines: 165 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. --1678434306-1036104176-1060893385=:11823 Content-Type: TEXT/PLAIN; charset=US-ASCII I am using a 2.4.20 kernel. I tried your program. First, it didn't compile. So I would guess that you never tested your test program. I fixed it and I made a more readily useful Makefile, etc., so others can try it, too. It is attached. It works. It doesn't eat any resources. I guess that the stuff that actually does 'work' in your actual driver module is what is consuming resources. Although making and deleting a number of kernel threads is an interesting exercise, I sure hope that you don't really do this in a real application. It is very expensive to do this. If you need a kernel thread, you should have one (or several) that do the work and never exit. Cheers, Dick Johnson Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips). Note 96.31% of all statistics are fiction. --1678434306-1036104176-1060893385=:11823 Content-Type: APPLICATION/octet-stream; name="kth.tar.gz" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="kth.tar.gz" H4sIAETwOz8AA+w8bWwcx3V7kixLa7m2AyN1Wjcd0bR0R93X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In6mS0oY byHXh1dR8kisCGEIaueWY1hr5JZ416G3ThIOSayTVJXdJSVbansApQEzyIwz O5go3MoOwpQ4J91zYLZVGB8gGzaxnJK5E8x2W0u2LdsdyHcx3Y8dggIm+dyd YIc8xh0g+WLHiscDeWSxUcnc0i+E8Rrter9vKPavJxlnUs6N3xG3KIsWnmoM QD6u9COfUDIM+R2xjMjNhjNAGuPZftTc5rOF9B2vocaQpzZUaGxblhHIqJtW xzp9yStFkDn47Yld9AUzU0hnjUmC9zdtl19smyZlN5JOv7gmBripYsG32dDh Zc+cqKul7Jar1lsDcPbzTopsCVB3TNW0+I1ND++Js9jIfv6CI3pFAhPvY1WZ YG4Av+/EOFur4AVO9WNW+nVGyWcZ5jszezOMObSxsp/J92LOpMeZnhaYeLkt cMwIx0WxqoIzlzsiFSMHLRZXQHCz7PxJa6qmjy3r88l4VPFnNFskCxqbJvCW HYB/gPvbBX9uV/y5AfgHbDm74M/vij8/AP8AJ7sL/sKu+Au9ip0pdJy4kg8o Bwywnc1fze4t023WlEJmPB/rUZDcRD7w3IofeSnKONJB/92nIJl+BelSZOaa lS51y/GdEiyvrbcpu3khd6TIIdFOFJQiEeqsBP5IKeCjUPA55GVRzCc9mZ0g wGTotwk9WEGgeV8GgUCVNDO8XLHQj9WffRt2ckO9vDlghSZ8ZhnDPSvUhXCF dOyN/TSDDHPoYRmWYRmWYRmWYRmWYRmWYRmWYRmW/20PDgkAAAAABP1/7Qob AAAAAADAIMXyIV0AeAAA --1678434306-1036104176-1060893385=:11823-- - 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/