From owner-freebsd-current@FreeBSD.ORG Sun Aug 10 00:03:19 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3FCF37B401; Sun, 10 Aug 2003 00:03:18 -0700 (PDT) Received: from fepX.post.tele.dk (fepx.post.tele.dk [195.41.46.234]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73EAE43F3F; Sun, 10 Aug 2003 00:03:15 -0700 (PDT) (envelope-from pho@holm.cc) Received: from peter.osted.lan ([80.164.63.151]) by fepX.post.tele.dk (InterMail vM.5.01.06.04 201-253-122-130-104-20030726) with ESMTP id <20030810070313.RHGB20854.fepX.post.tele.dk@peter.osted.lan>; Sun, 10 Aug 2003 09:03:13 +0200 Received: from peter.osted.lan (localhost [127.0.0.1]) by peter.osted.lan (8.12.8/8.12.8) with ESMTP id h7A73DZN097503; Sun,: 03:13 +0200 (CEST) (envelope-from pho@peter.osted.lan) Received: (from pho@localhost) by peter.osted.lan (8.12.8/8.12.8/Submit) id h7A73Cmt097502; Sun,: 03:12 +0200 (CEST) Date: Sun, 10 Aug 2003 09:03:12 +0200 From: Peter Holm To: freebsd-current@freebsd.org Message-ID: <20030810070311.GA97363@peter.osted.lan> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline User-Agent: Mutt/1.4i Subject: Deadlock [PATCH] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2003 07:03:19 -0000 --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I have tracked down, what I belive to be the cause of several deadlock situations I have encountered, like http://people.freebsd.org/~pho/stress/cons40.html. The problem seems to be the 4bsd scheduler, that does not preempt correctly. I've included a patch that fixes the problem for me. -- Peter Holm --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sched_4bsd.diff" --- sched_4bsd.c~ Sun Jun 15 16:57:17 2003 +++ sched_4bsd.c Sun Aug 10 08:41:06 2003 @@ -448,7 +448,8 @@ ke->ke_sched->ske_cpticks++; kg->kg_estcpu = ESTCPULIM(kg->kg_estcpu + 1); - if ((kg->kg_estcpu % INVERSE_ESTCPU_WEIGHT) == 0) { + if (((kg->kg_estcpu + 1) % INVERSE_ESTCPU_WEIGHT) == 0) { + curthread->td_flags |= TDF_NEEDRESCHED; resetpriority(kg); if (td->td_priority >= PUSER) td->td_priority = kg->kg_user_pri; --OXfL5xGRrasGEqWY-- From owner-freebsd-current@FreeBSD.ORG Sun Aug 10 01:02:03 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9460237B401 for ; Sun, 10 Aug 2003 01:02:03 -0700 (PDT) Received: from web11402.mail.yahoo.com (web11402.mail.yahoo.com [216.136.131.232]) by mx1.FreeBSD.org (Postfix) with SMTP id 2375343F3F for ; Sun, 10 Aug 2003 01:02:03 -0700 (PDT) (envelope-from shizukakudo_99@yahoo.com) Message-ID: <20030810080203.82596.qmail@web11402.mail.yahoo.com> Received: from [218.102.195.157] by web11402.mail.yahoo.com via HTTP; Sun, 10 Aug 2003 01:02:03 PDT Date: Sun, 10 Aug 2003 01:02:03 -0700 (PDT) From: Shizuka Kudo To: Mike Bohan , freebsd-current@freebsd.org In-Reply-To: <1060489279.12815.26.camel@diesel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: Problem with PS/2 mouse driver in XFree86 4.3.0 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2003 08:02:03 -0000 --- Mike Bohan wrote: > Hello, > > I have an Abit KT266 based motherboard and am having some trouble using > the PS/2 mouse driver under XFree86. I have the protocol set to "auto", > and the device set to /dev/psm0. This configuration has worked with > this same Intellimouse in the past. The symptoms are that that when the > mouse is moved, the cursor is only updated about once a second. After > searching google, I found the following URL in which another person > experienced the same problem (from freebsd-bugs). Apparently it only > shows up on certain chipsets (VIA based). I tried several other PS/2 > mice, to no avail (same outcome). My system is running a day old > -current build, but this other fellow reported the problem in 5.0 (does > not affect 4.x). I'm wondering if anyone else has experienced this > problem, and if so, are there any work-arounds? I've attached my > 'dmesg' output, in the hopes that the information will be of value. > Thank you in advance! > Does disabling acpi make your mouse working? > URL: > http://lists.freebsd.org/pipermail/freebsd-bugs/2003-April/000426.html > > -Mike Bohan > > Copyright (c) 1992-2003 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights > reserved. > FreeBSD 5.1-CURRENT #3: Fri Aug 8 09:10:54 EDT 2003 > root@censored:/usr/obj/usr/src/sys/CABOOSE > Preloaded elf kernel "/boot/kernel/kernel" at 0xc0424000. > Preloaded elf module "/boot/kernel/acpi.ko" at 0xc0424244. > Timecounter "i8254" frequency 1193182 Hz > CPU: AMD Athlon(tm) processor (1333.91-MHz 686-class CPU) > Origin = "AuthenticAMD" Id = 0x644 Stepping = 4 > > Features=0x183fbff > AMD Features=0xc0440000 > real memory = 268369920 (255 MB) > avail memory = 256196608 (244 MB) > Pentium Pro MTRR support enabled > npx0: on motherboard > npx0: INT 16 interface > acpi0: on motherboard > pcibios: BIOS version 2.10 > Using $PIR table, 8 entries at 0xc00fdef0 > acpi0: power button is handled as a fixed feature programming model. > Timecounter "ACPI-fast" frequency 3579545 Hz > acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 > acpi_cpu0: on acpi0 > acpi_tz0: on acpi0 > acpi_button0: on acpi0 > acpi_button1: on acpi0 > pcib0: port > 0x5000-0x500f,0x4080-0x40ff,0x4000-0x407f,0xcf8-0xcff on acpi0 > pci0: on pcib0 > pcib0: slot 8 INTA is routed to irq 10 > pcib0: slot 9 INTA is routed to irq 5 > pcib0: slot 11 INTA is routed to irq 10 > agp0: mem 0xe8000000-0xebffffff at > device 0.0 on pci0 > pcib1: at device 1.0 on pci0 > pci1: on pcib1 > pcib0: slot 1 INTA is routed to irq 11 > pcib1: slot 0 INTA is routed to irq 11 > pci1: at device 0.0 (no driver attached) > dc0: port 0xd000-0xd0ff mem > 0xef000000-0xef0003ff irq 10 at device 8.0 on pci0 > dc0: Ethernet address: 00:04:5a:40:b5:0d > miibus0: on dc0 > ukphy0: on miibus0 > ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto > dc1: port 0xd400-0xd4ff mem > 0xef001000-0xef0010ff irq 5 at device 9.0 on pci0 > dc1: Ethernet address: 00:a0:cc:34:54:93 > miibus1: on dc1 > dcphy0: on miibus1 > dcphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto > dc2: <82c169 PNIC 10/100BaseTX> port 0xd800-0xd8ff mem > 0xef002000-0xef0020ff irq 10 at device 11.0 on pci0 > dc2: Ethernet address: 00:a0:cc:d6:ea:b4 > miibus2: on dc2 > bmtphy0: on miibus2 > bmtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto > isab0: at device 17.0 on pci0 > isa0: on isab0 > atapci0: port 0xdc00-0xdc0f at device > 17.1 on pci0 > ata0: at 0x1f0 irq 14 on atapci0 > ata1: at 0x170 irq 15 on atapci0 > fdc0: port > 0x3f7,0x3f2-0x3f5 irq 6 drq 2 on acpi0 > fdc0: FIFO enabled, 8 bytes threshold > fd0: <1440-KB 3.5" drive> on fdc0 drive 0 > atkbdc0: port 0x64,0x60 irq 1 on acpi0 > atkbd0: flags 0x1 irq 1 on atkbdc0 > kbd0 at atkbd0 > psm0: irq 12 on atkbdc0 > psm0: model IntelliMouse, device ID 3 > orm0: