From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 10:07:51 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B6D716A421 for ; Sun, 30 Oct 2005 10:07:51 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web35708.mail.mud.yahoo.com (web35708.mail.mud.yahoo.com [66.163.179.162]) by mx1.FreeBSD.org (Postfix) with SMTP id 7E72643D45 for ; Sun, 30 Oct 2005 10:07:50 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 12793 invoked by uid 60001); 30 Oct 2005 10:07:49 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Si9cIv8+tYiczo7gnlrRh+kpnGd9KRHupR/nziP6/ClC5j2yjd2Od0Q1GCS4w1A8WrOQ+X5nRfJm7Jgxk/nUT62l0ATdicp7If68Z+rm0GJerCxkatSeGbQ3oH1D/XBvRBYUWEfPQeqs4obBdcAvZWj948X2YOIROtuy2YMqyps= ; Message-ID: <20051030100749.12791.qmail@web35708.mail.mud.yahoo.com> Received: from [202.79.62.15] by web35708.mail.mud.yahoo.com via HTTP; Sun, 30 Oct 2005 02:07:49 PST Date: Sun, 30 Oct 2005 02:07:49 -0800 (PST) From: kamal kc To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd , freebsd Subject: tcp services (ssh,ftp) does not work X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2005 10:07:51 -0000 dear all, i have put sshd_enable="YES" and inetd_enable="YES" in /etc/rc.conf. netstat -an also shows that the port numbers 21 and 22 are in listen state ftp is uncommented in /etc/inetd.conf but still the ssh/ftp services does not work. when i ftp from another computer the netstat shows connection established but the ftp client does not show anything. using ftp/ssh on the same computer also does not show anything --- just blank. what could have gone wrong. Help !!! kamal __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 29 20:30:07 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B605716A41F for ; Sat, 29 Oct 2005 20:30:07 +0000 (GMT) (envelope-from baguagrover@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2ADA143D46 for ; Sat, 29 Oct 2005 20:30:07 +0000 (GMT) (envelope-from baguagrover@gmail.com) Received: by xproxy.gmail.com with SMTP id t14so588049wxc for ; Sat, 29 Oct 2005 13:30:06 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=r9u6v3NJ1Wt4Agm0btC26KZycYGZaUzo5dyzxje4LBNfubL11ZyW4zokc80rxK8Bd6or8jFsqitgESNLEsUYMuP40CILMfeN4m6AdExp0ILWi9s4O6a1wKCSV1342ESLeHTYIV3FZoOWGrtKIewdA5CfNIdEFtXvev5gAQD/LHI= Received: by 10.70.131.6 with SMTP id e6mr969603wxd; Sat, 29 Oct 2005 13:23:51 -0700 (PDT) Received: by 10.65.177.13 with HTTP; Sat, 29 Oct 2005 13:23:21 -0700 (PDT) Message-ID: <729088040510291323i192edabemba596b45e7b029fa@mail.gmail.com> Date: Sat, 29 Oct 2005 13:23:21 -0700 From: grover mitchell To: freebsd-hackers@freebsd.org MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 30 Oct 2005 13:12:00 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: monitoring resident memory of a process X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2005 20:30:07 -0000 I am trying to monitor the resident memory size of some apache processes to find out what the memory footprint is like. I was planning on using the per= l Proc::ProcessTable module, but it seems to be lacking information: uid: 0 gid: 0 pid: 78297 ppid: 78296 pgrp: 78297 sess: 78297 flags: sldr utime: 10.000000 stime: 12.000000 time: 22.000000 wchan: select start: 1129576848.000000 euid: 0 egid: 0 fname: apache state: select ttydev: ttynum: -1 cmndline: /usr/local/sbin/apache priority: 0 If I run the same script on a linux box, I get a table field called rss and size, which is exactly what I am looking for here. The system is FreeBSD 4.10. Any pointers would be great. Thanks! From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 13:16:26 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE5C716A41F for ; Sun, 30 Oct 2005 13:16:26 +0000 (GMT) (envelope-from david@madole.net) Received: from a.omd3.com (a.omd3.com [69.90.174.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id D167143D5C for ; Sun, 30 Oct 2005 13:16:25 +0000 (GMT) (envelope-from david@madole.net) Received: from dhcp-66-212-201-164.myeastern.com ([66.212.201.164] helo=david) by a.omd3.com with esmtpa (Exim 4.54) id 1EWD2u-000BC6-Vp; Sun, 30 Oct 2005 08:16:25 -0500 Message-ID: <053e01c5dd54$1faefc00$c3e7a8c0@david> From: "David S. Madole" To: "grover mitchell" , References: <729088040510291323i192edabemba596b45e7b029fa@mail.gmail.com> Date: Sun, 30 Oct 2005 08:16:22 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Cc: Subject: Re: monitoring resident memory of a process X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2005 13:16:26 -0000 > From: "grover mitchell" > > I am trying to monitor the resident memory size of some apache > processes to > find out what the memory footprint is like. I was planning on using the > perl > Proc::ProcessTable module, but it seems to be lacking information: How about 'ps v'? David From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 13:23:22 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 825CD16A45A; Sun, 30 Oct 2005 13:23:22 +0000 (GMT) (envelope-from ray@redshift.com) Received: from mail.quickmeet.com (quickmeet.com [216.228.17.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BAB843D48; Sun, 30 Oct 2005 13:23:22 +0000 (GMT) (envelope-from ray@redshift.com) Received: from workstation (workstation [192.168.20.250]) by mail.quickmeet.com (Postfix) with SMTP id D7E0C17032; Sun, 30 Oct 2005 04:55:34 -0800 (PST) Message-Id: <3.0.1.32.20051030052327.00a66128@pop.redshift.com> X-Mailer: na X-Sender: redshift.com Date: Sun, 30 Oct 2005 05:23:27 -0800 To: kamal kc , freebsd-questions@freebsd.org From: ray@redshift.com In-Reply-To: <20051030100749.12791.qmail@web35708.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: freebsd , freebsd Subject: Re: tcp services (ssh,ftp) does not work X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2005 13:23:23 -0000 At 02:07 AM 10/30/2005 -0800, kamal kc wrote: | dear all, | | i have put sshd_enable="YES" | and inetd_enable="YES" | in /etc/rc.conf. | | netstat -an also shows that the port numbers | 21 and 22 are in listen state | | ftp is uncommented in /etc/inetd.conf | | but still the ssh/ftp services does not work. | | when i ftp from another computer the netstat | shows connection established but the ftp client | does not show anything. | | using ftp/ssh on the same computer also does not show | anything --- just blank. | | | what could have gone wrong. | | Help !!! | | kamal telnet localhost 21 telnet localhost 22 see if you get connections do you have a firewall running? Such as ipf. If so, make sure you have rules to allow traffic on those ports from outside machines, etc. Ray From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 17:43:18 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E66B016A41F; Sun, 30 Oct 2005 17:43:18 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from geri.cc.fer.hr (geri.cc.fer.hr [161.53.72.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EB1643D45; Sun, 30 Oct 2005 17:43:17 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from geri.cc.fer.hr (localhost.cc.fer.hr [127.0.0.1]) by geri.cc.fer.hr (8.13.4/8.13.1) with ESMTP id j9UHbBZn019484; Sun, 30 Oct 2005 18:37:11 +0100 (CET) (envelope-from ivoras@fer.hr) Received: from localhost (ivoras@localhost) by geri.cc.fer.hr (8.13.4/8.13.1/Submit) with ESMTP id j9UHbBoT019481; Sun, 30 Oct 2005 18:37:11 +0100 (CET) (envelope-from ivoras@fer.hr) X-Authentication-Warning: geri.cc.fer.hr: ivoras owned process doing -bs Date: Sun, 30 Oct 2005 18:37:11 +0100 (CET) From: Ivan Voras Sender: ivoras@geri.cc.fer.hr To: freebsd-fs@freebsd.org Message-ID: <20051030183340.B19470@geri.cc.fer.hr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: ext2 large_file X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2005 17:43:19 -0000 I recently tried to use ext2 on FreeBSD but have decided not to when I saw that the support for large files is missing (and went with msdosfs instead). Now I accidentaly noticed that large_file support is present in latest NetBSD (and maybe OpenBSD). Is anyone interested in porting the support to FreeBSD? :) From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 18:10:19 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C3DD16A41F for ; Sun, 30 Oct 2005 18:10:19 +0000 (GMT) (envelope-from micheel_d23@yahoo.com.tr) Received: from web26508.mail.ukl.yahoo.com (web26508.mail.ukl.yahoo.com [217.146.176.45]) by mx1.FreeBSD.org (Postfix) with SMTP id D089643D48 for ; Sun, 30 Oct 2005 18:10:18 +0000 (GMT) (envelope-from micheel_d23@yahoo.com.tr) Received: (qmail 25045 invoked by uid 60001); 30 Oct 2005 18:10:17 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.tr; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=0+5eEWvrFUDaeK4FuT0Wa6v8bVzGr661Y+xKOaIxJaiabbNGq/CzhXuqZWSUegDXesr9sBiAjPF356K2ge/yQUC25E84aJ8tbPhSTUCbChPTZrlKXWJNXFfGamKWtof0RB9Fral4nesbag5+Ut1kOT+5rUkWz/6OihFQYUqxVd0= ; Message-ID: <20051030181017.25043.qmail@web26508.mail.ukl.yahoo.com> Received: from [81.214.137.234] by web26508.mail.ukl.yahoo.com via HTTP; Sun, 30 Oct 2005 20:10:17 EET Date: Sun, 30 Oct 2005 20:10:17 +0200 (EET) From: micheel drippee To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: signal handling in child process. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2005 18:10:19 -0000 hello, i have a daemon program and installed a signal_handler() function for it. from signal_handler: case SIGCHLD: if ((wait(&status)) == -1) return; if (WIFSIGNALED(status)) return; if (WIFSTOPPED(status)) return; if (WIFEXITED(status)) return; break; in child process i am doing a fork() and then execve. switch((pid = vfork())) { case -1: error... case 0: execve(); default: if (wait(&stat) == -1) { syslog(LOG_ERR, "wait: %s", strerror(errno)); return -1; } } The problem is that: when the executing program is exited wait() returns error. 'No child processes' I determined that, my signal handler catchs SIGCHLD when the process finish. And then waits it. So the child process cannot wait its own child. How can i solve this problem? I found a solution but i am not sure if it is best way. I ignore SIGCHLD in child before execve. signal(SIGCHLD, SIG_IGN); What is your comments. thank you.. -mch ___________________________________________________________________ Yahoo! kullaniyor musunuz? http://tr.mail.yahoo.com Istenmeyen postadan biktiniz mi? Istenmeyen postadan en iyi korunma Yahoo! Posta’da From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 23:32:24 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6BAA416A421 for ; Sun, 30 Oct 2005 23:32:24 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mail2.fluidhosting.com [204.14.90.62]) by mx1.FreeBSD.org (Postfix) with SMTP id 66BCB43D48 for ; Sun, 30 Oct 2005 23:32:23 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 60220 invoked by uid 399); 30 Oct 2005 23:32:22 -0000 Received: from localhost (HELO ?192.168.1.101?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 30 Oct 2005 23:32:22 -0000 Message-ID: <43655805.5000501@FreeBSD.org> Date: Sun, 30 Oct 2005 15:32:21 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: kamal kc References: <20051030100749.12791.qmail@web35708.mail.mud.yahoo.com> In-Reply-To: <20051030100749.12791.qmail@web35708.mail.mud.yahoo.com> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd , freebsd-questions@freebsd.org, freebsd Subject: Re: tcp services (ssh,ftp) does not work X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2005 23:32:24 -0000 For future reference, you should not cross post to FreeBSD lists. If you are unsure what the best list will be, start with freebsd-questions. Good luck, Doug -- This .signature sanitized for your protection From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 31 10:58:51 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F96316A420 for ; Mon, 31 Oct 2005 10:58:51 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web35705.mail.mud.yahoo.com (web35705.mail.mud.yahoo.com [66.163.179.159]) by mx1.FreeBSD.org (Postfix) with SMTP id BC15143D53 for ; Mon, 31 Oct 2005 10:58:50 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 97238 invoked by uid 60001); 31 Oct 2005 10:58:50 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=qHhFW7YtoR7Aa1cp+R12TEPKc8aQW2RXqemD7LFVoJ7n0v4/ZmolR5RpWAAi/neiaBd3Q8tUyyqD6K6vBjeimE/144OL0TG3ArVWIAH1hItOiW+P1qvZL/4Ut0Q3RVaMzM940pHCFC1rI2BDY3cqqriwL0zBZJoeW6g+MM9QU4w= ; Message-ID: <20051031105850.97235.qmail@web35705.mail.mud.yahoo.com> Received: from [202.79.62.15] by web35705.mail.mud.yahoo.com via HTTP; Mon, 31 Oct 2005 02:58:50 PST Date: Mon, 31 Oct 2005 02:58:50 -0800 (PST) From: kamal kc To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd Subject: kernel crash dump could not be obtained X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Oct 2005 10:58:51 -0000 dear all, i have to make modifictions to the kernel and i have been encountering kernel crashes all the time. the kernel panics with messages starting with vm_fault: and then crashes and reboots. i guess i have done incorrect memory operations and i want to know where i went wrong. so i thought of obtaining the crash dump. i went through the developers guide. and i added the following lines on the /etc/rc.conf --- dumpdev="/dev/ad0s1b" dumpdir="/var/crash" savecore_flags="" -- the /etc/fstab file is Device Mountpoint FStype Options Dump Pass# /dev/ad0s1b none swap sw 0 0 /dev/ad0s1a / ufs rw 1 1 /dev/ad0s1e /tmp ufs rw 2 2 /dev/ad0s1f /usr ufs rw 2 2 /dev/ad0s1d /var ufs rw 2 2 /dev/acd0 /cdrom cd9660 ro,noauto 0 0 swap partition is /dev/ad0s1b swapinfo gives the output:-- Device 1K-blocks Used Avail Capacity /dev/ad0s1b 495048 0 495048 0% My memory size according to dmesg is -- real memory = 266600448 (254 MB) avail memory = 251232256 (239 MB) -- Now when the kernel crashes it prints the message writing dump 240MB but rebooting does not show any crash dump file on /var/crash. please help kamal __________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 30 15:15:47 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF8E616A41F; Sun, 30 Oct 2005 15:15:47 +0000 (GMT) (envelope-from jas@math.jussieu.fr) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05DB643D5D; Sun, 30 Oct 2005 15:15:39 +0000 (GMT) (envelope-from jas@math.jussieu.fr) Received: from riemann.math.jussieu.fr (riemann.math.jussieu.fr [134.157.13.3]) by shiva.jussieu.fr (8.13.5/jtpda-5.4) with ESMTP id j9UFFaX8065138 ; Sun, 30 Oct 2005 16:15:37 +0100 (CET) X-Ids: 168 Received: from grobner2.math.jussieu.fr (grobner2.math.jussieu.fr [134.157.13.119]) by riemann.math.jussieu.fr (8.12.10/jtpda-5.4) with ESMTP id j9UFFYN3056035 ; Sun, 30 Oct 2005 16:15:34 +0100 (CET) Received: from grobner2.math.jussieu.fr (localhost.localdomain [127.0.0.1]) by grobner2.math.jussieu.fr (8.13.1/jtpda-5.4) with ESMTP id j9UFFYmZ018527 ; Sun, 30 Oct 2005 16:15:34 +0100 Received: (from jas@localhost) by grobner2.math.jussieu.fr (8.13.1/8.13.1/Submit) id j9UFFXuj018526; Sun, 30 Oct 2005 16:15:33 +0100 Date: Sun, 30 Oct 2005 16:15:33 +0100 From: Albert Shih To: kamal kc Message-ID: <20051030151533.GA15623@math.jussieu.fr> References: <20051030100749.12791.qmail@web35708.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20051030100749.12791.qmail@web35708.mail.mud.yahoo.com> User-Agent: Mutt/1.5.6i X-Spam-Score: -1.44 () ALL_TRUSTED X-Scanned-By: MIMEDefang 2.53 on 134.157.13.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.7.2 (shiva.jussieu.fr [134.157.0.168]); Sun, 30 Oct 2005 16:15:38 +0100 (CET) X-Antivirus: scanned by sophie at shiva.jussieu.fr X-Miltered: at shiva.jussieu.fr with ID 4364E398.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Mailman-Approved-At: Mon, 31 Oct 2005 12:48:40 +0000 Cc: freebsd , freebsd-questions@freebsd.org, freebsd Subject: Re: tcp services (ssh,ftp) does not work X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: shih@math.jussieu.fr List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Oct 2005 15:15:48 -0000 Le 30/10/2005 à 02:07:49-0800, kamal kc a écrit > dear all, > > i have put sshd_enable="YES" > and inetd_enable="YES" > in /etc/rc.conf. > > netstat -an also shows that the port numbers > 21 and 22 are in listen state > > ftp is uncommented in /etc/inetd.conf > > but still the ssh/ftp services does not work. > > when i ftp from another computer the netstat > shows connection established but the ftp client > does not show anything. > > using ftp/ssh on the same computer also does not show > anything --- just blank. > > > what could have gone wrong. Check your /etc/hosts.allow Regards. -- Albert SHIH Universite de Paris 7 (Denis DIDEROT) U.F.R. de Mathematiques. Heure local/Local time: Sun Oct 30 16:15:08 CET 2005 From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 31 03:16:56 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41AB416A420 for ; Mon, 31 Oct 2005 03:16:56 +0000 (GMT) (envelope-from jason.harmening@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0694243D46 for ; Mon, 31 Oct 2005 03:16:54 +0000 (GMT) (envelope-from jason.harmening@gmail.com) Received: by zproxy.gmail.com with SMTP id 40so754247nzk for ; Sun, 30 Oct 2005 19:16:54 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id:from; b=Wi9rlsHJQN4bEBp4qlpNaljWvpdT2vZNlVFC5y9TDsqbaV25wZUHo/GRdbRnr3tUEKXrynclNSRpdhs1ET7rTOHSIZUzL/+0pjW9TxGTa48wtBDUj6MC9q7daGqf6ZkE8SNoyKgoB+xS2mO7PyFrYciNrdTO0dCv0Ddi54HRN6E= Received: by 10.36.129.4 with SMTP id b4mr2219113nzd; Sun, 30 Oct 2005 19:16:54 -0800 (PST) Received: from ?192.168.0.3? ( [70.112.17.171]) by mx.gmail.com with ESMTP id i5sm2078302nzi.2005.10.30.19.16.53; Sun, 30 Oct 2005 19:16:53 -0800 (PST) To: =?iso-8859-1?q?S=F8ren_Schmidt?= Date: Sun, 30 Oct 2005 21:17:04 -0600 User-Agent: KMail/1.8.2 References: <200510232049.16352.Jason.Harmening@gmail.com> <08AD1F28-AE42-4C36-B5E0-3E909130BDB8@FreeBSD.org> In-Reply-To: <08AD1F28-AE42-4C36-B5E0-3E909130BDB8@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200510302117.04602.Jason.Harmening@gmail.com> From: Jason Harmening X-Mailman-Approved-At: Mon, 31 Oct 2005 12:48:40 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: Native ATAPI MO driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Oct 2005 03:16:56 -0000 On Monday 24 October 2005 11:27, S=F8ren Schmidt wrote: > On 24/10/2005, at 3:49, Jason Harmening wrote: > > Hi, > > > > I have a 2.3G Fujitsu MO drive, and I've gotten tired of using > > atapicam to > > access it. I'm thinking of writing a native ATAPI driver that > > could be added > > to the kernel through a configuration line like: > > > > device atapimo > > > > I've been doing a little work to see how feasible this is--the > > kernel already > > defines the ATA_ATAPI_TYPE_OPTICAL device type that is received > > from my drive > > during probing. But ATA_ATAPI_TYPE_OPTICAL isn't actually used > > anywhere, and > > there is no driver that can actually recognize and attach to an > > ATAPI MO > > drive. > > > > I modified the atapifd driver (src/sys/dev/ata/atapi-fd.c) to also > > recognize > > ATA_ATAPI_TYPE_OPTICAL, and my drive was actually recognized during > > probing > > as afd0, but afd_attach returned an error. It looks as if afd_sense > > () was > > failing, which I'm guessing is because ATAPI MO drives (or mine, at > > least) > > use a different capabilities page code and/or capabilities page > > structure > > than ATAPI floppies. The atapi-fd driver uses 0x5 for its > > "Capabilities and > > Mechanical Status" page code, while everything else (atapi-cd, > > atapi-tape) > > uses 0x2a. All three drivers have distinctly different structures > > for this > > page. > > > > So I'm wondering: do ATAPI MO drives use a capabilities page code/ > > structure > > more like CD/DVD drives, or do they have their own unique ATAPI page > > structure? If so, where can I find a document outlining the > > structure? > > > > I've found loads of documents detailing the page structure for CD/ > > DVD drives, > > but nothing for MO drives (or floppies or tape drives for that > > matter). > > > > Also, beyond the capabilities page, are there any other special > > considerations > > I'd need to make for an MO driver? > > I did plan to write such a driver back when, but HW seemed to have > disappeared from all the vendors I've asked so it was pu ton the > backburner. > Anyhow I should have the docs somewhere so it should be possible to > get this working... > > S=F8ren Schmidt > sos@FreeBSD.org I finally managed to find some documentation from Fujitsu, and it turns out= my=20 drive (and older Fujitsu MO drives as well) use exactly the same capabiliti= es=20 page and page code that are already defined in atapi-fd.h. The reason my=20 drive was failing afd_sense() was that by default it returns an 8-byte bloc= k=20 descriptor between the header and the actual page. But there's a Disable=20 Block Descriptor bit at byte1, bit3 of the MODE SENSE command that will=20 prevent it from doing this if set. It looks like the ATAPI floppies and=20 earlier MO drives just ignored this bit and never returned the block=20 descriptor. So I just changed the second character in the command array in= =20 afd_sense() from 0 to 8, added ATA_ATAPI_TYPE_OPTICAL to afd_probe(), and t= he=20 drive now works as afd0. =46rom what I've seen, the DBD bit seems to be a standard part of the MODE = SENSE=20 command block, so I don't think having it set will mess with any of the oth= er=20 drives supported by atapifd. =20 Reading, writing, deleting, prevent/allow eject, and newfs (UFS2) all work= =20 with the drive as afd0--haven't tried anything else yet. =20 Jason Harmening From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 31 15:12:05 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 958A016A41F for ; Mon, 31 Oct 2005 15:12:05 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh1.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35F2043D45 for ; Mon, 31 Oct 2005 15:12:04 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.1/8.13.1) with ESMTP id j9VFC3ko007616; Mon, 31 Oct 2005 09:12:03 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <43663443.2090802@centtech.com> Date: Mon, 31 Oct 2005 09:12:03 -0600 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051021 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mark Kirkwood References: <43633948.5030801@paradise.net.nz> In-Reply-To: <43633948.5030801@paradise.net.nz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.82/1150/Sun Oct 30 05:20:38 2005 on mh1.centtech.com X-Virus-Status: Clean Cc: freebsd-hackers@freebsd.org Subject: Re: Display files currently in the buffer cache X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Oct 2005 15:12:05 -0000 Mark Kirkwood wrote: > Dear hackers, > > I'm interested in being able to display some data about the contents of > the buffer cache , say file name and page offset (something like IRIX's > 'bufview'). > > Is there any utilities that do this currently? (searched around but > didn't see anything in ports). > > Assuming not, is it feasible to write one to do this? (if so, any > pointers appreciated - massive FreeBSD internals newbie here....). This would be a cool tool! I've been thinking of that too, and also would like to have a lkdump tool - which dumps information about currently locked files. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 31 15:42:38 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6AA8316A41F for ; Mon, 31 Oct 2005 15:42:38 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC26443D6B for ; Mon, 31 Oct 2005 15:42:37 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id j9VFgYnT041532; Mon, 31 Oct 2005 08:42:34 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <43663B6C.5020804@samsco.org> Date: Mon, 31 Oct 2005 08:42:36 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Anderson References: <43633948.5030801@paradise.net.nz> <43663443.2090802@centtech.com> In-Reply-To: <43663443.2090802@centtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: freebsd-hackers@freebsd.org, Mark Kirkwood Subject: Re: Display files currently in the buffer cache X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Oct 2005 15:42:38 -0000 Eric Anderson wrote: > Mark Kirkwood wrote: > >> Dear hackers, >> >> I'm interested in being able to display some data about the contents >> of the buffer cache , say file name and page offset (something like >> IRIX's 'bufview'). >> >> Is there any utilities that do this currently? (searched around but >> didn't see anything in ports). >> >> Assuming not, is it feasible to write one to do this? (if so, any >> pointers appreciated - massive FreeBSD internals newbie here....). > > > This would be a cool tool! I've been thinking of that too, and also > would like to have a lkdump tool - which dumps information about > currently locked files. > > Eric > > > Does the FreeBSD VM really have a concept of filenames at all? I thought that all it understood was buffer objects and vnodes. And since there isn't a strong correlation between vnodes and the filesystem namespace, it would be hard to provide such information. Scott From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 31 15:48:50 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D380D16A41F for ; Mon, 31 Oct 2005 15:48:50 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4187343D45 for ; Mon, 31 Oct 2005 15:48:50 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 436E246B06; Mon, 31 Oct 2005 10:48:47 -0500 (EST) Date: Mon, 31 Oct 2005 15:48:47 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Scott Long In-Reply-To: <43663B6C.5020804@samsco.org> Message-ID: <20051031154701.C80645@fledge.watson.org> References: <43633948.5030801@paradise.net.nz> <43663443.2090802@centtech.com> <43663B6C.5020804@samsco.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Eric Anderson , Mark Kirkwood Subject: Re: Display files currently in the buffer cache X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Oct 2005 15:48:50 -0000 On Mon, 31 Oct 2005, Scott Long wrote: >>> Assuming not, is it feasible to write one to do this? (if so, any >>> pointers appreciated - massive FreeBSD internals newbie here....). >> >> This would be a cool tool! I've been thinking of that too, and also >> would like to have a lkdump tool - which dumps information about >> currently locked files. > > Does the FreeBSD VM really have a concept of filenames at all? I > thought that all it understood was buffer objects and vnodes. And since > there isn't a strong correlation between vnodes and the filesystem > namespace, it would be hard to provide such information. The usual work-arounds are either to assume this explicitly, showing device numbers and inodes, or to give it a best effort shot (use the name cache). Either way, the results are still likely to be useful. You'll get some obvious messes, such as the results of installworld deleting old libraries and running processes continuing to use the deleted ones, resulting in an inode number that doesn't have a name that can be found. The same approach is taken in lsof, whereby "good enough" is generally good enough. The problems start when assumptions are made that paths can always be found. Robert N M Watson From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 31 16:43:10 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79D7716A422 for ; Mon, 31 Oct 2005 16:43:10 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 269ED43D5F for ; Mon, 31 Oct 2005 16:43:07 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from [10.50.41.234] (Not Verified[10.50.41.234]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Mon, 31 Oct 2005 11:59:55 -0500 From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 31 Oct 2005 11:54:32 -0500 User-Agent: KMail/1.8.2 References: <200510242235.48403.hselasky@c2i.net> <20051029.000142.95903921.imp@bsdimp.com> <20051029105902.GA741@pxe-laptop.internal.fnop.net> In-Reply-To: <20051029105902.GA741@pxe-laptop.internal.fnop.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200510311154.34037.jhb@freebsd.org> Cc: Rui Paulo , wrstuden@netbsd.org, hselasky@c2i.net, tech-kern@netbsd.org Subject: Re: FreeBSD 5/6/7 kernel emulator for NetBSD 2.x X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Oct 2005 16:43:10 -0000 On Saturday 29 October 2005 06:59 am, Rui Paulo wrote: > On 2005.10.29 00:01:42 -0600, M. Warner Losh wrote: > | In message: <20051026181403.GF1702@neuron.fnop.net> > | > | Rui Paulo writes: > | : On 2005.10.26 10:22:52 -0700, Bill Studenmund wrote: > | : | On Mon, Oct 24, 2005 at 10:35:47PM +0200, Hans Petter Selasky wrote: > | : | > Main features: > | : | > > | : | > - Implements FreeBSD's devfs on NetBSD. > | : | > | : | In the past, we (NetBSD folks) have talked about a devfs. One issue > | : | that has come up (I'll be honest, I've raised it a lot) is a desire > | : | to retain permission changes across boots, and to tie devices (when > | : | possible) to a device-specific attribute rather than a probe order. > | : | > | : | Does FreeBSD's devfs support locators and persistent information? Are > | : | there plans to support something like that, if not? > | : > | : I remember Linux's devfs having a configure file for that particular > | : objective. The user would set the permission flags in (I can't recall > | : if this is the real name) /etc/devfsd.conf and let devfsd do the job. > | : > | : You could also use another directory for permissions, like /dev-state, > | : but personally, I don't like this method. > | : > | : http://www.atnf.csiro.au/people/rgooch/linux/docs/devfs.html#persistenc > | :e > | > | FreeBSD also has a file that can be used to control the permissions > | and ownerships at runtime. The persistance can be there, but isn't > | there by default like the old nodes in /dev. > > The other problem I see here is how devfs works in single user mode > where devfsd is not started and no permissions are set. How does > FreeBSD solve this problem? Well, for one thing you generally are root in single user mode such that permissions on /dev aren't quite as important as multi-user. :) However, the devfs rulesets are managed in the kernel, and there isn't a userland devfsd, so you could always manually set or load the devfs rules you want to apply while you are in single user. I think the biggest thing to think about is that devfs makes you think about /dev differently. It's more of a true psuedo-filesystem where there aren't actual files representing devices like the special device nodes that mapped to specfs. It's more like procfs. Do you ty to solve the problem of persistent permissions for files in /proc? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 31 23:39:42 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8FA0C16A420 for ; Mon, 31 Oct 2005 23:39:42 +0000 (GMT) (envelope-from anonymous@smtp.netli.com) Received: from smtp.netli.com (ip2-pal-focal.netli.com [66.243.52.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B23543D45 for ; Mon, 31 Oct 2005 23:39:41 +0000 (GMT) (envelope-from anonymous@smtp.netli.com) Received: (qmail 12602 invoked by uid 0); 31 Oct 2005 23:37:58 -0000 Received: (qmail 23754 invoked by uid 84); 30 Oct 2005 13:27:25 -0000 Received: from owner-freebsd-net@freebsd.org by l3-1 with qmail-scanner-0.96 (uvscan: v4.1.40/v4121. . Clean. Processed in 0.184522 secs); 30 Oct 2005 13:27:25 -0000 Received: from unknown (HELO mx1-sjc-eqx.netli.net) (66.151.135.37) by 192.168.238.247 with DES-CBC3-SHA encrypted SMTP; 30 Oct 2005 13:27:25 -0000 Received: (qmail 11872 invoked by uid 0); 30 Oct 2005 13:27:25 -0000 Received: from unknown (HELO psmtp.com) (64.18.2.73) by 66.151.135.37 with SMTP; 30 Oct 2005 13:27:25 -0000 Received: from source ([216.136.204.119]) by exprod7mx71.postini.com ([64.18.6.10]) with SMTP; Sun, 30 Oct 2005 05:27:25 PST Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id EAB5056F90; Sun, 30 Oct 2005 13:24:12 +0000 (GMT) (envelope-from owner-freebsd-net@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id E52F616A426; Sun, 30 Oct 2005 13:24:11 +0000 (GMT) (envelope-from owner-freebsd-net@freebsd.org) X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 825CD16A45A; Sun, 30 Oct 2005 13:23:22 +0000 (GMT) (envelope-from ray@redshift.com) Received: from mail.quickmeet.com (quickmeet.com [216.228.17.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BAB843D48; Sun, 30 Oct 2005 13:23:22 +0000 (GMT) (envelope-from ray@redshift.com) Received: from workstation (workstation [192.168.20.250]) by mail.quickmeet.com (Postfix) with SMTP id D7E0C17032; Sun, 30 Oct 2005 04:55:34 -0800 (PST) Message-Id: <3.0.1.32.20051030052327.00a66128@pop.redshift.com> X-Mailer: na X-Sender: redshift.com Date: Sun, 30 Oct 2005 05:23:27 -0800 To: kamal kc , freebsd-questions@freebsd.org From: ray@redshift.com In-Reply-To: <20051030100749.12791.qmail@web35708.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-net@freebsd.org Errors-To: owner-freebsd-net@freebsd.org Cc: freebsd , freebsd Subject: Re: tcp services (ssh,ftp) does not work X-BeenThere: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Oct 2005 23:39:42 -0000 At 02:07 AM 10/30/2005 -0800, kamal kc wrote: | dear all, | | i have put sshd_enable="YES" | and inetd_enable="YES" | in /etc/rc.conf. | | netstat -an also shows that the port numbers | 21 and 22 are in listen state | | ftp is uncommented in /etc/inetd.conf | | but still the ssh/ftp services does not work. | | when i ftp from another computer the netstat | shows connection established but the ftp client | does not show anything. | | using ftp/ssh on the same computer also does not show | anything --- just blank. | | | what could have gone wrong. | | Help !!! | | kamal telnet localhost 21 telnet localhost 22 see if you get connections do you have a firewall running? Such as ipf. If so, make sure you have rules to allow traffic on those ports from outside machines, etc. Ray _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 31 23:43:40 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E626216A41F for ; Mon, 31 Oct 2005 23:43:39 +0000 (GMT) (envelope-from anonymous@smtp.netli.com) Received: from smtp.netli.com (ip2-pal-focal.netli.com [66.243.52.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id AFDC143D45 for ; Mon, 31 Oct 2005 23:43:34 +0000 (GMT) (envelope-from anonymous@smtp.netli.com) Received: (qmail 14987 invoked by uid 0); 31 Oct 2005 23:38:49 -0000 Received: (qmail 14655 invoked by uid 84); 30 Oct 2005 10:09:15 -0000 Received: from owner-freebsd-net@freebsd.org by l3-1 with qmail-scanner-0.96 (uvscan: v4.1.40/v4121. . Clean. Processed in 0.18138 secs); 30 Oct 2005 10:09:15 -0000 Received: from unknown (HELO mx1-sjc-eqx.netli.net) (66.151.135.37) by 192.168.238.247 with DES-CBC3-SHA encrypted SMTP; 30 Oct 2005 10:09:14 -0000 Received: (qmail 9326 invoked by uid 0); 30 Oct 2005 10:09:14 -0000 Received: from unknown (HELO psmtp.com) (64.18.2.65) by 66.151.135.37 with SMTP; 30 Oct 2005 10:09:14 -0000 Received: from source ([216.136.204.119]) by exprod7mx63.postini.com ([64.18.6.10]) with SMTP; Sun, 30 Oct 2005 02:09:14 PST Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id A314957D8D; Sun, 30 Oct 2005 10:08:32 +0000 (GMT) (envelope-from owner-freebsd-net@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 8482116A424; Sun, 30 Oct 2005 10:08:32 +0000 (GMT) (envelope-from owner-freebsd-net@freebsd.org) X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 24EB816A420 for ; Sun, 30 Oct 2005 10:07:51 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web35708.mail.mud.yahoo.com (web35708.mail.mud.yahoo.com [66.163.179.162]) by mx1.FreeBSD.org (Postfix) with SMTP id 3A31043D48 for ; Sun, 30 Oct 2005 10:07:50 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 12793 invoked by uid 60001); 30 Oct 2005 10:07:49 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Si9cIv8+tYiczo7gnlrRh+kpnGd9KRHupR/nziP6/ClC5j2yjd2Od0Q1GCS4w1A8WrOQ+X5nRfJm7Jgxk/nUT62l0ATdicp7If68Z+rm0GJerCxkatSeGbQ3oH1D/XBvRBYUWEfPQeqs4obBdcAvZWj948X2YOIROtuy2YMqyps= ; Message-ID: <20051030100749.12791.qmail@web35708.mail.mud.yahoo.com> Received: from [202.79.62.15] by web35708.mail.mud.yahoo.com via HTTP; Sun, 30 Oct 2005 02:07:49 PST Date: Sun, 30 Oct 2005 02:07:49 -0800 (PST) From: kamal kc To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-net@freebsd.org Errors-To: owner-freebsd-net@freebsd.org Cc: freebsd , freebsd Subject: tcp services (ssh,ftp) does not work X-BeenThere: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Oct 2005 23:43:40 -0000 dear all, i have put sshd_enable="YES" and inetd_enable="YES" in /etc/rc.conf. netstat -an also shows that the port numbers 21 and 22 are in listen state ftp is uncommented in /etc/inetd.conf but still the ssh/ftp services does not work. when i ftp from another computer the netstat shows connection established but the ftp client does not show anything. using ftp/ssh on the same computer also does not show anything --- just blank. what could have gone wrong. Help !!! kamal __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 31 23:48:30 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 24C1316A420 for ; Mon, 31 Oct 2005 23:48:30 +0000 (GMT) (envelope-from anonymous@smtp.netli.com) Received: from smtp.netli.com (ip2-pal-focal.netli.com [66.243.52.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id A07B543D55 for ; Mon, 31 Oct 2005 23:48:27 +0000 (GMT) (envelope-from anonymous@smtp.netli.com) Received: (qmail 23050 invoked by uid 0); 31 Oct 2005 23:41:41 -0000 Received: (qmail 14655 invoked by uid 84); 30 Oct 2005 10:09:15 -0000 Received: from owner-freebsd-net@freebsd.org by l3-1 with qmail-scanner-0.96 (uvscan: v4.1.40/v4121. . Clean. Processed in 0.18138 secs); 30 Oct 2005 10:09:15 -0000 Received: from unknown (HELO mx1-sjc-eqx.netli.net) (66.151.135.37) by 192.168.238.247 with DES-CBC3-SHA encrypted SMTP; 30 Oct 2005 10:09:14 -0000 Received: (qmail 9326 invoked by uid 0); 30 Oct 2005 10:09:14 -0000 Received: from unknown (HELO psmtp.com) (64.18.2.65) by 66.151.135.37 with SMTP; 30 Oct 2005 10:09:14 -0000 Received: from source ([216.136.204.119]) by exprod7mx63.postini.com ([64.18.6.10]) with SMTP; Sun, 30 Oct 2005 02:09:14 PST Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id A314957D8D; Sun, 30 Oct 2005 10:08:32 +0000 (GMT) (envelope-from owner-freebsd-net@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 8482116A424; Sun, 30 Oct 2005 10:08:32 +0000 (GMT) (envelope-from owner-freebsd-net@freebsd.org) X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 24EB816A420 for ; Sun, 30 Oct 2005 10:07:51 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web35708.mail.mud.yahoo.com (web35708.mail.mud.yahoo.com [66.163.179.162]) by mx1.FreeBSD.org (Postfix) with SMTP id 3A31043D48 for ; Sun, 30 Oct 2005 10:07:50 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 12793 invoked by uid 60001); 30 Oct 2005 10:07:49 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Si9cIv8+tYiczo7gnlrRh+kpnGd9KRHupR/nziP6/ClC5j2yjd2Od0Q1GCS4w1A8WrOQ+X5nRfJm7Jgxk/nUT62l0ATdicp7If68Z+rm0GJerCxkatSeGbQ3oH1D/XBvRBYUWEfPQeqs4obBdcAvZWj948X2YOIROtuy2YMqyps= ; Message-ID: <20051030100749.12791.qmail@web35708.mail.mud.yahoo.com> Received: from [202.79.62.15] by web35708.mail.mud.yahoo.com via HTTP; Sun, 30 Oct 2005 02:07:49 PST Date: Sun, 30 Oct 2005 02:07:49 -0800 (PST) From: kamal kc To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-net@freebsd.org Errors-To: owner-freebsd-net@freebsd.org Cc: freebsd , freebsd Subject: tcp services (ssh,ftp) does not work X-BeenThere: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Oct 2005 23:48:30 -0000 dear all, i have put sshd_enable="YES" and inetd_enable="YES" in /etc/rc.conf. netstat -an also shows that the port numbers 21 and 22 are in listen state ftp is uncommented in /etc/inetd.conf but still the ssh/ftp services does not work. when i ftp from another computer the netstat shows connection established but the ftp client does not show anything. using ftp/ssh on the same computer also does not show anything --- just blank. what could have gone wrong. Help !!! kamal __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 31 23:56:34 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C32216A420 for ; Mon, 31 Oct 2005 23:56:34 +0000 (GMT) (envelope-from anonymous@smtp.netli.com) Received: from smtp.netli.com (ip2-pal-focal.netli.com [66.243.52.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 38F2443DD6 for ; Mon, 31 Oct 2005 23:55:12 +0000 (GMT) (envelope-from anonymous@smtp.netli.com) Received: (qmail 20673 invoked by uid 0); 31 Oct 2005 23:40:53 -0000 Received: (qmail 23754 invoked by uid 84); 30 Oct 2005 13:27:25 -0000 Received: from owner-freebsd-net@freebsd.org by l3-1 with qmail-scanner-0.96 (uvscan: v4.1.40/v4121. . Clean. Processed in 0.184522 secs); 30 Oct 2005 13:27:25 -0000 Received: from unknown (HELO mx1-sjc-eqx.netli.net) (66.151.135.37) by 192.168.238.247 with DES-CBC3-SHA encrypted SMTP; 30 Oct 2005 13:27:25 -0000 Received: (qmail 11872 invoked by uid 0); 30 Oct 2005 13:27:25 -0000 Received: from unknown (HELO psmtp.com) (64.18.2.73) by 66.151.135.37 with SMTP; 30 Oct 2005 13:27:25 -0000 Received: from source ([216.136.204.119]) by exprod7mx71.postini.com ([64.18.6.10]) with SMTP; Sun, 30 Oct 2005 05:27:25 PST Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id EAB5056F90; Sun, 30 Oct 2005 13:24:12 +0000 (GMT) (envelope-from owner-freebsd-net@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id E52F616A426; Sun, 30 Oct 2005 13:24:11 +0000 (GMT) (envelope-from owner-freebsd-net@freebsd.org) X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 825CD16A45A; Sun, 30 Oct 2005 13:23:22 +0000 (GMT) (envelope-from ray@redshift.com) Received: from mail.quickmeet.com (quickmeet.com [216.228.17.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BAB843D48; Sun, 30 Oct 2005 13:23:22 +0000 (GMT) (envelope-from ray@redshift.com) Received: from workstation (workstation [192.168.20.250]) by mail.quickmeet.com (Postfix) with SMTP id D7E0C17032; Sun, 30 Oct 2005 04:55:34 -0800 (PST) Message-Id: <3.0.1.32.20051030052327.00a66128@pop.redshift.com> X-Mailer: na X-Sender: redshift.com Date: Sun, 30 Oct 2005 05:23:27 -0800 To: kamal kc , freebsd-questions@freebsd.org From: ray@redshift.com In-Reply-To: <20051030100749.12791.qmail@web35708.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-net@freebsd.org Errors-To: owner-freebsd-net@freebsd.org Cc: freebsd , freebsd Subject: Re: tcp services (ssh,ftp) does not work X-BeenThere: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Oct 2005 23:56:34 -0000 At 02:07 AM 10/30/2005 -0800, kamal kc wrote: | dear all, | | i have put sshd_enable="YES" | and inetd_enable="YES" | in /etc/rc.conf. | | netstat -an also shows that the port numbers | 21 and 22 are in listen state | | ftp is uncommented in /etc/inetd.conf | | but still the ssh/ftp services does not work. | | when i ftp from another computer the netstat | shows connection established but the ftp client | does not show anything. | | using ftp/ssh on the same computer also does not show | anything --- just blank. | | | what could have gone wrong. | | Help !!! | | kamal telnet localhost 21 telnet localhost 22 see if you get connections do you have a firewall running? Such as ipf. If so, make sure you have rules to allow traffic on those ports from outside machines, etc. Ray _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 00:32:45 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B14116A41F; Tue, 1 Nov 2005 00:32:45 +0000 (GMT) (envelope-from markir@paradise.net.nz) Received: from linda-2.paradise.net.nz (bm-2a.paradise.net.nz [203.96.152.181]) by mx1.FreeBSD.org (Postfix) with ESMTP id 77CCF43D80; Tue, 1 Nov 2005 00:32:34 +0000 (GMT) (envelope-from markir@paradise.net.nz) Received: from smtp-1.paradise.net.nz (tclsnelbe2-src-nat-1 [203.96.152.177]) by linda-2.paradise.net.nz (Paradise.net.nz) with ESMTP id <0IP9001CF198B7@linda-2.paradise.net.nz>; Tue, 01 Nov 2005 12:58:20 +1300 (NZDT) Received: from [192.168.1.11] (218-101-13-31.paradise.net.nz [218.101.13.31]) by smtp-1.paradise.net.nz (Postfix) with ESMTP id 2BB25AFBF79; Tue, 01 Nov 2005 12:58:20 +1300 (NZDT) Date: Tue, 01 Nov 2005 12:58:19 +1300 From: Mark Kirkwood In-reply-to: <20051031154701.C80645@fledge.watson.org> To: Robert Watson Message-id: <4366AF9B.6050503@paradise.net.nz> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050726) References: <43633948.5030801@paradise.net.nz> <43663443.2090802@centtech.com> <43663B6C.5020804@samsco.org> <20051031154701.C80645@fledge.watson.org> Cc: freebsd-hackers@freebsd.org, Scott Long , Eric Anderson Subject: Re: Display files currently in the buffer cache X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 00:32:45 -0000 Robert Watson wrote: > On Mon, 31 Oct 2005, Scott Long wrote: > >>>> Assuming not, is it feasible to write one to do this? (if so, any >>>> pointers appreciated - massive FreeBSD internals newbie here....). >>> >>> >>> This would be a cool tool! I've been thinking of that too, and also >>> would like to have a lkdump tool - which dumps information about >>> currently locked files. >> >> >> Does the FreeBSD VM really have a concept of filenames at all? I >> thought that all it understood was buffer objects and vnodes. And >> since there isn't a strong correlation between vnodes and the >> filesystem namespace, it would be hard to provide such information. > > > The usual work-arounds are either to assume this explicitly, showing > device numbers and inodes, or to give it a best effort shot (use the > name cache). Either way, the results are still likely to be useful. > You'll get some obvious messes, such as the results of installworld > deleting old libraries and running processes continuing to use the > deleted ones, resulting in an inode number that doesn't have a name that > can be found. The same approach is taken in lsof, whereby "good enough" > is generally good enough. The problems start when assumptions are made > that paths can always be found. > Yeah - this is what I had in mind. The application is this: I want to be able to show files and pages that a database (Postgres in this case) has cached. So a list of inodes and pages (or page offsets) is fine, as I can pass these to the (postgres) specific part of the utility and it can figure out which inodes correspond to its own files. Maybe the name cache lookup will be good enough for me... Ok, so, ahem, if I were to start on this, what bits of the src should I delve into first? Any other newbie pointers will also be much appreciated :-). (Was meaning to start this yesterday, but got sidetracked with a Promise SX4060 that I can't get to work...). Cheers Mark From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 03:23:19 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B57B316A41F for ; Tue, 1 Nov 2005 03:23:19 +0000 (GMT) (envelope-from bwb@holo.org) Received: from thought.holo.org (h-68-166-32-19.snvacaid.covad.net [68.166.32.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E0C843D4C for ; Tue, 1 Nov 2005 03:23:19 +0000 (GMT) (envelope-from bwb@holo.org) Received: from localhost (localhost [127.0.0.1]) by thought.holo.org (8.13.3/8.13.3) with ESMTP id jA13NIql022136 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 31 Oct 2005 19:23:18 -0800 (PST) (envelope-from bwb@holo.org) Date: Mon, 31 Oct 2005 19:23:18 -0800 (PST) From: Brian Buchanan X-X-Sender: brian@thought.holo.org To: freebsd-hackers@freebsd.org Message-ID: <20051031192152.K12203@thought.holo.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: silly gcc bug in RELENG_6 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 03:23:19 -0000 test.c: typedef struct a astruct; void foobar(void) { int s = sizeof(astruct); } > gcc test.c test.c: In function `foobar': test.c:6: error: invalid application of `sizeof' to incomplete type `test.c' ^^^^^^^^ Looks like someone goofed up some printf() args. > gcc -v Using built-in specs. Configured with: FreeBSD/i386 system compiler Thread model: posix gcc version 3.4.4 [FreeBSD] 20050518 - Brian From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 10:41:48 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4A1816A41F for ; Tue, 1 Nov 2005 10:41:48 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1674843D45 for ; Tue, 1 Nov 2005 10:41:47 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 3C4A451CD8; Tue, 1 Nov 2005 11:41:45 +0100 (CET) Received: from localhost (dlj17.neoplus.adsl.tpnet.pl [83.24.39.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id D529250B83; Tue, 1 Nov 2005 11:41:38 +0100 (CET) Date: Tue, 1 Nov 2005 11:41:36 +0100 From: Pawel Jakub Dawidek To: Craig Boston , freebsd-hackers@freebsd.org Message-ID: <20051101104136.GA2116@garage.freebsd.pl> References: <20051028040450.GB50419@nowhere> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: <20051028040450.GB50419@nowhere> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r535 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: Subject: Re: [PATCH] IPv6 support for ggate X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 10:41:48 -0000 --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 27, 2005 at 11:04:50PM -0500, Craig Boston wrote: +> Hi hackers: +>=20 +> Today I had a need to run ggate over an IPv6-only network. I was a +> little surprised that it didn't seem to like that, but not discouraged. +> So here's a patch that adds IPv6 support for ggated(8) and ggatec(8) +> ;) Thanks a lot! Unfortunately I don't have time to setup test environment (I don't use ipv6 at all) and it can take a while before I'll be ready for committing this (if noone else beat me on this). I'll be grateful if you could file PR and send me its number. Thanks! --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --BOKacYhQ+x31HxR3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDZ0ZgForvXbEpPzQRAh9SAJ4lEBTanjyd3d7Nz9/VGPCWoT6ryQCg0zrD owYIJtNcJpd6wmG5iQhetUU= =Yi88 -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3-- From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 15:43:54 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2C83916A41F for ; Tue, 1 Nov 2005 15:43:54 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id 1275A43D5E for ; Tue, 1 Nov 2005 15:43:50 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 61579 invoked by uid 0); 1 Nov 2005 15:43:45 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 1 Nov 2005 15:43:45 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.4/8.13.4) with ESMTP id jA1CZkY7000725; Tue, 1 Nov 2005 20:35:46 +0800 (MYT) (envelope-from dinesh@alphaque.com) Message-ID: <43676121.4030801@alphaque.com> Date: Tue, 01 Nov 2005 20:35:45 +0800 From: Dinesh Nair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8b) Gecko/20050915 MIME-Version: 1.0 To: Dinesh Nair References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <4361E3E0.4090409@alphaque.com> In-Reply-To: <4361E3E0.4090409@alphaque.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, scottl@samsco.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 15:43:54 -0000 On 10/28/05 16:40 Dinesh Nair said the following: > > > On 10/28/05 10:52 M. Warner Losh said the following: > >> libc_r will block all other threads in the application while an ioctl >> executes. libpthread and libthr won't. I've had several bugs at work > > > which is a Good Thing(tm) indeed for me on 4.x. which may not be a Good Thing(tm) after all. this could be causing the problem i'm seeing with the driver on 4.x. any methods to get around this, short of not using threads ? -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+ From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 15:47:32 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE0E216A41F; Tue, 1 Nov 2005 15:47:32 +0000 (GMT) (envelope-from frank@exit.com) Received: from tinker.exit.com (tinker.exit.com [206.223.0.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5429643D46; Tue, 1 Nov 2005 15:47:31 +0000 (GMT) (envelope-from frank@exit.com) Received: from realtime.exit.com (realtime [206.223.0.5]) by tinker.exit.com (8.13.4/8.13.4) with ESMTP id jA1FlVW6007071; Tue, 1 Nov 2005 07:47:31 -0800 (PST) (envelope-from frank@exit.com) Received: from realtime.exit.com (localhost [127.0.0.1]) by realtime.exit.com (8.13.4/8.13.4) with ESMTP id jA1FlU0W026256; Tue, 1 Nov 2005 07:47:30 -0800 (PST) (envelope-from frank@exit.com) Received: (from frank@localhost) by realtime.exit.com (8.13.4/8.13.4/Submit) id jA1FlUu8026253; Tue, 1 Nov 2005 07:47:30 -0800 (PST) (envelope-from frank@exit.com) X-Authentication-Warning: realtime.exit.com: frank set sender to frank@exit.com using -f From: Frank Mayhar To: Jun Kuriyama In-Reply-To: <7moe55bxyj.wl%kuriyama@imgsrc.co.jp> References: <7moe55bxyj.wl%kuriyama@imgsrc.co.jp> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Exit Consulting Date: Tue, 01 Nov 2005 07:47:29 -0800 Message-Id: <1130860049.23526.3.camel@realtime.exit.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port X-Virus-Scanned: ClamAV 0.86.2/1151/Mon Oct 31 10:34:04 2005 on tinker.exit.com X-Virus-Status: Clean Cc: freebsd-hackers@freebsd.org Subject: Re: [FreeBSD-Announce] New Logo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: frank@exit.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 15:47:32 -0000 On Mon, 2005-10-31 at 22:47 +0900, Jun Kuriyama wrote: > With our new logo, we'll be able to show our own identity on the 'net, > and this will make our marketing efforts much easier. We'll write a > guideline page which gives usage rules and usable (vector format) logo > data under the same BSD license as the rest of FreeBSD. Man, I _so_ hope this is a joke... -- Frank Mayhar frank@exit.com http://www.exit.com/ Exit Consulting http://www.gpsclock.com/ http://www.exit.com/blog/frank/ From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 15:57:08 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD17916A423 for ; Tue, 1 Nov 2005 15:57:08 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from geri.cc.fer.hr (geri.cc.fer.hr [161.53.72.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF2F943D49 for ; Tue, 1 Nov 2005 15:57:07 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from geri.cc.fer.hr (localhost.cc.fer.hr [127.0.0.1]) by geri.cc.fer.hr (8.13.4/8.13.1) with ESMTP id jA1FohEd092825 for ; Tue, 1 Nov 2005 16:50:43 +0100 (CET) (envelope-from ivoras@fer.hr) Received: from localhost (ivoras@localhost) by geri.cc.fer.hr (8.13.4/8.13.1/Submit) with ESMTP id jA1Foh2T092822 for ; Tue, 1 Nov 2005 16:50:43 +0100 (CET) (envelope-from ivoras@fer.hr) X-Authentication-Warning: geri.cc.fer.hr: ivoras owned process doing -bs Date: Tue, 1 Nov 2005 16:50:43 +0100 (CET) From: Ivan Voras Sender: ivoras@geri.cc.fer.hr To: freebsd-hackers@freebsd.org Message-ID: <20051101164904.Y92812@geri.cc.fer.hr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: [FreeBSD-Announce] New Logo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 15:57:09 -0000 Frank Mayhar wrote: > On Mon, 2005-10-31 at 22:47 +0900, Jun Kuriyama wrote: >>With our new logo, we'll be able to show our own identity on the 'net, >>and this will make our marketing efforts much easier. We'll write a >>guideline page which gives usage rules and usable (vector format) logo >>data under the same BSD license as the rest of FreeBSD. > > Man, I _so_ hope this is a joke... Agreed. The "logo" looks like some anime rendering of a sea mine, and the font really doesn't agree with it. From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 16:01:52 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A42D16A41F for ; Tue, 1 Nov 2005 16:01:52 +0000 (GMT) (envelope-from branson@windborne.net) Received: from underfoot.windborne.net (underfoot.windborne.net [66.100.81.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3288B43D45 for ; Tue, 1 Nov 2005 16:01:51 +0000 (GMT) (envelope-from branson@windborne.net) Received: by underfoot.windborne.net (Postfix, from userid 10652) id 0D5831318A; Tue, 1 Nov 2005 11:01:51 -0500 (EST) Date: Tue, 1 Nov 2005 11:01:51 -0500 From: Branson Matheson To: freebsd-hackers@freebsd.org Message-ID: <20051101110151.D67802@underfoot.windborne.net> Mail-Followup-To: Branson Matheson , freebsd-hackers@freebsd.org References: <20051101164904.Y92812@geri.cc.fer.hr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20051101164904.Y92812@geri.cc.fer.hr>; from ivoras@fer.hr on Tue, Nov 01, 2005 at 04:50:43PM +0100 Subject: Re: [FreeBSD-Announce] New Logo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Branson Matheson List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 16:01:52 -0000 On Tue, Nov 01, 2005 at 04:50:43PM +0100,Ivan Voras did mutter: > > Man, I _so_ hope this is a joke... > > Agreed. The "logo" looks like some anime rendering of a sea mine, and the > font really doesn't agree with it. Since there has been a plethora of negative.. i thought i'd add my 2cents.. I think the new logo is pretty cool. Modern and artsy. The font is a bit to curved for my tastes .. but it does hilight the circular direction of the font ..etc. Definately keeps with the roots of our Daemon .. while showing we can evolve and be more modern. Kudos to the artist and the selecton crew. - From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 16:04:19 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0EFF516A46D for ; Tue, 1 Nov 2005 16:04:19 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BA2743D73 for ; Tue, 1 Nov 2005 16:04:09 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id jA1G3v6N097867; Tue, 1 Nov 2005 09:03:57 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <436791ED.8010808@samsco.org> Date: Tue, 01 Nov 2005 09:03:57 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dinesh Nair References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <4361E3E0.4090409@alphaque.com> <43676121.4030801@alphaque.com> In-Reply-To: <43676121.4030801@alphaque.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 16:04:19 -0000 Dinesh Nair wrote: > > > On 10/28/05 16:40 Dinesh Nair said the following: > >> >> >> On 10/28/05 10:52 M. Warner Losh said the following: >> >>> libc_r will block all other threads in the application while an ioctl >>> executes. libpthread and libthr won't. I've had several bugs at work >> >> >> >> which is a Good Thing(tm) indeed for me on 4.x. > > > which may not be a Good Thing(tm) after all. this could be causing the > problem i'm seeing with the driver on 4.x. any methods to get around > this, short of not using threads ? > I think this thread has gone too far into hyperbole and conjecture. What is your code trying to do, and what problems are you seeing? Scott From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 16:05:41 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 894D016A41F for ; Tue, 1 Nov 2005 16:05:41 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 268BD43D62 for ; Tue, 1 Nov 2005 16:05:41 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jA1G22sX020660; Tue, 1 Nov 2005 09:02:02 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 01 Nov 2005 09:02:12 -0700 (MST) Message-Id: <20051101.090212.05878607.imp@bsdimp.com> To: dinesh@alphaque.com From: "M. Warner Losh" In-Reply-To: <43676121.4030801@alphaque.com> References: <20051027.205250.55834228.imp@bsdimp.com> <4361E3E0.4090409@alphaque.com> <43676121.4030801@alphaque.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 01 Nov 2005 09:02:02 -0700 (MST) Cc: freebsd-hackers@freebsd.org, scottl@samsco.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 16:05:41 -0000 In message: <43676121.4030801@alphaque.com> Dinesh Nair writes: : : : On 10/28/05 16:40 Dinesh Nair said the following: : > : > : > On 10/28/05 10:52 M. Warner Losh said the following: : > : >> libc_r will block all other threads in the application while an ioctl : >> executes. libpthread and libthr won't. I've had several bugs at work : > : > : > which is a Good Thing(tm) indeed for me on 4.x. : : which may not be a Good Thing(tm) after all. this could be causing the : problem i'm seeing with the driver on 4.x. any methods to get around this, : short of not using threads ? Use non-blocking I/O + read/write channels + select/poll instead of ioctl for things you want to block. Your thread can then read/write to that channel, and since the treading package does the select behind the scenes, it will be good for you. Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 16:05:56 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E48E16A42B for ; Tue, 1 Nov 2005 16:05:56 +0000 (GMT) (envelope-from tillman@seekingfire.com) Received: from mail.seekingfire.com (caliban.seekingfire.com [24.72.123.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B3C943D5E for ; Tue, 1 Nov 2005 16:05:55 +0000 (GMT) (envelope-from tillman@seekingfire.com) Received: by mail.seekingfire.com (Postfix, from userid 500) id 57B7F197; Tue, 1 Nov 2005 10:05:54 -0600 (CST) Date: Tue, 1 Nov 2005 10:05:54 -0600 From: Tillman Hodgson To: freebsd-hackers@freebsd.org Message-ID: <20051101160554.GD17473@seekingfire.com> References: <20051101164904.Y92812@geri.cc.fer.hr> <20051101110151.D67802@underfoot.windborne.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051101110151.D67802@underfoot.windborne.net> X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . X-GPG-Key-ID: 828AFC7B X-GPG-Fingerprint: 5584 14BA C9EB 1524 0E68 F543 0F0A 7FBC 828A FC7B X-GPG-Key: http://www.seekingfire.com/personal/gpg_key.asc X-Urban-Legend: There is lots of hidden information in headers X-Tillman-rules: yes he does User-Agent: Mutt/1.5.11 Cc: Subject: Re: [FreeBSD-Announce] New Logo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 16:05:56 -0000 On Tue, Nov 01, 2005 at 11:01:51AM -0500, Branson Matheson wrote: > Since there has been a plethora of negative.. i thought i'd add my 2cents.. > I think the new logo is pretty cool. Modern and artsy. > Definately keeps with the roots of our Daemon .. while showing we can > evolve and be more modern. Kudos to the artist and the selecton crew. I agree, it's a nice logo -- it has a nod to Beastie and yet looks like a logo instead of a mascot. Printing letterhead with it could be expensive (full color), but that's just encouragement to stay paperless anyway ;-) I think that it'll look great when shown on the new web site design. -T -- I think it only makes sense to seek out and identify structures of authority, hierarchy, and domination in every aspect of life, and to challenge them; unless a justification for them can be given, they are illegitimate, and should be dismantled, to increase the scope of human freedom. -- Noam Chomsky (Red and Black Revolution, 1996) From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 16:10:00 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 798DD16A41F for ; Tue, 1 Nov 2005 16:10:00 +0000 (GMT) (envelope-from ray@redshift.com) Received: from outgoing.redshift.com (outgoing.redshift.com [207.177.231.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4133143D45 for ; Tue, 1 Nov 2005 16:10:00 +0000 (GMT) (envelope-from ray@redshift.com) Received: from workstation (216-228-19-21.dsl.redshift.com [216.228.19.21]) by outgoing.redshift.com (Postfix) with SMTP id 07F6197759; Tue, 1 Nov 2005 08:09:59 -0800 (PST) Message-Id: <3.0.1.32.20051101080958.00a80e00@pop.redshift.com> X-Mailer: na X-Sender: redshift.com Date: Tue, 01 Nov 2005 08:09:58 -0800 To: Tillman Hodgson ,freebsd-hackers@freebsd.org From: ray@redshift.com In-Reply-To: <20051101160554.GD17473@seekingfire.com> References: <20051101110151.D67802@underfoot.windborne.net> <20051101164904.Y92812@geri.cc.fer.hr> <20051101110151.D67802@underfoot.windborne.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Subject: Re: [FreeBSD-Announce] New Logo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 16:10:00 -0000 At 10:05 AM 11/1/2005 -0600, Tillman Hodgson wrote: | On Tue, Nov 01, 2005 at 11:01:51AM -0500, Branson Matheson wrote: | > Since there has been a plethora of negative.. i thought i'd add my 2cents.. | > I think the new logo is pretty cool. Modern and artsy. | | > Definately keeps with the roots of our Daemon .. while showing we can | > evolve and be more modern. Kudos to the artist and the selecton crew. | | I agree, it's a nice logo -- it has a nod to Beastie and yet looks like | a logo instead of a mascot. Printing letterhead with it could be | expensive (full color), but that's just encouragement to stay paperless | anyway ;-) | | I think that it'll look great when shown on the new web site design. what's the URL for the logo? Ray From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 16:10:43 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD56E16A41F for ; Tue, 1 Nov 2005 16:10:43 +0000 (GMT) (envelope-from uvarovsl@mail.pnpi.spb.ru) Received: from mail.lsi.ru (mail.lsi.ru [212.58.192.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5543F43D49 for ; Tue, 1 Nov 2005 16:10:42 +0000 (GMT) (envelope-from uvarovsl@mail.pnpi.spb.ru) Received: by mail.lsi.ru (Postfix, from userid 426) id D128A387734; Tue, 1 Nov 2005 19:10:39 +0300 (MSK) Received: from [10.0.0.10] (unknown [212.58.210.222]) by mail.lsi.ru (Postfix) with ESMTP id 886EA3877EE for ; Tue, 1 Nov 2005 19:10:39 +0300 (MSK) Message-ID: <43679365.6050502@mail.pnpi.spb.ru> Date: Tue, 01 Nov 2005 19:10:13 +0300 From: Sergey Uvarov User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 Fedora/1.7.12-1.5.1 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: about PR kern/83375 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 16:10:43 -0000 Hello hackers, yesterday, while playing with ptys on 5.3 kernel, I was hit by bug #83375. I have reproduced it quite easely: % /usr/libexec/getty Pc ttyp2 & % /usr/libexec/getty Pc ttyp2 --- kernel panic ---- ttyp2 - not used slave pty I was curious and did some investigation why it happens. As result, I have found the source of bug. Please, look at this: What does getty(8) do with specified device? It basically does the following steps: - chmod(name) - chmod(name) - revoke(name) - open(name) First invocation of getty(8) does not revoke anything, and just goes to sleep in ptsopen(). Second invocation of getty(8) also does revoke(2) first. But in this case, revoke syscall calls ptsclose() routine. So we have the following call chain: ptsclose()->tty_close()->ttyrel(). tty ref for ttyp2 is still equal to 1, since the first invocation of getty(8) sleeps awaiting for a master, and tty_open is not called yet. Hence, ttyrel() above simply frees tty struct for the ttyp2. After that, getty(8) calls open(2) which in turn calls ptsopen(). But due to tty struct is already destroyed, the following branch works while it should not: if (tp->t_oproc) (void)ttyld_modem(tp, 1) It happens because freed space is filled with 0xdeadcode pattern (I'm using debug kernel version). As result, we have a crash in ttyld_modem(). How to fix it? It seems that one should not call tty_close() in ptsclose() if tty ref == 1. It not tested however. What do hackers think about it? Thank you, Sergey. From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 16:19:58 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6681716A41F for ; Tue, 1 Nov 2005 16:19:58 +0000 (GMT) (envelope-from ray@redshift.com) Received: from outgoing.redshift.com (outgoing.redshift.com [207.177.231.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2FB2043D45 for ; Tue, 1 Nov 2005 16:19:58 +0000 (GMT) (envelope-from ray@redshift.com) Received: from workstation (216-228-19-21.dsl.redshift.com [216.228.19.21]) by outgoing.redshift.com (Postfix) with SMTP id 9F8F597759; Tue, 1 Nov 2005 08:19:57 -0800 (PST) Message-Id: <3.0.1.32.20051101081952.00a80e00@pop.redshift.com> X-Mailer: na X-Sender: redshift.com Date: Tue, 01 Nov 2005 08:19:52 -0800 To: Tillman Hodgson ,freebsd-hackers@freebsd.org From: ray@redshift.com In-Reply-To: <20051101160554.GD17473@seekingfire.com> References: <20051101110151.D67802@underfoot.windborne.net> <20051101164904.Y92812@geri.cc.fer.hr> <20051101110151.D67802@underfoot.windborne.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Subject: Re: [FreeBSD-Announce] New Logo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 16:19:58 -0000 At 10:05 AM 11/1/2005 -0600, Tillman Hodgson wrote: | On Tue, Nov 01, 2005 at 11:01:51AM -0500, Branson Matheson wrote: | > Since there has been a plethora of negative.. i thought i'd add my 2cents.. | > I think the new logo is pretty cool. Modern and artsy. | | > Definately keeps with the roots of our Daemon .. while showing we can | > evolve and be more modern. Kudos to the artist and the selecton crew. | | I agree, it's a nice logo -- it has a nod to Beastie and yet looks like | a logo instead of a mascot. Printing letterhead with it could be | expensive (full color), but that's just encouragement to stay paperless | anyway ;-) | | I think that it'll look great when shown on the new web site design. Yeah, I don't know about that logo. But a few things that pop to mind: ------------------------------------------------------------------------ 1. I wouldn't want to accidently get that stuck in any of my orifices 2. looks like a close up of a virus of some sort - bird flu? 3. I think I recall seeing something like that from when I was a kid and we had to determine the sex of baby rabbits. 4. I sure ain't going to wear a T-shirt with that on it. But at long as the OS works, I'm not too worried about the logo. Ray From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 16:24:04 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E3B5C16A41F for ; Tue, 1 Nov 2005 16:24:04 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 79A0F43D45 for ; Tue, 1 Nov 2005 16:24:03 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id jA1GO3Pk011950; Tue, 1 Nov 2005 10:24:03 -0600 (CST) (envelope-from anderson@centtech.com) Message-ID: <436796A1.6080608@centtech.com> Date: Tue, 01 Nov 2005 10:24:01 -0600 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051021 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ray@redshift.com References: <20051101110151.D67802@underfoot.windborne.net> <20051101164904.Y92812@geri.cc.fer.hr> <20051101110151.D67802@underfoot.windborne.net> <3.0.1.32.20051101081952.00a80e00@pop.redshift.com> In-Reply-To: <3.0.1.32.20051101081952.00a80e00@pop.redshift.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.82/1151/Mon Oct 31 12:34:04 2005 on mh2.centtech.com X-Virus-Status: Clean Cc: freebsd-hackers@freebsd.org Subject: Re: [FreeBSD-Announce] New Logo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 16:24:05 -0000 ray@redshift.com wrote: > At 10:05 AM 11/1/2005 -0600, Tillman Hodgson wrote: > | On Tue, Nov 01, 2005 at 11:01:51AM -0500, Branson Matheson wrote: > | > Since there has been a plethora of negative.. i thought i'd add my 2cents.. > | > I think the new logo is pretty cool. Modern and artsy. > | > | > Definately keeps with the roots of our Daemon .. while showing we can > | > evolve and be more modern. Kudos to the artist and the selecton crew. > | > | I agree, it's a nice logo -- it has a nod to Beastie and yet looks like > | a logo instead of a mascot. Printing letterhead with it could be > | expensive (full color), but that's just encouragement to stay paperless > | anyway ;-) > | > | I think that it'll look great when shown on the new web site design. > > Yeah, I don't know about that logo. But a few things that pop to mind: > ------------------------------------------------------------------------ > > 1. I wouldn't want to accidently get that stuck in any of my orifices Thanks for the descriptive email, but how is that helpful, and how does it connect up with 'freebsd-hackers'? Maybe this belongs on -chat instead. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------ From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 16:26:11 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BDD116A41F for ; Tue, 1 Nov 2005 16:26:11 +0000 (GMT) (envelope-from ray@redshift.com) Received: from outgoing.redshift.com (outgoing.redshift.com [207.177.231.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2942D43D49 for ; Tue, 1 Nov 2005 16:26:11 +0000 (GMT) (envelope-from ray@redshift.com) Received: from workstation (216-228-19-21.dsl.redshift.com [216.228.19.21]) by outgoing.redshift.com (Postfix) with SMTP id 46C369B25E; Tue, 1 Nov 2005 08:26:09 -0800 (PST) Message-Id: <3.0.1.32.20051101082609.00a50da0@pop.redshift.com> X-Mailer: na X-Sender: redshift.com Date: Tue, 01 Nov 2005 08:26:09 -0800 To: Eric Anderson From: ray@redshift.com In-Reply-To: <436796A1.6080608@centtech.com> References: <3.0.1.32.20051101081952.00a80e00@pop.redshift.com> <20051101110151.D67802@underfoot.windborne.net> <20051101164904.Y92812@geri.cc.fer.hr> <20051101110151.D67802@underfoot.windborne.net> <3.0.1.32.20051101081952.00a80e00@pop.redshift.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: freebsd-hackers@freebsd.org Subject: Re: [FreeBSD-Announce] New Logo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 16:26:11 -0000 At 10:24 AM 11/1/2005 -0600, Eric Anderson wrote: | ray@redshift.com wrote: | > At 10:05 AM 11/1/2005 -0600, Tillman Hodgson wrote: | > | On Tue, Nov 01, 2005 at 11:01:51AM -0500, Branson Matheson wrote: | > | > Since there has been a plethora of negative.. i thought i'd add my 2cents.. | > | > I think the new logo is pretty cool. Modern and artsy. | > | | > | > Definately keeps with the roots of our Daemon .. while showing we can | > | > evolve and be more modern. Kudos to the artist and the selecton crew. | > | | > | I agree, it's a nice logo -- it has a nod to Beastie and yet looks like | > | a logo instead of a mascot. Printing letterhead with it could be | > | expensive (full color), but that's just encouragement to stay paperless | > | anyway ;-) | > | | > | I think that it'll look great when shown on the new web site design. | > | > Yeah, I don't know about that logo. But a few things that pop to mind: | > ------------------------------------------------------------------------ | > | > 1. I wouldn't want to accidently get that stuck in any of my orifices | | | Thanks for the descriptive email, but how is that helpful, and how does | it connect up with 'freebsd-hackers'? Maybe this belongs on -chat instead. | | Eric I didn't start the thread... Ray From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 16:26:36 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC97D16A420 for ; Tue, 1 Nov 2005 16:26:36 +0000 (GMT) (envelope-from wxs@syn.csh.rit.edu) Received: from syn.csh.rit.edu (syn.csh.rit.edu [129.21.60.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03D8743D5F for ; Tue, 1 Nov 2005 16:26:32 +0000 (GMT) (envelope-from wxs@syn.csh.rit.edu) Received: from syn.csh.rit.edu (localhost [127.0.0.1]) by syn.csh.rit.edu (8.13.3/8.13.1) with ESMTP id jA1HTCrX067959; Tue, 1 Nov 2005 12:29:12 -0500 (EST) (envelope-from wxs@syn.csh.rit.edu) Received: (from wxs@localhost) by syn.csh.rit.edu (8.13.3/8.13.1/Submit) id jA1HTCQt067958; Tue, 1 Nov 2005 12:29:12 -0500 (EST) (envelope-from wxs) Date: Tue, 1 Nov 2005 12:29:11 -0500 From: Wesley Shields To: ray@redshift.com Message-ID: <20051101172911.GA66394@csh.rit.edu> References: <20051101110151.D67802@underfoot.windborne.net> <20051101164904.Y92812@geri.cc.fer.hr> <20051101110151.D67802@underfoot.windborne.net> <3.0.1.32.20051101080958.00a80e00@pop.redshift.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3.0.1.32.20051101080958.00a80e00@pop.redshift.com> User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: [FreeBSD-Announce] New Logo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 16:26:37 -0000 On Tue, Nov 01, 2005 at 08:09:58AM -0800, ray@redshift.com wrote: > At 10:05 AM 11/1/2005 -0600, Tillman Hodgson wrote: > | On Tue, Nov 01, 2005 at 11:01:51AM -0500, Branson Matheson wrote: > | > Since there has been a plethora of negative.. i thought i'd add my 2cents.. > | > I think the new logo is pretty cool. Modern and artsy. > | > | > Definately keeps with the roots of our Daemon .. while showing we can > | > evolve and be more modern. Kudos to the artist and the selecton crew. > | > | I agree, it's a nice logo -- it has a nod to Beastie and yet looks like > | a logo instead of a mascot. Printing letterhead with it could be > | expensive (full color), but that's just encouragement to stay paperless > | anyway ;-) > | > | I think that it'll look great when shown on the new web site design. > > what's the URL for the logo? > > Ray http://logo-contest.freebsd.org/result/ -- WXS From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 17:54:40 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 07EDE16A41F for ; Tue, 1 Nov 2005 17:54:40 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id 3B3E843D46 for ; Tue, 1 Nov 2005 17:54:38 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 63146 invoked by uid 0); 1 Nov 2005 17:54:36 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 1 Nov 2005 17:54:36 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.4/8.13.4) with ESMTP id jA1Hn2Dn008690; Wed, 2 Nov 2005 01:49:02 +0800 (MYT) (envelope-from dinesh@alphaque.com) Message-ID: <4367AA8D.3060506@alphaque.com> Date: Wed, 02 Nov 2005 01:49:01 +0800 From: Dinesh Nair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8b) Gecko/20050915 MIME-Version: 1.0 To: Scott Long References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <4361E3E0.4090409@alphaque.com> <43676121.4030801@alphaque.com> <436791ED.8010808@samsco.org> In-Reply-To: <436791ED.8010808@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 17:54:40 -0000 On 11/02/05 00:03 Scott Long said the following: > I think this thread has gone too far into hyperbole and conjecture. What > is your code trying to do, and what problems are you seeing? apologies, scott. i'm actually trying to get a driver written for freebsd 5.x backported to 4.x. the driver works like a charm on 5.x. under 4.x, i seem to be getting problems with synchronization/locking. the driver set consists of two drivers, a pseudo driver which the userland reads/writes/ioctls to, and the actual device driver which reads/writes from the device thru DMA and places the data into a ring buffer. this is the sequence of events for data from the device: 1. interrupt handler of device driver called 2. device driver reads data from DMA memory space 3. device driver writes to a shared buffer 4. device driver calls a function inside pseudo driver 5. pseudo driver copies data from shared buffer to another buffer 6. wakeup() is called 7. device driver waits for next interrupt the interrupt handler uses splhigh()/splx() to mask out interrupts during the time it's executing. interrupts happen 1000 times a second consistently. when a read on the pseudo device is called from a -lc_r threaded userland process, the following happens in pseudo device driver: 7. tsleep() is called, (with the same ident as the wakeup() in #6) 8. pseudo device reads from buffer in #5 and uses uiomove to return data to calling process exactly the reverse happens for a write. i believe that steps 3,5,8 need to be protected/synchronized with locks. the code uses mtx_lock/mtx_unlock in the 5.x version, and uses simple_lock in the 4.x version. digging thru the include files, i've noticed that simple_lock is a NOOP in 4.x if you're on a single processor. could i replace the mtx_lock/mtx_unlock with lockmgr(...,LK_EXCLUSIVE/LK_RELEASE) instead ? the earlier notion of using splhigh()/splx() to protect the common areas didnt seem like the right way to do it since the pseudo device driver is not interrupt driven, but rather is driven by open/read/write/ioctl from the userland. also, when the threaded userland reads, it's first put to a tsleep with PZERO|PCATCH and this tsleep is surrounded by a mtx_lock(&Giant) and mtx_unlock(&Giant). what should this be replaced with in 4.x ? when the real device driver has data from the device, it uses wakeup() to wake the tsleep'ed bits in the pseudo device driver. is this the correct way to do this ? also, is there any equivalent for PROC_LOCK()/PROC_UNLOCK() in 4.x or is it unnecessary ? -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+ From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 19:02:53 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4802F16A41F for ; Tue, 1 Nov 2005 19:02:53 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id ECDB143D46 for ; Tue, 1 Nov 2005 19:02:52 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.23.117]) ([10.251.23.117]) by a50.ironport.com with ESMTP; 01 Nov 2005 11:02:53 -0800 X-IronPort-Anti-Spam-Filtered: true Message-ID: <4367BBDB.7020005@elischer.org> Date: Tue, 01 Nov 2005 11:02:51 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dinesh Nair References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <4361E3E0.4090409@alphaque.com> <43676121.4030801@alphaque.com> <436791ED.8010808@samsco.org> <4367AA8D.3060506@alphaque.com> In-Reply-To: <4367AA8D.3060506@alphaque.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Scott Long Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 19:02:53 -0000 Dinesh Nair wrote: > > On 11/02/05 00:03 Scott Long said the following: > >> I think this thread has gone too far into hyperbole and conjecture. >> What is your code trying to do, and what problems are you seeing? > > > apologies, scott. i'm actually trying to get a driver written for > freebsd 5.x backported to 4.x. the driver works like a charm on 5.x. > > under 4.x, i seem to be getting problems with synchronization/locking. > > the driver set consists of two drivers, a pseudo driver which the > userland reads/writes/ioctls to, and the actual device driver which > reads/writes from the device thru DMA and places the data into a ring > buffer. > > this is the sequence of events for data from the device: > > 1. interrupt handler of device driver called handler called at splxxx() level (see later) > 2. device driver reads data from DMA memory space still at splxxx level > 3. device driver writes to a shared buffer still at splxxx level > > 4. device driver calls a function inside pseudo driver still at splxxx level > 5. pseudo driver copies data from shared buffer to another buffer still at splxx level > 6. wakeup() is called still at splxxx level > 7. device driver waits for next interrupt drops to splzero or similar,.. woken process called, starts manipulating "another buffer" collides with next interrupt. what ever is woken up needs to call splxxx() to block the interupt routine while manipulating "another buffer" for as long as it takes to get the data out or swap the b uffer pointers or whatever it does. > > the interrupt handler uses splhigh()/splx() to mask out interrupts > during the time it's executing. interrupts happen 1000 times a second > consistently. When you register an interrupt handler, you specify which of several groups you are a part of.. Network, disk io, etc. once you specify you are part of a particular set, then you should only block interrupts from that set.. e.g, a netowrk driver would use s = splimp(); ...; splx(s) Try not to use splhigh().. it is ok for getting your driver going but may block too much. > > when a read on the pseudo device is called from a -lc_r threaded > userland process, the following happens in pseudo device driver: > > 7. tsleep() is called, (with the same ident as the wakeup() in #6) > 8. pseudo device reads from buffer in #5 and uses uiomove to return > data to calling process it needs to call splxxx() while it is doing it.. I would suggest having two buffers and swapping them under splxxx() so that the one that the driver is accessing is not the one you are draining. that way teh splxxx() levle needs to only be held for the small time you are doing the swap. > > exactly the reverse happens for a write. > > i believe that steps 3,5,8 need to be protected/synchronized with locks. not locks, but spl, and only step 8 needs to be changed because all teh rest are already done at high spl. > > the code uses mtx_lock/mtx_unlock in the 5.x version, and uses > simple_lock in the 4.x version. digging thru the include files, i've > noticed that simple_lock is a NOOP in 4.x if you're on a single > processor. > > could i replace the mtx_lock/mtx_unlock with > lockmgr(...,LK_EXCLUSIVE/LK_RELEASE) instead ? the earlier notion of > using > splhigh()/splx() to protect the common areas didnt seem like the right > way to do it since the pseudo device driver is not interrupt driven, > but rather is driven by open/read/write/ioctl from the userland. > > also, when the threaded userland reads, it's first put to a tsleep > with PZERO|PCATCH and this tsleep is surrounded by a mtx_lock(&Giant) > and mtx_unlock(&Giant). what should this be replaced with in 4.x ? > > when the real device driver has data from the device, it uses wakeup() > to wake the tsleep'ed bits in the pseudo device driver. is this the > correct way to do this ? > > also, is there any equivalent for PROC_LOCK()/PROC_UNLOCK() in 4.x or > is it unnecessary ? > use spl???()/splx uinstead. your top end needs to raise to the same level as the interrupt you have registered for as long as it is manupulating data that the bottom end might manipulate, (e.g. buffer pointers or linked lists, etc.) From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 19:07:18 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C1F4916A422 for ; Tue, 1 Nov 2005 19:07:18 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4EDF143D46 for ; Tue, 1 Nov 2005 19:07:18 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.23.117]) ([10.251.23.117]) by a50.ironport.com with ESMTP; 01 Nov 2005 11:07:18 -0800 X-IronPort-Anti-Spam-Filtered: true Message-ID: <4367BCE5.2070900@elischer.org> Date: Tue, 01 Nov 2005 11:07:17 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Julian Elischer References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <4361E3E0.4090409@alphaque.com> <43676121.4030801@alphaque.com> <436791ED.8010808@samsco.org> <4367AA8D.3060506@alphaque.com> <4367BBDB.7020005@elischer.org> In-Reply-To: <4367BBDB.7020005@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Scott Long Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 19:07:18 -0000 Julian Elischer wrote: > Dinesh Nair wrote: > >> >> On 11/02/05 00:03 Scott Long said the following: >> >>> I think this thread has gone too far into hyperbole and conjecture. >>> What is your code trying to do, and what problems are you seeing? >> >> >> >> apologies, scott. i'm actually trying to get a driver written for >> freebsd 5.x backported to 4.x. the driver works like a charm on 5.x. >> >> under 4.x, i seem to be getting problems with synchronization/locking. >> >> the driver set consists of two drivers, a pseudo driver which the >> userland reads/writes/ioctls to, and the actual device driver which >> reads/writes from the device thru DMA and places the data into a ring >> buffer. >> >> this is the sequence of events for data from the device: >> >> 1. interrupt handler of device driver called > > > handler called at splxxx() level (see later) > >> 2. device driver reads data from DMA memory space > > > still at splxxx level > >> 3. device driver writes to a shared buffer > > > still at splxxx level > >> >> 4. device driver calls a function inside pseudo driver > > > still at splxxx level > >> 5. pseudo driver copies data from shared buffer to another buffer > > > still at splxx level > >> 6. wakeup() is called > > > still at splxxx level > >> 7. device driver waits for next interrupt > > > drops to splzero or similar,.. > woken process called, > starts manipulating "another buffer" > collides with next interrupt. > > what ever is woken up needs to call splxxx() to block the interupt > routine while > manipulating "another buffer" for as long as it takes to get the data out > or swap the b uffer pointers or whatever it does. > > >> >> the interrupt handler uses splhigh()/splx() to mask out interrupts >> during the time it's executing. interrupts happen 1000 times a second >> consistently. > the interrupt handler is ALREADY blocking it's own interupt. you don't need to do anything. You need to block interrupts for a momen tin #8, not in the interrupt handler. > > > When you register an interrupt handler, you specify which of several > groups you are a part of.. > Network, disk io, etc. > > once you specify you are part of a particular set, then you should only > block interrupts from that set.. > > e.g, a netowrk driver would use s = splimp(); ...; splx(s) > > Try not to use splhigh().. > it is ok for getting your driver going but may block too much. > >> >> when a read on the pseudo device is called from a -lc_r threaded >> userland process, the following happens in pseudo device driver: >> >> 7. tsleep() is called, (with the same ident as the wakeup() in #6) >> 8. pseudo device reads from buffer in #5 and uses uiomove to return >> data to calling process > > > > it needs to call splxxx() while it is doing it.. > I would suggest having two buffers and swapping them under splxxx() so > that > the one that the driver is accessing is not the one you are draining. > that way teh splxxx() levle needs to only be held for the small time > you are doing the swap. > >> >> exactly the reverse happens for a write. >> >> i believe that steps 3,5,8 need to be protected/synchronized with locks. > > > > not locks, but spl, > and only step 8 needs to be changed because all teh rest are already > done at high spl. > >> >> the code uses mtx_lock/mtx_unlock in the 5.x version, and uses >> simple_lock in the 4.x version. digging thru the include files, i've >> noticed that simple_lock is a NOOP in 4.x if you're on a single >> processor. >> >> could i replace the mtx_lock/mtx_unlock with >> lockmgr(...,LK_EXCLUSIVE/LK_RELEASE) instead ? the earlier notion of >> using >> splhigh()/splx() to protect the common areas didnt seem like the >> right way to do it since the pseudo device driver is not interrupt >> driven, but rather is driven by open/read/write/ioctl from the userland. >> >> also, when the threaded userland reads, it's first put to a tsleep >> with PZERO|PCATCH and this tsleep is surrounded by a mtx_lock(&Giant) >> and mtx_unlock(&Giant). what should this be replaced with in 4.x ? >> >> when the real device driver has data from the device, it uses >> wakeup() to wake the tsleep'ed bits in the pseudo device driver. is >> this the correct way to do this ? >> >> also, is there any equivalent for PROC_LOCK()/PROC_UNLOCK() in 4.x or >> is it unnecessary ? >> > > use spl???()/splx uinstead. > your top end needs to raise to the same level as the interrupt you have > registered for as long as it is manupulating data that the bottom end > might manipulate, (e.g. buffer pointers or linked lists, etc.) > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 19:22:58 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA7A216A41F for ; Tue, 1 Nov 2005 19:22:58 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id ADAAD43D49 for ; Tue, 1 Nov 2005 19:22:57 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 64478 invoked by uid 0); 1 Nov 2005 19:22:55 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 1 Nov 2005 19:22:55 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.4/8.13.4) with ESMTP id jA1JMapN000633; Wed, 2 Nov 2005 03:22:36 +0800 (MYT) (envelope-from dinesh@alphaque.com) Message-ID: <4367C07C.1040900@alphaque.com> Date: Wed, 02 Nov 2005 03:22:36 +0800 From: Dinesh Nair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8b) Gecko/20050915 MIME-Version: 1.0 To: Julian Elischer References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <4361E3E0.4090409@alphaque.com> <43676121.4030801@alphaque.com> <436791ED.8010808@samsco.org> <4367AA8D.3060506@alphaque.com> <4367BBDB.7020005@elischer.org> In-Reply-To: <4367BBDB.7020005@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Scott Long Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 19:22:59 -0000 On 11/02/05 03:02 Julian Elischer said the following: > drops to splzero or similar,.. > woken process called, > starts manipulating "another buffer" > collides with next interrupt. that makes a lot of sense, i'll try with using splxxx() in the pseudo driver, to block out the real driver. it's currently splhigh() due to INTR_TYPE_MISC being used, but i guess i could change this to INTR_TYPE_NET or INTR_TYPE_TTY. what would be good for a telecommunications line card which is time sensitive and interrupts at a constant 1000Hz ? > it needs to call splxxx() while it is doing it.. > I would suggest having two buffers and swapping them under splxxx() so that > the one that the driver is accessing is not the one you are draining. > that way teh splxxx() levle needs to only be held for the small time > you are doing the swap. the first buffer is actually the buffer into which DMA reads/writes are done. what i referred to as "another buffer" is in fact a ring of buffers. the real driver writes into the top of the ring, and increments the top ring pointer. the pseudo driver reads from the bottom of the ring and increments the bottom ring pointer. buf1 buf2 buf3 buf4 buf5 buf6 buf7 buf8 ^ ^ | | | +-- top ring pointer, incremented as real driver reads | from device +-- bottom ring pointer, incremented as userland reads from pseudo > not locks, but spl, > and only step 8 needs to be changed because all teh rest are already > done at high spl. wouldnt a lockmgr() around the access to these ring buffers help since we're locking access to data and not necessarily execution ? -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+ From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 19:51:21 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D316516A41F for ; Tue, 1 Nov 2005 19:51:21 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2528E43D45 for ; Tue, 1 Nov 2005 19:51:16 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id jA1Jp25m020012; Tue, 1 Nov 2005 12:51:02 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <4367C726.8070405@samsco.org> Date: Tue, 01 Nov 2005 12:51:02 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dinesh Nair References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <4361E3E0.4090409@alphaque.com> <43676121.4030801@alphaque.com> <436791ED.8010808@samsco.org> <4367AA8D.3060506@alphaque.com> <4367BBDB.7020005@elischer.org> <4367C07C.1040900@alphaque.com> In-Reply-To: <4367C07C.1040900@alphaque.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: freebsd-hackers@freebsd.org, Julian Elischer Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 19:51:21 -0000 Dinesh Nair wrote: > > > On 11/02/05 03:02 Julian Elischer said the following: > >> drops to splzero or similar,.. >> woken process called, >> starts manipulating "another buffer" >> collides with next interrupt. > > > that makes a lot of sense, i'll try with using splxxx() in the pseudo > driver, to block out the real driver. it's currently splhigh() due to > INTR_TYPE_MISC being used, but i guess i could change this to > INTR_TYPE_NET or INTR_TYPE_TTY. what would be good for a > telecommunications line card which is time sensitive and interrupts at a > constant 1000Hz ? INTR_TYPE_TTY and spltty > >> it needs to call splxxx() while it is doing it.. >> I would suggest having two buffers and swapping them under splxxx() so >> that >> the one that the driver is accessing is not the one you are draining. >> that way teh splxxx() levle needs to only be held for the small time >> you are doing the swap. > > > > the first buffer is actually the buffer into which DMA reads/writes are > done. what i referred to as "another buffer" is in fact a ring of > buffers. the real driver writes into the top of the ring, and increments > the top ring pointer. the pseudo driver reads from the bottom of the > ring and increments the bottom ring pointer. > > buf1 buf2 buf3 buf4 buf5 buf6 buf7 buf8 > ^ ^ > | | > | +-- top ring pointer, incremented as real driver reads > | from device > +-- bottom ring pointer, incremented as userland reads from pseudo > You'll also want to use an spl in the top half of the pseudo driver to cover where the pointers are read and changed. > >> not locks, but spl, >> and only step 8 needs to be changed because all teh rest are already >> done at high spl. > > > wouldnt a lockmgr() around the access to these ring buffers help since > we're locking access to data and not necessarily execution ? > lockmgr is far to heavy-weight and complex for this. Scott From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 20:21:04 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C338616A41F for ; Tue, 1 Nov 2005 20:21:04 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id A3AD943D46 for ; Tue, 1 Nov 2005 20:21:03 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 65446 invoked by uid 0); 1 Nov 2005 20:21:01 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 1 Nov 2005 20:21:01 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.4/8.13.4) with ESMTP id jA1KEo7P000925; Wed, 2 Nov 2005 04:14:50 +0800 (MYT) (envelope-from dinesh@alphaque.com) Message-ID: <4367CCBA.9040506@alphaque.com> Date: Wed, 02 Nov 2005 04:14:50 +0800 From: Dinesh Nair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8b) Gecko/20050915 MIME-Version: 1.0 To: Scott Long References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <4361E3E0.4090409@alphaque.com> <43676121.4030801@alphaque.com> <436791ED.8010808@samsco.org> <4367AA8D.3060506@alphaque.com> <4367BBDB.7020005@elischer.org> <4367C07C.1040900@alphaque.com> <4367C726.8070405@samsco.org> In-Reply-To: <4367C726.8070405@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Julian Elischer Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 20:21:04 -0000 On 11/02/05 03:51 Scott Long said the following: > INTR_TYPE_TTY and spltty [..snipped..] > You'll also want to use an spl in the top half of the pseudo driver to > cover where the pointers are read and changed. thanx a bunch. i'll rewrite the portions affected based on yours and julian's suggestions and report back on how it went. this has been a very educating experience for me. -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+ From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 21:52:19 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65C8016A41F for ; Tue, 1 Nov 2005 21:52:19 +0000 (GMT) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id B96D743D48 for ; Tue, 1 Nov 2005 21:52:18 +0000 (GMT) (envelope-from max@love2party.net) Received: from p54A3D566.dip.t-dialin.net [84.163.213.102] (helo=donor.laier.local) by mrelayeu.kundenserver.de (node=mrelayeu0) with ESMTP (Nemesis), id 0MKwh2-1EX43F05cB-00089f; Tue, 01 Nov 2005 22:52:17 +0100 From: Max Laier To: freebsd-hackers@freebsd.org Date: Tue, 1 Nov 2005 22:52:02 +0100 User-Agent: KMail/1.8.2 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2849291.Y4a9W3dPT1"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200511012252.15467.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: Otto Moerbeek Subject: queue/list macros X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 21:52:19 -0000 --nextPart2849291.Y4a9W3dPT1 Content-Type: multipart/mixed; boundary="Boundary-01=_IO+ZDt6nJGWPrRJ" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_IO+ZDt6nJGWPrRJ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline All, inspired by:=20 http://marc.theaimsgroup.com/?l=3Dopenbsd-tech&m=3D112966325607754&w=3D2 I rolled this diff and would like to commit it. TRASHIT() is defined only= =20 under QUEUE_MACRO_DEBUG so this should be save for all and only affect peop= le=20 prepared to do debbuging. Any objections? =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --Boundary-01=_IO+ZDt6nJGWPrRJ Content-Type: text/x-diff; charset="us-ascii"; name="queue_trashit.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="queue_trashit.diff" Index: queue.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/store/mlaier/fcvs/src/sys/sys/queue.h,v retrieving revision 1.61 diff -u -p -r1.61 queue.h =2D-- queue.h 8 Aug 2005 05:43:57 -0000 1.61 +++ queue.h 1 Nov 2005 21:46:14 -0000 @@ -199,6 +199,7 @@ struct { \ SLIST_NEXT(curelm, field) =3D \ SLIST_NEXT(SLIST_NEXT(curelm, field), field); \ } \ + TRASHIT((elm)->field.sle_next); \ } while (0) =20 #define SLIST_REMOVE_HEAD(head, field) do { \ @@ -291,6 +292,7 @@ struct { \ STAILQ_NEXT(STAILQ_NEXT(curelm, field), field)) =3D=3D NULL)\ (head)->stqh_last =3D &STAILQ_NEXT((curelm), field);\ } \ + TRASHIT((elm)->field.stqe_next); \ } while (0) =20 #define STAILQ_REMOVE_HEAD(head, field) do { \ @@ -372,6 +374,8 @@ struct { \ LIST_NEXT((elm), field)->field.le_prev =3D \ (elm)->field.le_prev; \ *(elm)->field.le_prev =3D LIST_NEXT((elm), field); \ + TRASHIT((elm)->field.le_next); \ + TRASHIT((elm)->field.le_prev); \ } while (0) =20 /* --Boundary-01=_IO+ZDt6nJGWPrRJ-- --nextPart2849291.Y4a9W3dPT1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDZ+OPXyyEoT62BG0RAu9DAJ9H7yVB8+4t6ZrpA5owk/BfuNRHzwCfYi7v nKSujCD2ko7/vz6KTzxlxUg= =mY5g -----END PGP SIGNATURE----- --nextPart2849291.Y4a9W3dPT1-- From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 22:12:42 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 282C216A422 for ; Tue, 1 Nov 2005 22:12:42 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id D39C043D46 for ; Tue, 1 Nov 2005 22:12:41 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.23.117]) ([10.251.23.117]) by a50.ironport.com with ESMTP; 01 Nov 2005 14:12:41 -0800 X-IronPort-Anti-Spam-Filtered: true Message-ID: <4367E858.6000506@elischer.org> Date: Tue, 01 Nov 2005 14:12:40 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Scott Long References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <4361E3E0.4090409@alphaque.com> <43676121.4030801@alphaque.com> <436791ED.8010808@samsco.org> <4367AA8D.3060506@alphaque.com> <4367BBDB.7020005@elischer.org> <4367C07C.1040900@alphaque.com> <4367C726.8070405@samsco.org> In-Reply-To: <4367C726.8070405@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 22:12:42 -0000 Scott Long wrote: > Dinesh Nair wrote: > >> >> >> On 11/02/05 03:02 Julian Elischer said the following: >> >>> drops to splzero or similar,.. >>> woken process called, >>> starts manipulating "another buffer" >>> collides with next interrupt. >> >> >> >> that makes a lot of sense, i'll try with using splxxx() in the pseudo >> driver, to block out the real driver. it's currently splhigh() due to >> INTR_TYPE_MISC being used, but i guess i could change this to >> INTR_TYPE_NET or INTR_TYPE_TTY. what would be good for a >> telecommunications line card which is time sensitive and interrupts >> at a constant 1000Hz ? > > > INTR_TYPE_TTY and spltty depends on what they are using it for.. if it's a WAN interface, then splimp. (INTR_TYPE_NET) if ppp or several other moduels are loaded, teh tty and net masks are combined anyhow.. > >> >>> it needs to call splxxx() while it is doing it.. >>> I would suggest having two buffers and swapping them under splxxx() >>> so that >>> the one that the driver is accessing is not the one you are draining. >>> that way teh splxxx() levle needs to only be held for the small >>> time you are doing the swap. >> >> >> >> >> the first buffer is actually the buffer into which DMA reads/writes >> are done. what i referred to as "another buffer" is in fact a ring of >> buffers. the real driver writes into the top of the ring, and >> increments the top ring pointer. the pseudo driver reads from the >> bottom of the ring and increments the bottom ring pointer. >> >> buf1 buf2 buf3 buf4 buf5 buf6 buf7 buf8 >> ^ ^ >> | | >> | +-- top ring pointer, incremented as real driver reads >> | from device >> +-- bottom ring pointer, incremented as userland reads from pseudo >> > > You'll also want to use an spl in the top half of the pseudo driver to > cover where the pointers are read and changed. > >> >>> not locks, but spl, >>> and only step 8 needs to be changed because all teh rest are already >>> done at high spl. >> >> >> >> wouldnt a lockmgr() around the access to these ring buffers help >> since we're locking access to data and not necessarily execution ? >> > > lockmgr is far to heavy-weight and complex for this. > > Scott From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 22:16:07 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3FC816A41F for ; Tue, 1 Nov 2005 22:16:06 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED43D43D45 for ; Tue, 1 Nov 2005 22:16:00 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.23.117]) ([10.251.23.117]) by a50.ironport.com with ESMTP; 01 Nov 2005 14:16:01 -0800 X-IronPort-Anti-Spam-Filtered: true Message-ID: <4367E920.1020001@elischer.org> Date: Tue, 01 Nov 2005 14:16:00 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dinesh Nair References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <4361E3E0.4090409@alphaque.com> <43676121.4030801@alphaque.com> <436791ED.8010808@samsco.org> <4367AA8D.3060506@alphaque.com> <4367BBDB.7020005@elischer.org> <4367C07C.1040900@alphaque.com> <4367C726.8070405@samsco.org> <4367CCBA.9040506@alphaque.com> In-Reply-To: <4367CCBA.9040506@alphaque.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Scott Long Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 22:16:07 -0000 Dinesh Nair wrote: > > On 11/02/05 03:51 Scott Long said the following: > >> INTR_TYPE_TTY and spltty > > [..snipped..] > >> You'll also want to use an spl in the top half of the pseudo driver to >> cover where the pointers are read and changed. > > > thanx a bunch. i'll rewrite the portions affected based on yours and > julian's suggestions and report back on how it went. this has been a > very educating experience for me. except for selecting a TYPE, the bottom half shouldn't need any locking. It's already at splimp() (or spltty()) only code that can be run on behalf of the user, or from some other initiator (such as the clock) needs the spl.. also, why do you need a pseudo device AND a device? The device driver can do all the things you have suggested on its own. From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 22:30:01 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6BBD716A41F for ; Tue, 1 Nov 2005 22:30:01 +0000 (GMT) (envelope-from ben.siemon@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 050D543D45 for ; Tue, 1 Nov 2005 22:30:00 +0000 (GMT) (envelope-from ben.siemon@gmail.com) Received: by zproxy.gmail.com with SMTP id 40so996747nzk for ; Tue, 01 Nov 2005 14:30:00 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=aSiS6zn5zBdgfdQDZbDFqN2dndMb86vc6GE/xoIMjGEt6PlWoZtBKdgsmV3WOfq52xtEGrGfB9Iqa+Hb1Rx+T+OjGoj1ZTdSQSZFUaW6u1UMK81aX73ENgyDDJWPp3P7aTzk8y6UCVNu5zTqonSFUOjX2myMLDBgJnsfDxESS7w= Received: by 10.36.39.2 with SMTP id m2mr3411319nzm; Tue, 01 Nov 2005 14:30:00 -0800 (PST) Received: by 10.36.41.16 with HTTP; Tue, 1 Nov 2005 14:30:00 -0800 (PST) Message-ID: Date: Tue, 1 Nov 2005 16:30:00 -0600 From: Ben Siemon To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Contributing to FreeBSD list of things todo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 22:30:01 -0000 I have a suggestion for things dev people could do to help out with code already done. I noticed the suggestion for compiling with -Wall enabled. Would it serve any purpose to compile the sources with -ansi and or -pedantic as well? I am fairly new to FreeBSD so forgive me if this has alread been addressed. -- cheers Ben Siemon cs.baylor.edu/~siemon From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 22:42:31 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 636E316A421 for ; Tue, 1 Nov 2005 22:42:31 +0000 (GMT) (envelope-from viktor.vasilev@stud.tu-darmstadt.de) Received: from lnx117.hrz.tu-darmstadt.de (lnx117.hrz.tu-darmstadt.de [130.83.174.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BA4B43D45 for ; Tue, 1 Nov 2005 22:42:29 +0000 (GMT) (envelope-from viktor.vasilev@stud.tu-darmstadt.de) Received: from ilium.0xdeadc0de.net (ABC216.ram1st.wh.tu-darmstadt.de [130.83.20.203]) (authenticated bits=0) by lnx117.hrz.tu-darmstadt.de (8.12.10/8.12.10) with ESMTP id jA1MgINb011294 for ; Tue, 1 Nov 2005 23:42:19 +0100 Received: by ilium.0xdeadc0de.net (nbSMTP-1.00) for uid 1001 viktor.vasilev@stud.tu-darmstadt.de; Tue, 1 Nov 2005 23:42:24 +0100 (CET) Date: Tue, 1 Nov 2005 23:42:23 +0100 From: Viktor Vasilev To: freebsd-hackers@freebsd.org Message-ID: <20051101224223.GA737@ilium.0xdeadc0de.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 5.4-RELEASE i386 User-Agent: mutt-ng devel (FreeBSD) X-TUD-HRZ-MailScanner: Found to be clean X-TUD-HRZ-MailScanner-SpamCheck: X-MailScanner-From: viktor.vasilev@stud.tu-darmstadt.de Subject: select(2) timeout precision X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 22:42:31 -0000 Hello fellow hackers, I'm writing a piece of code, that basically does the following in a thread: tick.tv_sec = 0; tick.tv_usec = 10000; gettimeofday(&t1, NULL); select(0, NULL, NULL, NULL, &tick); gettimeofday(&t2, NULL); With FreeBSD 5.4-RELEASE I almost constantly get ~20000 microseconds delta. That is with 100HZ kernel on PIII 500MHz or Sempron 64 2800+ running in i386 mode. It also doesn't matter if I use usleep or select. I've tested the code on linux with 2.6.11 kernel and there I not only get the 10000 us sleep, but I can also set it to 5000 us and it still runs very accurately. So my question is, is this a FreeBSD limitation of some kind, and is there a way to circumvent it? Best regard, Viktor -- I think and think for months and years. Ninety nine times, the conclusion is false. The hundredth time I am right. -- Albert Einstein From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 22:58:53 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B4FE616A420 for ; Tue, 1 Nov 2005 22:58:53 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3934F43D73 for ; Tue, 1 Nov 2005 22:58:48 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id jA1MwmpB005310; Tue, 1 Nov 2005 14:58:48 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id jA1MwmGq005309; Tue, 1 Nov 2005 14:58:48 -0800 Date: Tue, 1 Nov 2005 14:58:48 -0800 From: Brooks Davis To: Ben Siemon Message-ID: <20051101225848.GB20543@odin.ac.hmc.edu> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qlTNgmc+xy1dBmNv" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-hackers@freebsd.org Subject: Re: Contributing to FreeBSD list of things todo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 22:58:53 -0000 --qlTNgmc+xy1dBmNv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 01, 2005 at 04:30:00PM -0600, Ben Siemon wrote: > I have a suggestion for things dev people could do to help out with > code already done. I noticed the suggestion for compiling with -Wall > enabled. Would it serve any purpose to compile the sources with -ansi > and or -pedantic as well? I am fairly new to FreeBSD so forgive me if > this has alread been addressed. I think the todo list is dated in this area. We now compile many files with large sets of warning flags via the WARNS variable in Makefiles. It is useful to expand the coverage in this area, but it's not all that trivial. It's often fairly easy to make the warning go away without fixing the real problem the warning represented. This means that far too many patches to raise warning levels are useless and waste developer time. There's also the fact that such changes need to be tested on multiple architectures because certain warnings are platform specfic. At the least testing is needed on i386, alpha, and sparc. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --qlTNgmc+xy1dBmNv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDZ/MnXY6L6fI4GtQRAlQWAJ9l+J6a1bqiggFGIgn+95NdYdFrpACeNHZI cMWflbthH67cWGg9mnC9flE= =1Yxt -----END PGP SIGNATURE----- --qlTNgmc+xy1dBmNv-- From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 23:15:09 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E533816A421; Tue, 1 Nov 2005 23:15:08 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from chickasaw.net (mail.chickasaw.net [66.142.195.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id B44B143D48; Tue, 1 Nov 2005 23:15:07 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from ([10.64.11.3]) by adasmg01.chickasaw.net with ESMTP id 5202125.8155936; Tue, 01 Nov 2005 17:09:10 -0600 Received: from mail pickup service by adaexc03.int.chickasaw.net with Microsoft SMTPSVC; Tue, 1 Nov 2005 16:46:04 -0600 Received: from chickasaw.net ([192.168.1.5]) by adaexc03.int.chickasaw.net with Microsoft SMTPSVC(5.0.2195.6713); Sun, 30 Oct 2005 04:08:02 -0600 Received: from ([216.136.204.119]) by adasmg01.chickasaw.net with ESMTP id 5202125.7779538; Sun, 30 Oct 2005 04:08:12 -0600 Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 885455715F; Sun, 30 Oct 2005 10:08:08 +0000 (GMT) (envelope-from owner-freebsd-questions@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 9600316A424; Sun, 30 Oct 2005 10:08:07 +0000 (GMT) (envelope-from owner-freebsd-questions@freebsd.org) X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 03EFE16A41F for ; Sun, 30 Oct 2005 10:07:51 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web35708.mail.mud.yahoo.com (web35708.mail.mud.yahoo.com [66.163.179.162]) by mx1.FreeBSD.org (Postfix) with SMTP id 3A19043D46 for ; Sun, 30 Oct 2005 10:07:50 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 12793 invoked by uid 60001); 30 Oct 2005 10:07:49 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Si9cIv8+tYiczo7gnlrRh+kpnGd9KRHupR/nziP6/ClC5j2yjd2Od0Q1GCS4w1A8WrOQ+X5nRfJm7Jgxk/nUT62l0ATdicp7If68Z+rm0GJerCxkatSeGbQ3oH1D/XBvRBYUWEfPQeqs4obBdcAvZWj948X2YOIROtuy2YMqyps= ; Message-ID: <20051030100749.12791.qmail@web35708.mail.mud.yahoo.com> Received: from [202.79.62.15] by web35708.mail.mud.yahoo.com via HTTP; Sun, 30 Oct 2005 02:07:49 PST Date: Sun, 30 Oct 2005 02:07:49 -0800 (PST) From: kamal kc To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-questions@freebsd.org Errors-To: owner-freebsd-questions@freebsd.org Content-Transfer-Encoding: quoted-printable X-esp: ESP<-98>=RBL:<-139> RDNS:<0> SHA:<53> UHA:<0> SLS:<0> BAYES:<-11> SenderID:<-1> X-OriginalArrivalTime: 30 Oct 2005 10:08:02.0823 (UTC) FILETIME=[D0580170:01C5DD39] Cc: freebsd , freebsd Subject: tcp services (ssh,ftp) does not work X-BeenThere: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 23:15:09 -0000 dear all, i have put sshd_enable=3D"YES" and inetd_enable=3D"YES" in /etc/rc.conf. netstat -an also shows that the port numbers 21 and 22 are in listen state ftp is uncommented in /etc/inetd.conf but still the ssh/ftp services does not work. when i ftp from another computer the netstat shows connection established but the ftp client=20 does not show anything.=20 using ftp/ssh on the same computer also does not show anything --- just blank. what could have gone wrong. Help !!! kamal =09 =09 __________________________________=20 Yahoo! Mail - PC Magazine Editors' Choice 2005=20 http://mail.yahoo.com _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 05:19:21 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 49BBA16A41F for ; Wed, 2 Nov 2005 05:19:21 +0000 (GMT) (envelope-from misho@interbgc.com) Received: from mail.interbgc.com (mx01.interbgc.com [217.9.224.225]) by mx1.FreeBSD.org (Postfix) with SMTP id 656A743D46 for ; Wed, 2 Nov 2005 05:19:19 +0000 (GMT) (envelope-from misho@interbgc.com) Received: (qmail 34647 invoked from network); 2 Nov 2005 05:19:18 -0000 Received: from misho@interbgc.com by keeper.interbgc.com by uid 1002 with qmail-scanner-1.14 (uvscan: v4.2.40/v4374. spamassassin: 2.63. Clear:SA:0(-2.6/8.0):. Processed in 3.300011 secs); 02 Nov 2005 05:19:18 -0000 X-Spam-Status: No, hits=-2.6 required=8.0 Received: from topilapi-wlan.ddns.cablebg.net (HELO misho) (213.240.204.43) by mx01.interbgc.com with SMTP; 2 Nov 2005 05:19:14 -0000 Message-ID: <003a01c5df6c$f7236080$2bccf0d5@misho> From: "Mihail Balikov" To: "Viktor Vasilev" , References: <20051101224223.GA737@ilium.0xdeadc0de.net> Date: Wed, 2 Nov 2005 07:19:14 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1506 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Cc: Subject: Re: select(2) timeout precision X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mihail Balikov List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 05:19:21 -0000 http://www.dragonflybsd.org/docs/nanosleep/ ----- Original Message ----- From: "Viktor Vasilev" To: Sent: Wednesday, November 02, 2005 12:42 AM Subject: select(2) timeout precision > Hello fellow hackers, > > I'm writing a piece of code, that basically does the following in a > thread: > > tick.tv_sec = 0; > tick.tv_usec = 10000; > gettimeofday(&t1, NULL); > select(0, NULL, NULL, NULL, &tick); > gettimeofday(&t2, NULL); > > With FreeBSD 5.4-RELEASE I almost constantly get ~20000 microseconds > delta. That is with 100HZ kernel on PIII 500MHz or Sempron 64 2800+ > running in i386 mode. It also doesn't matter if I use usleep or > select. I've tested the code on linux with 2.6.11 kernel and there I > not only get the 10000 us sleep, but I can also set it to 5000 us and > it still runs very accurately. > > So my question is, is this a FreeBSD limitation of some kind, and is > there a way to circumvent it? > > > Best regard, > Viktor > -- > I think and think for months and years. Ninety nine times, the > conclusion is false. The hundredth time I am right. > -- Albert Einstein > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 05:57:50 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D105716A41F for ; Wed, 2 Nov 2005 05:57:50 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id ED99943D45 for ; Wed, 2 Nov 2005 05:57:48 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 71230 invoked by uid 0); 2 Nov 2005 05:57:45 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 2 Nov 2005 05:57:45 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.4/8.13.4) with ESMTP id jA25Wx28001061; Wed, 2 Nov 2005 13:32:59 +0800 (MYT) (envelope-from dinesh@alphaque.com) Message-ID: <43684F8B.3000900@alphaque.com> Date: Wed, 02 Nov 2005 13:32:59 +0800 From: Dinesh Nair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8b) Gecko/20050915 MIME-Version: 1.0 To: Julian Elischer References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <4361E3E0.4090409@alphaque.com> <43676121.4030801@alphaque.com> <436791ED.8010808@samsco.org> <4367AA8D.3060506@alphaque.com> <4367BBDB.7020005@elischer.org> <4367C07C.1040900@alphaque.com> <4367C726.8070405@samsco.org> <4367E858.6000506@elischer.org> In-Reply-To: <4367E858.6000506@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Scott Long Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 05:57:50 -0000 On 11/02/05 06:12 Julian Elischer said the following: > depends on what they are using it for.. > if it's a WAN interface, then splimp. (INTR_TYPE_NET) > > if ppp or several other moduels are loaded, teh tty and net masks are > combined anyhow.. it's a quad-span E1/T1 line card which would be carrying voice PRIs. the card interrupts every 1000 times a second. -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+ From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 05:57:51 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 01A0016A41F for ; Wed, 2 Nov 2005 05:57:51 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id 457F543D46 for ; Wed, 2 Nov 2005 05:57:48 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 71234 invoked by uid 0); 2 Nov 2005 05:57:46 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 2 Nov 2005 05:57:46 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.4/8.13.4) with ESMTP id jA25Z3UB001065; Wed, 2 Nov 2005 13:35:03 +0800 (MYT) (envelope-from dinesh@alphaque.com) Message-ID: <43685007.7000506@alphaque.com> Date: Wed, 02 Nov 2005 13:35:03 +0800 From: Dinesh Nair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8b) Gecko/20050915 MIME-Version: 1.0 To: Julian Elischer References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <4361E3E0.4090409@alphaque.com> <43676121.4030801@alphaque.com> <436791ED.8010808@samsco.org> <4367AA8D.3060506@alphaque.com> <4367BBDB.7020005@elischer.org> <4367C07C.1040900@alphaque.com> <4367C726.8070405@samsco.org> <4367CCBA.9040506@alphaque.com> <4367E920.1020001@elischer.org> In-Reply-To: <4367E920.1020001@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Scott Long Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 05:57:51 -0000 On 11/02/05 06:16 Julian Elischer said the following: > also, why do you need a pseudo device AND a device? The device driver > can do all the things you have > suggested on its own. this is so userland apps wont need to change when different devices are used. the pseudo device is the front for a number of real device drivers running different devices from a quad-span E1/T1 line card to 4-port FXS/FXO line cards. each of these cards are different, but present the same device interface to the userland app via the pseudo device driver. -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+ From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 07:31:42 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8013816A41F for ; Wed, 2 Nov 2005 07:31:42 +0000 (GMT) (envelope-from silby@silby.com) Received: from relay.pair.com (relay00.pair.com [209.68.5.9]) by mx1.FreeBSD.org (Postfix) with SMTP id F106643D45 for ; Wed, 2 Nov 2005 07:31:41 +0000 (GMT) (envelope-from silby@silby.com) Received: (qmail 81180 invoked from network); 2 Nov 2005 07:31:40 -0000 Received: from unknown (HELO localhost) (unknown) by unknown with SMTP; 2 Nov 2005 07:31:40 -0000 X-pair-Authenticated: 209.68.2.70 Date: Wed, 2 Nov 2005 01:31:39 -0600 (CST) From: Mike Silbersack To: Viktor Vasilev In-Reply-To: <20051101224223.GA737@ilium.0xdeadc0de.net> Message-ID: <20051102012953.C815@odysseus.silby.com> References: <20051101224223.GA737@ilium.0xdeadc0de.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: select(2) timeout precision X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 07:31:42 -0000 On Tue, 1 Nov 2005, Viktor Vasilev wrote: > With FreeBSD 5.4-RELEASE I almost constantly get ~20000 microseconds > delta. That is with 100HZ kernel on PIII 500MHz or Sempron 64 2800+ Put kern.hz=1000 in /boot/loader.conf to kick it up to 1000Hz, that should improve the accuracy a lot. The optimizations in the url someone else posted should probably be integrated into FreeBSD, but moving to a higher Hz setting is a necessity in either case. Mike "Silby" Silbersack From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 09:12:57 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 11EEE16A421 for ; Wed, 2 Nov 2005 09:12:57 +0000 (GMT) (envelope-from andrit@ukr.net) Received: from jerry.kiev.farlep.net (jerry.kiev.farlep.net [213.130.24.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D4E843D45 for ; Wed, 2 Nov 2005 09:12:56 +0000 (GMT) (envelope-from andrit@ukr.net) Received: from frontex.kiev.farlep.net ([62.221.47.70] helo=[192.168.101.13]) by jerry.kiev.farlep.net with esmtp (Exim 4.54 (FreeBSD)) id 1EXEfu-000BEc-7Q for freebsd-hackers@freebsd.org; Wed, 02 Nov 2005 11:12:54 +0200 From: Andriy Tkachuk Organization: eMICT To: freebsd-hackers@freebsd.org Date: Wed, 2 Nov 2005 11:14:23 +0200 User-Agent: KMail/1.8.2 References: <20051101110151.D67802@underfoot.windborne.net> <3.0.1.32.20051101081952.00a80e00@pop.redshift.com> In-Reply-To: <3.0.1.32.20051101081952.00a80e00@pop.redshift.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200511021114.23624.andrit@ukr.net> X-Farlep-Data: 62.221.47.70 Subject: Re: [FreeBSD-Announce] New Logo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 09:12:57 -0000 On Tuesday 01 November 2005 18:19, ray@redshift.com wrote: > 4.  I sure ain't going to wear a T-shirt with that on it. sad story - i'm too... From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 09:20:44 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 00A5716A41F for ; Wed, 2 Nov 2005 09:20:43 +0000 (GMT) (envelope-from viktor.vasilev@stud.tu-darmstadt.de) Received: from lnx117.hrz.tu-darmstadt.de (lnx117.hrz.tu-darmstadt.de [130.83.174.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 428A743D45 for ; Wed, 2 Nov 2005 09:20:38 +0000 (GMT) (envelope-from viktor.vasilev@stud.tu-darmstadt.de) Received: from ilium.0xdeadc0de.net (ABC216.ram1st.wh.tu-darmstadt.de [130.83.20.203]) (authenticated bits=0) by lnx117.hrz.tu-darmstadt.de (8.12.10/8.12.10) with ESMTP id jA29KG3i007383; Wed, 2 Nov 2005 10:20:16 +0100 Received: by ilium.0xdeadc0de.net (nbSMTP-1.00) for uid 1001 viktor.vasilev@stud.tu-darmstadt.de; Wed, 2 Nov 2005 10:20:22 +0100 (CET) Date: Wed, 2 Nov 2005 10:20:22 +0100 From: Viktor Vasilev To: Mike Silbersack Message-ID: <20051102092022.GA624@ilium.0xdeadc0de.net> References: <20051101224223.GA737@ilium.0xdeadc0de.net> <20051102012953.C815@odysseus.silby.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051102012953.C815@odysseus.silby.com> X-Operating-System: FreeBSD 5.4-RELEASE i386 User-Agent: mutt-ng devel (FreeBSD) X-TUD-HRZ-MailScanner: Found to be clean X-TUD-HRZ-MailScanner-SpamCheck: X-MailScanner-From: viktor.vasilev@stud.tu-darmstadt.de Cc: freebsd-hackers@freebsd.org Subject: Re: select(2) timeout precision X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 09:20:44 -0000 On Wed, Nov 02, 2005 at 01:31:39AM -0600, Mike Silbersack wrote: > > On Tue, 1 Nov 2005, Viktor Vasilev wrote: > > >With FreeBSD 5.4-RELEASE I almost constantly get ~20000 microseconds > >delta. That is with 100HZ kernel on PIII 500MHz or Sempron 64 2800+ > > Put kern.hz=1000 in /boot/loader.conf to kick it up to 1000Hz, that > should improve the accuracy a lot. Indeed! That did the trick. > The optimizations in the url someone else posted should probably be > integrated into FreeBSD, but moving to a higher Hz setting is a > necessity in either case. I've read in the lists, that in -CURRENT 1000HZ and PREEMPTION are in the GENERIC kernel. It'll be interesting to see how it performs there. With 6.0 around the corner, I'll give it a try soon. Thank you and Mihail Balikov for the pointers. Cheers, Viktor -- I think and think for months and years. Ninety nine times, the conclusion is false. The hundredth time I am right. -- Albert Einstein From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 09:37:12 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5030016A41F for ; Wed, 2 Nov 2005 09:37:12 +0000 (GMT) (envelope-from viktor.vasilev@stud.tu-darmstadt.de) Received: from lnx117.hrz.tu-darmstadt.de (lnx117.hrz.tu-darmstadt.de [130.83.174.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A98D43D4C for ; Wed, 2 Nov 2005 09:37:11 +0000 (GMT) (envelope-from viktor.vasilev@stud.tu-darmstadt.de) Received: from ilium.0xdeadc0de.net (ABC216.ram1st.wh.tu-darmstadt.de [130.83.20.203]) (authenticated bits=0) by lnx117.hrz.tu-darmstadt.de (8.12.10/8.12.10) with ESMTP id jA29au3i014039 for ; Wed, 2 Nov 2005 10:36:56 +0100 Received: by ilium.0xdeadc0de.net (nbSMTP-1.00) for uid 1001 viktor.vasilev@stud.tu-darmstadt.de; Wed, 2 Nov 2005 10:37:02 +0100 (CET) Date: Wed, 2 Nov 2005 10:37:02 +0100 From: Viktor Vasilev To: freebsd-hackers@freebsd.org Message-ID: <20051102093702.GB624@ilium.0xdeadc0de.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 5.4-RELEASE i386 User-Agent: mutt-ng devel (FreeBSD) X-TUD-HRZ-MailScanner: Found to be clean X-TUD-HRZ-MailScanner-SpamCheck: X-MailScanner-From: viktor.vasilev@stud.tu-darmstadt.de Subject: sysprof, interrupting threads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 09:37:12 -0000 Hello fellow hackers, I was thinking of porting the linux sysprof kernel and userland tools to FreeBSD. I spent some time studying the code and wrote a skeleton driver that uses the callout mechanism to wake up periodically. That was only to discover, that the context in which the driver awakes is that of the software clock interrupt. The linux sysprof driver uses a timer hook API that was introduced in the 2.6 kernel series. I don't have a profound understanding of the linux kernel but it seems that the hook gets executed in the process context that was currently executing as the tick happened. My question is, is there a better place to plant the code, so that it executes periodically in the context of the current runnging thread? I was also thinking of traversing the list of processes but I'm not sure if I can tell which one was interrupted by the swi. Any suggestions are wellcome. Best regards, Viktor -- I think and think for months and years. Ninety nine times, the conclusion is false. The hundredth time I am right. -- Albert Einstein From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 11:19:44 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A01C16A41F for ; Wed, 2 Nov 2005 11:19:44 +0000 (GMT) (envelope-from corecode@fs.ei.tum.de) Received: from stella.fs.ei.tum.de (stella.fs.ei.tum.de [129.187.54.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28BBD43D45 for ; Wed, 2 Nov 2005 11:19:41 +0000 (GMT) (envelope-from corecode@fs.ei.tum.de) Received: from localhost (localhost [127.0.0.1]) by localhost.fs.ei.tum.de (Postfix) with ESMTP id CA05C8DC7F; Wed, 2 Nov 2005 12:19:39 +0100 (CET) Received: from stella.fs.ei.tum.de ([127.0.0.1]) by localhost (stella [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07819-03-2; Wed, 2 Nov 2005 12:19:39 +0100 (CET) Received: from [IPv6:2001:4ca0:0:fe00:0:5efe:a96:b4b4] (unknown [IPv6:2001:4ca0:0:fe00:0:5efe:a96:b4b4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by stella.fs.ei.tum.de (Postfix) with ESMTP id 55B128DB87; Wed, 2 Nov 2005 12:19:39 +0100 (CET) Message-ID: <4368A10A.30404@fs.ei.tum.de> Date: Wed, 02 Nov 2005 12:20:42 +0100 From: Simon 'corecode' Schubert User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050912) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Brian Buchanan References: <20051031192152.K12203@thought.holo.org> In-Reply-To: <20051031192152.K12203@thought.holo.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at fs.ei.tum.de Cc: freebsd-hackers@freebsd.org Subject: Re: silly gcc bug in RELENG_6 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 11:19:44 -0000 Brian Buchanan wrote: > test.c: In function `foobar': > test.c:6: error: invalid application of `sizeof' to incomplete type > `test.c' > ^^^^^^^^ Looks like someone goofed up some printf() args. yah, but it's in the gcc code itself, no FreeBSD modification. cheers simon -- Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\ Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \ From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 15:04:27 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E13D16A41F for ; Wed, 2 Nov 2005 15:04:27 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D6F343D48 for ; Wed, 2 Nov 2005 15:04:26 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jA2F2tSJ035726; Wed, 2 Nov 2005 08:02:55 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 02 Nov 2005 08:03:07 -0700 (MST) Message-Id: <20051102.080307.108809945.imp@bsdimp.com> To: ben.siemon@gmail.com From: "M. Warner Losh" In-Reply-To: References: X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 02 Nov 2005 08:02:55 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: Contributing to FreeBSD list of things todo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 15:04:27 -0000 In message: Ben Siemon writes: : I have a suggestion for things dev people could do to help out with : code already done. I noticed the suggestion for compiling with -Wall : enabled. Would it serve any purpose to compile the sources with -ansi : and or -pedantic as well? I am fairly new to FreeBSD so forgive me if : this has alread been addressed. -ansi and/or -pedantic would show where the gcc extensions are used. There's a lot of places in the tree where they are, so this would take a lot of work to make clean. Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 15:16:42 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7FF4716A445 for ; Wed, 2 Nov 2005 15:16:42 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail5.speedfactory.net [66.23.216.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id A82D043D48 for ; Wed, 2 Nov 2005 15:16:41 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 1239527 for multiple; Wed, 02 Nov 2005 10:14:41 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id jA2FGaGg057602; Wed, 2 Nov 2005 10:16:38 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 2 Nov 2005 09:53:43 -0500 User-Agent: KMail/1.8.2 References: <20051102093702.GB624@ilium.0xdeadc0de.net> In-Reply-To: <20051102093702.GB624@ilium.0xdeadc0de.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511020953.44298.jhb@freebsd.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=100 Cc: Viktor Vasilev Subject: Re: sysprof, interrupting threads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 15:16:42 -0000 On Wednesday 02 November 2005 04:37 am, Viktor Vasilev wrote: > Hello fellow hackers, > > I was thinking of porting the linux sysprof kernel and userland tools > to FreeBSD. I spent some time studying the code and wrote a skeleton > driver that uses the callout mechanism to wake up periodically. That > was only to discover, that the context in which the driver awakes is > that of the software clock interrupt. > > The linux sysprof driver uses a timer hook API that was introduced in > the 2.6 kernel series. I don't have a profound understanding of the > linux kernel but it seems that the hook gets executed in the process > context that was currently executing as the tick happened. > > My question is, is there a better place to plant the code, so that it > executes periodically in the context of the current runnging thread? > I was also thinking of traversing the list of processes but I'm not > sure if I can tell which one was interrupted by the swi. > > Any suggestions are wellcome. hardclock_process() and statclock_process() (poorly named, should really be s/process/thread/ at this point). I believe kernel gprof profiling is done in statclock_process for example. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 1 23:21:47 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2BEBD16A41F; Tue, 1 Nov 2005 23:21:47 +0000 (GMT) (envelope-from shih@math.jussieu.fr) Received: from chickasaw.net (mail.chickasaw.net [66.142.195.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0794E43D49; Tue, 1 Nov 2005 23:21:29 +0000 (GMT) (envelope-from shih@math.jussieu.fr) Received: from ([10.64.11.3]) by adasmg01.chickasaw.net with ESMTP id 5202125.8157970; Tue, 01 Nov 2005 17:19:53 -0600 Received: from mail pickup service by adaexc03.int.chickasaw.net with Microsoft SMTPSVC; Tue, 1 Nov 2005 16:46:09 -0600 Received: from chickasaw.net ([192.168.1.5]) by adaexc03.int.chickasaw.net with Microsoft SMTPSVC(5.0.2195.6713); Sun, 30 Oct 2005 09:15:51 -0600 Received: from ([216.136.204.119]) by adasmg01.chickasaw.net with ESMTP id 5202125.7804168; Sun, 30 Oct 2005 09:16:05 -0600 Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18]) by mx2.freebsd.org (Postfix) with ESMTP id 110F156F85; Sun, 30 Oct 2005 15:16:03 +0000 (GMT) (envelope-from owner-freebsd-questions@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 9DF5616A430; Sun, 30 Oct 2005 15:16:01 +0000 (GMT) (envelope-from owner-freebsd-questions@freebsd.org) X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF8E616A41F; Sun, 30 Oct 2005 15:15:47 +0000 (GMT) (envelope-from jas@math.jussieu.fr) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05DB643D5D; Sun, 30 Oct 2005 15:15:39 +0000 (GMT) (envelope-from jas@math.jussieu.fr) Received: from riemann.math.jussieu.fr (riemann.math.jussieu.fr [134.157.13.3]) by shiva.jussieu.fr (8.13.5/jtpda-5.4) with ESMTP id j9UFFaX8065138 ; Sun, 30 Oct 2005 16:15:37 +0100 (CET) X-Ids: 168 Received: from grobner2.math.jussieu.fr (grobner2.math.jussieu.fr [134.157.13.119]) by riemann.math.jussieu.fr (8.12.10/jtpda-5.4) with ESMTP id j9UFFYN3056035 ; Sun, 30 Oct 2005 16:15:34 +0100 (CET) Received: from grobner2.math.jussieu.fr (localhost.localdomain [127.0.0.1]) by grobner2.math.jussieu.fr (8.13.1/jtpda-5.4) with ESMTP id j9UFFYmZ018527 ; Sun, 30 Oct 2005 16:15:34 +0100 Received: (from jas@localhost) by grobner2.math.jussieu.fr (8.13.1/8.13.1/Submit) id j9UFFXuj018526; Sun, 30 Oct 2005 16:15:33 +0100 Date: Sun, 30 Oct 2005 16:15:33 +0100 From: Albert Shih To: kamal kc Message-ID: <20051030151533.GA15623@math.jussieu.fr> References: <20051030100749.12791.qmail@web35708.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20051030100749.12791.qmail@web35708.mail.mud.yahoo.com> User-Agent: Mutt/1.5.6i X-Spam-Score: -1.44 () ALL_TRUSTED X-Scanned-By: MIMEDefang 2.53 on 134.157.13.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.7.2 (shiva.jussieu.fr [134.157.0.168]); Sun, 30 Oct 2005 16:15:38 +0100 (CET) X-Antivirus: scanned by sophie at shiva.jussieu.fr X-Miltered: at shiva.jussieu.fr with ID 4364E398.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-questions@freebsd.org Errors-To: owner-freebsd-questions@freebsd.org Content-Transfer-Encoding: quoted-printable X-esp: ESP<-98>=RBL:<-139> RDNS:<0> SHA:<53> UHA:<0> SLS:<0> BAYES:<-11> SenderID:<-1> X-OriginalArrivalTime: 30 Oct 2005 15:15:51.0987 (UTC) FILETIME=[D0D2C830:01C5DD64] X-Mailman-Approved-At: Wed, 02 Nov 2005 15:20:17 +0000 Cc: freebsd , freebsd-questions@freebsd.org, freebsd Subject: Re: tcp services (ssh,ftp) does not work X-BeenThere: freebsd-hackers@freebsd.org Reply-To: shih@math.jussieu.fr List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2005 23:21:47 -0000 Le 30/10/2005 =E0 02:07:49-0800, kamal kc a =E9crit > dear all, >=20 > i have put sshd_enable=3D"YES" > and inetd_enable=3D"YES" > in /etc/rc.conf. >=20 > netstat -an also shows that the port numbers > 21 and 22 are in listen state >=20 > ftp is uncommented in /etc/inetd.conf >=20 > but still the ssh/ftp services does not work. >=20 > when i ftp from another computer the netstat > shows connection established but the ftp client=20 > does not show anything.=20 >=20 > using ftp/ssh on the same computer also does not show > anything --- just blank. >=20 >=20 > what could have gone wrong. Check your /etc/hosts.allow Regards. -- Albert SHIH Universite de Paris 7 (Denis DIDEROT) U.F.R. de Mathematiques. Heure local/Local time: Sun Oct 30 16:15:08 CET 2005 _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 06:54:23 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF99916A420 for ; Wed, 2 Nov 2005 06:54:23 +0000 (GMT) (envelope-from otto@drijf.net) Received: from vera.drijf.net (vera.xs4all.nl [213.84.84.111]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B42843D48 for ; Wed, 2 Nov 2005 06:54:22 +0000 (GMT) (envelope-from otto@drijf.net) Received: from fonzo.intra.drijf.net (root@fonzo.drijf.net [IPv6:2001:888:1768:0:211:24ff:fe74:7ae6]) by vera.drijf.net (8.13.4/8.13.4) with ESMTP id jA26sL24011713 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Wed, 2 Nov 2005 07:54:21 +0100 (CET) Received: from fonzo.intra.drijf.net (otto@localhost.intra.drijf.net [127.0.0.1]) by fonzo.intra.drijf.net (8.13.4/8.13.3) with ESMTP id jA26sKGk020866; Wed, 2 Nov 2005 07:54:20 +0100 (CET) Received: from localhost (otto@localhost) by fonzo.intra.drijf.net (8.13.4/8.13.3/Submit) with ESMTP id jA26sJuO011337; Wed, 2 Nov 2005 07:54:19 +0100 (CET) Date: Wed, 2 Nov 2005 07:54:19 +0100 (CET) From: Otto Moerbeek To: Max Laier In-Reply-To: <200511012252.15467.max@love2party.net> Message-ID: References: <200511012252.15467.max@love2party.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailman-Approved-At: Wed, 02 Nov 2005 15:20:17 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: queue/list macros X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 06:54:24 -0000 On Tue, 1 Nov 2005, Max Laier wrote: > All, > > inspired by: > http://marc.theaimsgroup.com/?l=openbsd-tech&m=112966325607754&w=2 > > I rolled this diff and would like to commit it. TRASHIT() is defined only > under QUEUE_MACRO_DEBUG so this should be save for all and only affect people > prepared to do debbuging. > > Any objections? Thanks for letting me know, somehow it never ocurred to me that the other BSDs could have something here. Stupid but true. TRASHIT is better that setting the fields to NULL, as I did before (this was backed out). I have posted a new diff to tech@openbsd.org some days ago. -Otto From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 13:12:45 2005 Return-Path: X-Original-To: hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 03A4916A41F; Wed, 2 Nov 2005 13:12:45 +0000 (GMT) (envelope-from mi@corbulon.video-collage.com) Received: from corbulon.video-collage.com (static-151-204-231-237.bos.east.verizon.net [151.204.231.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7784143D45; Wed, 2 Nov 2005 13:12:44 +0000 (GMT) (envelope-from mi@corbulon.video-collage.com) Received: from corbulon.video-collage.com (mi@localhost.video-collage.com [127.0.0.1]) by corbulon.video-collage.com (8.13.4/8.13.1) with ESMTP id jA25UkCa002229 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 2 Nov 2005 00:30:46 -0500 (EST) (envelope-from mi@corbulon.video-collage.com) Received: (from mi@localhost) by corbulon.video-collage.com (8.13.4/8.13.4/Submit) id jA25UjWc002228; Wed, 2 Nov 2005 00:30:45 -0500 (EST) (envelope-from mi) From: Mikhail Teterin Message-Id: <200511020530.jA25UjWc002228@corbulon.video-collage.com> To: hackers@FreeBSD.org, hardware@FreeBSD.org Date: Wed, 2 Nov 2005 00:30:45 -0500 (EST) X-Mailer: ELM [version 2.5 PL7] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV devel-20050525/1153/Tue Nov 1 11:58:51 2005 on corbulon.video-collage.com X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.43 X-Mailman-Approved-At: Wed, 02 Nov 2005 15:20:17 +0000 Cc: wpaul@ctr.columbia.edu Subject: skc0: unknown media type: 0x0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 13:12:45 -0000 Hello! After another reboot, I started getting the message in subject and thus have lost my network connection. The card used to be identified as: sk0: on skc0 [....] I initially rebooted to add RAM to the machine, but have since tried to take the extra memory back out to no avail :-( Short of a sudden hardware problem, what could be the reason for this? Thanks! -mi From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 19:02:06 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3350716A41F for ; Wed, 2 Nov 2005 19:02:06 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id 24D7943D48 for ; Wed, 2 Nov 2005 19:02:04 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 80725 invoked by uid 0); 2 Nov 2005 19:02:03 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 2 Nov 2005 19:02:03 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.4/8.13.4) with ESMTP id jA2INWZu026758; Thu, 3 Nov 2005 02:23:32 +0800 (MYT) (envelope-from dinesh@alphaque.com) Message-ID: <43690424.1040904@alphaque.com> Date: Thu, 03 Nov 2005 02:23:32 +0800 From: Dinesh Nair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8b) Gecko/20050915 MIME-Version: 1.0 To: "M. Warner Losh" References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> In-Reply-To: <20051027.205250.55834228.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 19:02:06 -0000 On 10/28/05 10:52 M. Warner Losh said the following: > libc_r will block all other threads in the application while an ioctl > executes. libpthread and libthr won't. I've had several bugs at work so if the userland thread does an ioctl, and the the driver goes to tsleep() when the ioctl is received, all other threads are also blocked from executing, i.e wont be context switched to run ? is this behaviour only 4.x specific or is it also there in 5.x ? -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+ From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 19:13:28 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C28516A41F for ; Wed, 2 Nov 2005 19:13:28 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id E964243D45 for ; Wed, 2 Nov 2005 19:13:27 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.23.117]) ([10.251.23.117]) by a50.ironport.com with ESMTP; 02 Nov 2005 11:04:32 -0800 X-IronPort-Anti-Spam-Filtered: true Message-ID: <43690DBF.3020706@elischer.org> Date: Wed, 02 Nov 2005 11:04:31 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dinesh Nair References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <4361E3E0.4090409@alphaque.com> <43676121.4030801@alphaque.com> <436791ED.8010808@samsco.org> <4367AA8D.3060506@alphaque.com> <4367BBDB.7020005@elischer.org> <4367C07C.1040900@alphaque.com> <4367C726.8070405@samsco.org> <4367E858.6000506@elischer.org> <43684F8B.3000900@alphaque.com> In-Reply-To: <43684F8B.3000900@alphaque.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Scott Long Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 19:13:28 -0000 Dinesh Nair wrote: > > On 11/02/05 06:12 Julian Elischer said the following: > >> depends on what they are using it for.. >> if it's a WAN interface, then splimp. (INTR_TYPE_NET) >> >> if ppp or several other moduels are loaded, teh tty and net masks are >> combined anyhow.. > > > it's a quad-span E1/T1 line card which would be carrying voice PRIs. > the card interrupts every 1000 times a second. > I'd go for NET with data/voice convergence, it makes sense to me. From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 19:13:31 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1BE816A41F for ; Wed, 2 Nov 2005 19:13:31 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BCBC43D45 for ; Wed, 2 Nov 2005 19:13:31 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jA2JCnMD038139; Wed, 2 Nov 2005 12:12:49 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 02 Nov 2005 12:12:48 -0700 (MST) Message-Id: <20051102.121248.74711520.imp@bsdimp.com> To: dinesh@alphaque.com From: Warner Losh In-Reply-To: <43690424.1040904@alphaque.com> References: <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <43690424.1040904@alphaque.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 02 Nov 2005 12:12:49 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 19:13:31 -0000 From: Dinesh Nair Subject: Re: locking in a device driver Date: Thu, 03 Nov 2005 02:23:32 +0800 > > > On 10/28/05 10:52 M. Warner Losh said the following: > > libc_r will block all other threads in the application while an ioctl > > executes. libpthread and libthr won't. I've had several bugs at work > > so if the userland thread does an ioctl, and the the driver goes to > tsleep() when the ioctl is received, all other threads are also blocked > from executing, i.e wont be context switched to run ? Yes. if you tsleep with signals enabled, the periodic timer will go off, and you'll return early. This typically isn't what you want either. > is this behaviour only 4.x specific or is it also there in 5.x ? This behavior is libc_r specific. Any userland threadding library will have these issues. It is fundamental to how userland threadding works. If you use libc_r on 5, you'll see exactly this behavior. If you use libpthread or libthr, you won't. Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 19:16:30 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4F7B216A41F for ; Wed, 2 Nov 2005 19:16:30 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17CD943D5F for ; Wed, 2 Nov 2005 19:16:23 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.23.117]) ([10.251.23.117]) by a50.ironport.com with ESMTP; 02 Nov 2005 11:09:38 -0800 X-IronPort-Anti-Spam-Filtered: true Message-ID: <43690EED.10703@elischer.org> Date: Wed, 02 Nov 2005 11:09:33 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dinesh Nair References: <4360B8EE.4070605@alphaque.com> <4360DD7B.20900@samsco.org> <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <43690424.1040904@alphaque.com> In-Reply-To: <43690424.1040904@alphaque.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 19:16:30 -0000 Dinesh Nair wrote: > > > On 10/28/05 10:52 M. Warner Losh said the following: > >> libc_r will block all other threads in the application while an ioctl >> executes. libpthread and libthr won't. I've had several bugs at work > > > so if the userland thread does an ioctl, and the the driver goes to > tsleep() when the ioctl is received, all other threads are also > blocked from executing, i.e wont be context switched to run ? in 4.x and earlier. a tsleep saves your spl level but re-enables the interrupts (from memory) when you re-awaken you are given your spl level again.. All other threads are allowed to run. lower level code (the interupt executed part is not allowed to ever sleep) > > is this behaviour only 4.x specific or is it also there in 5.x ? From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 20:29:21 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83B5416A41F for ; Wed, 2 Nov 2005 20:29:21 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BC6443D48 for ; Wed, 2 Nov 2005 20:29:20 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jA2KQrA0038934; Wed, 2 Nov 2005 13:26:53 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 02 Nov 2005 13:27:09 -0700 (MST) Message-Id: <20051102.132709.101593999.imp@bsdimp.com> To: julian@elischer.org From: "M. Warner Losh" In-Reply-To: <43690EED.10703@elischer.org> References: <20051027.205250.55834228.imp@bsdimp.com> <43690424.1040904@alphaque.com> <43690EED.10703@elischer.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 02 Nov 2005 13:26:54 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 20:29:21 -0000 In message: <43690EED.10703@elischer.org> Julian Elischer writes: : Dinesh Nair wrote: : : > : > : > On 10/28/05 10:52 M. Warner Losh said the following: : > : >> libc_r will block all other threads in the application while an ioctl : >> executes. libpthread and libthr won't. I've had several bugs at work : > : > : > so if the userland thread does an ioctl, and the the driver goes to : > tsleep() when the ioctl is received, all other threads are also : > blocked from executing, i.e wont be context switched to run ? : : in 4.x and earlier. a tsleep saves your spl level but re-enables the : interrupts (from memory) : when you re-awaken you are given your spl level again.. That's true, but irrelevant. : All other threads are allowed to run. That is not true.[*] *NO* other threads in your process run. Period. None. Zero. Nada. Zilch. Your process is hung until the ioctl returns. That's the fundamental problem with userland thread packages such as libc_r. I've had to work around this issue many times, and I'm 100% certain that this is the case: sleep in an ioctl, and the entire process hangs until the ioctl returns. Warner [*] Other processes on the system will run, true. Interrutps will happen and run. But that's not what was being ask. From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 20:53:01 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5240316A41F for ; Wed, 2 Nov 2005 20:53:01 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id DAA1C43D49 for ; Wed, 2 Nov 2005 20:53:00 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.23.117]) ([10.251.23.117]) by a50.ironport.com with ESMTP; 02 Nov 2005 12:36:37 -0800 X-IronPort-Anti-Spam-Filtered: true Message-ID: <43692355.1080003@elischer.org> Date: Wed, 02 Nov 2005 12:36:37 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "M. Warner Losh" References: <20051027.205250.55834228.imp@bsdimp.com> <43690424.1040904@alphaque.com> <43690EED.10703@elischer.org> <20051102.132709.101593999.imp@bsdimp.com> In-Reply-To: <20051102.132709.101593999.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 20:53:01 -0000 M. Warner Losh wrote: >In message: <43690EED.10703@elischer.org> > Julian Elischer writes: >: Dinesh Nair wrote: >: >: > >: > >: > On 10/28/05 10:52 M. Warner Losh said the following: >: > >: >> libc_r will block all other threads in the application while an ioctl >: >> executes. libpthread and libthr won't. I've had several bugs at work >: > >: > >: > so if the userland thread does an ioctl, and the the driver goes to >: > tsleep() when the ioctl is received, all other threads are also >: > blocked from executing, i.e wont be context switched to run ? >: >: in 4.x and earlier. a tsleep saves your spl level but re-enables the >: interrupts (from memory) >: when you re-awaken you are given your spl level again.. > >That's true, but irrelevant. > > yes I misread the question. >: All other threads are allowed to run. > >That is not true.[*] *NO* other threads in your process run. Period. >None. Zero. Nada. Zilch. Your process is hung until the ioctl >returns. That's the fundamental problem with userland thread packages >such as libc_r. > > the answer is in the misread context and should have read, "while your process is doingthe tsleep other processes can run" I missed the bit about him talking about libc_r and was thinking about only in the kernel. >I've had to work around this issue many times, and I'm 100% certain >that this is the case: sleep in an ioctl, and the entire process hangs >until the ioctl returns. > >Warner > >[*] Other processes on the system will run, true. Interrutps will >happen and run. But that's not what was being ask. > > From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 20:55:46 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF9E216A41F for ; Wed, 2 Nov 2005 20:55:46 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id DF66A43D49 for ; Wed, 2 Nov 2005 20:55:45 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 82267 invoked by uid 0); 2 Nov 2005 20:55:43 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 2 Nov 2005 20:55:43 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.4/8.13.4) with ESMTP id jA2Kqfgx027694; Thu, 3 Nov 2005 04:52:41 +0800 (MYT) (envelope-from dinesh@alphaque.com) Message-ID: <43692719.90805@alphaque.com> Date: Thu, 03 Nov 2005 04:52:41 +0800 From: Dinesh Nair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8b) Gecko/20050915 MIME-Version: 1.0 To: Warner Losh References: <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <43690424.1040904@alphaque.com> <20051102.121248.74711520.imp@bsdimp.com> In-Reply-To: <20051102.121248.74711520.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 20:55:47 -0000 On 11/03/05 03:12 Warner Losh said the following: > Yes. if you tsleep with signals enabled, the periodic timer will go > off, and you'll return early. This typically isn't what you want > either. looks like i've got a lot of work to do, poring thru all the ioctls for the device and trying to use another method to wait instead of tsleep(). > works. If you use libc_r on 5, you'll see exactly this behavior. If > you use libpthread or libthr, you won't. i use gcc -pthread, so it's libc_r on 4.x. what does 'gcc -pthread' link to on 5.x ? -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+ From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 20:55:47 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A144816A41F for ; Wed, 2 Nov 2005 20:55:47 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id 5A53D43D4C for ; Wed, 2 Nov 2005 20:55:45 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 82270 invoked by uid 0); 2 Nov 2005 20:55:44 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 2 Nov 2005 20:55:44 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.4/8.13.4) with ESMTP id jA2KtAxm027698; Thu, 3 Nov 2005 04:55:10 +0800 (MYT) (envelope-from dinesh@alphaque.com) Message-ID: <436927AE.4030809@alphaque.com> Date: Thu, 03 Nov 2005 04:55:10 +0800 From: Dinesh Nair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8b) Gecko/20050915 MIME-Version: 1.0 To: "M. Warner Losh" References: <20051027.205250.55834228.imp@bsdimp.com> <43690424.1040904@alphaque.com> <43690EED.10703@elischer.org> <20051102.132709.101593999.imp@bsdimp.com> In-Reply-To: <20051102.132709.101593999.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, julian@elischer.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 20:55:47 -0000 On 11/03/05 04:27 M. Warner Losh said the following: > that this is the case: sleep in an ioctl, and the entire process hangs > until the ioctl returns. which is probably what's happening in my case. i've got 4 threads spun off, and one thread reads what the other writes and vice versa. after writing, a thread goes off into an ioctl or a read where a tsleep() is executed. this would block the reader thread as well if libc_r were to be used, as is what i am using. -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+ From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 21:16:00 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3FC1A16A41F for ; Wed, 2 Nov 2005 21:16:00 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9AC4E43D46 for ; Wed, 2 Nov 2005 21:15:59 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id jA2LFmx0073555; Wed, 2 Nov 2005 14:15:48 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <43692C86.4040509@samsco.org> Date: Wed, 02 Nov 2005 14:15:50 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dinesh Nair References: <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <43690424.1040904@alphaque.com> <20051102.121248.74711520.imp@bsdimp.com> <43692719.90805@alphaque.com> In-Reply-To: <43692719.90805@alphaque.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 21:16:00 -0000 Dinesh Nair wrote: > > > On 11/03/05 03:12 Warner Losh said the following: > >> Yes. if you tsleep with signals enabled, the periodic timer will go >> off, and you'll return early. This typically isn't what you want >> either. > > > looks like i've got a lot of work to do, poring thru all the ioctls for > the device and trying to use another method to wait instead of tsleep(). Note that a thread can block on select/poll in 4.x and still allow other threads to run. I used this to solve a very similar problem to your in a 4.x app of mine. I have the app thread wait on select() on the device node for the driver. When the driver gets to a state when an ioctl won't block (like data being available to read), then it does the appropriate magic in it's d_poll method. select in userland sees this, allows the thread to resume running, and the thread then calls ioctl. Of course you have to be careful that you don't have multiple threads competing for the same data or that the data won't somehow disappear before the ioctl call runs. But it does work. Look at the aac(4) driver for my example of this. The other option is to use rfork, aka 'linuxthreads' to similate threads via linked processes that share their address space. Each 'thread' is actually a process, and if one 'thread' blocks the rest are still allowed to run. It's more heavy-weight than real threads, but it does also work. > >> works. If you use libc_r on 5, you'll see exactly this behavior. If >> you use libpthread or libthr, you won't. > > > i use gcc -pthread, so it's libc_r on 4.x. what does 'gcc -pthread' link > to on 5.x ? > lpthread, I believe. Scott From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 21:19:32 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06B7D16A41F for ; Wed, 2 Nov 2005 21:19:32 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C94643D45 for ; Wed, 2 Nov 2005 21:19:31 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jA2LHNVf039347; Wed, 2 Nov 2005 14:17:23 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 02 Nov 2005 14:17:38 -0700 (MST) Message-Id: <20051102.141738.43008707.imp@bsdimp.com> To: dinesh@alphaque.com From: "M. Warner Losh" In-Reply-To: <43692719.90805@alphaque.com> References: <43690424.1040904@alphaque.com> <20051102.121248.74711520.imp@bsdimp.com> <43692719.90805@alphaque.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 02 Nov 2005 14:17:23 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 21:19:32 -0000 In message: <43692719.90805@alphaque.com> Dinesh Nair writes: : : : On 11/03/05 03:12 Warner Losh said the following: : > Yes. if you tsleep with signals enabled, the periodic timer will go : > off, and you'll return early. This typically isn't what you want : > either. : : looks like i've got a lot of work to do, poring thru all the ioctls for the : device and trying to use another method to wait instead of tsleep(). If you have to run on 4.x, that may be the case. The other way around this is to create a helper program that gets the ioctl request over a pipe or socket, does the call to the kernel and then returns the results. Not idea, I'll grant, but it is an alternative worth thinking about if the number of ioctls is large and the impact of conversion to read/write channels is big. : > works. If you use libc_r on 5, you'll see exactly this behavior. If : > you use libpthread or libthr, you won't. : : i use gcc -pthread, so it's libc_r on 4.x. what does 'gcc -pthread' link to : on 5.x ? libpthread by default, others if you use libmap.conf Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 21:44:41 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C582C16A41F for ; Wed, 2 Nov 2005 21:44:41 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id B3B6043D49 for ; Wed, 2 Nov 2005 21:44:40 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 82742 invoked by uid 0); 2 Nov 2005 21:44:38 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 2 Nov 2005 21:44:38 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.4/8.13.4) with ESMTP id jA2LfUxi027895; Thu, 3 Nov 2005 05:41:30 +0800 (MYT) (envelope-from dinesh@alphaque.com) Message-ID: <4369328A.7080306@alphaque.com> Date: Thu, 03 Nov 2005 05:41:30 +0800 From: Dinesh Nair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8b) Gecko/20050915 MIME-Version: 1.0 To: "M. Warner Losh" References: <43690424.1040904@alphaque.com> <20051102.121248.74711520.imp@bsdimp.com> <43692719.90805@alphaque.com> <20051102.141738.43008707.imp@bsdimp.com> In-Reply-To: <20051102.141738.43008707.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 21:44:41 -0000 On 11/03/05 05:17 M. Warner Losh said the following: > this is to create a helper program that gets the ioctl request over a > pipe or socket, does the call to the kernel and then returns the > results. Not idea, I'll grant, but it is an alternative worth no, that wont work. the userland app is asterisk, a well known open source IP PBX, and i dont think keeping a different set of patches for asterisk is going to work too well. > libpthread by default, others if you use libmap.conf which explains why it works on 5.x, but not on 4.x. -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+ From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 21:44:42 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D1F3D16A421 for ; Wed, 2 Nov 2005 21:44:42 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id 7990243D4C for ; Wed, 2 Nov 2005 21:44:41 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 82745 invoked by uid 0); 2 Nov 2005 21:44:40 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 2 Nov 2005 21:44:40 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.4/8.13.4) with ESMTP id jA2LiNXK027896; Thu, 3 Nov 2005 05:44:24 +0800 (MYT) (envelope-from dinesh@alphaque.com) Message-ID: <43693337.3020304@alphaque.com> Date: Thu, 03 Nov 2005 05:44:23 +0800 From: Dinesh Nair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8b) Gecko/20050915 MIME-Version: 1.0 To: Scott Long References: <4361044B.50807@alphaque.com> <20051027.205250.55834228.imp@bsdimp.com> <43690424.1040904@alphaque.com> <20051102.121248.74711520.imp@bsdimp.com> <43692719.90805@alphaque.com> <43692C86.4040509@samsco.org> In-Reply-To: <43692C86.4040509@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 21:44:43 -0000 On 11/03/05 05:15 Scott Long said the following: > before the ioctl call runs. But it does work. Look at the aac(4) > driver for my example of this. i will, it sounds like a good solution. > The other option is to use rfork, aka 'linuxthreads' to similate threads i could try with linuxthreads, but some calls which are not threadsafe may be made by the userland app. -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+ From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 21:58:32 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0859D16A41F for ; Wed, 2 Nov 2005 21:58:32 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 92AD143D45 for ; Wed, 2 Nov 2005 21:58:31 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jA2LwO0D039635; Wed, 2 Nov 2005 14:58:24 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 02 Nov 2005 14:58:39 -0700 (MST) Message-Id: <20051102.145839.69381782.imp@bsdimp.com> To: scottl@samsco.org From: "M. Warner Losh" In-Reply-To: <43692C86.4040509@samsco.org> References: <20051102.121248.74711520.imp@bsdimp.com> <43692719.90805@alphaque.com> <43692C86.4040509@samsco.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Wed, 02 Nov 2005 14:58:24 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 21:58:32 -0000 In message: <43692C86.4040509@samsco.org> Scott Long writes: : Dinesh Nair wrote: : > : > : > On 11/03/05 03:12 Warner Losh said the following: : > : >> Yes. if you tsleep with signals enabled, the periodic timer will go : >> off, and you'll return early. This typically isn't what you want : >> either. : > : > : > looks like i've got a lot of work to do, poring thru all the ioctls for : > the device and trying to use another method to wait instead of tsleep(). : : Note that a thread can block on select/poll in 4.x and still allow other : threads to run. I used this to solve a very similar problem to your in : a 4.x app of mine. I have the app thread wait on select() on the device : node for the driver. When the driver gets to a state when an ioctl : won't block (like data being available to read), then it does the : appropriate magic in it's d_poll method. select in userland sees this, : allows the thread to resume running, and the thread then calls ioctl. : Of course you have to be careful that you don't have multiple threads : competing for the same data or that the data won't somehow disappear : before the ioctl call runs. But it does work. Look at the aac(4) : driver for my example of this. Yes. If you have the ability to know that an ioctl won't block before you call it, that would work too. This method is a little trickier, like you say, but can be made to work. I've also seen ioctls that were split into a 'foo_start' and 'foo_finish' pair (someimtes with a non-blocking foo_status) to get around this restriction... While ioctls generally cannot block, one can use these sorts of techniques to avoid blocking. I'm glad that kernel threads are here so we don't have to keep propigating these hacks... Warner From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 00:12:42 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA90C16A41F for ; Thu, 3 Nov 2005 00:12:41 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FAC443D46 for ; Thu, 3 Nov 2005 00:12:39 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id jA30Cdvj022173 for ; Wed, 2 Nov 2005 16:12:39 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id jA30CdmL022171 for hackers@freebsd.org; Wed, 2 Nov 2005 16:12:39 -0800 Date: Wed, 2 Nov 2005 16:12:39 -0800 From: Brooks Davis To: hackers@freebsd.org Message-ID: <20051103001239.GA19590@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KsGdsel6WgEHnImy" Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: Subject: fix for dhclient+aliases X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 00:12:42 -0000 --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I've got a proposed fix for dhclient interactions with IPv4 aliases. It turns out that my speculation that it was driver issues was wrong and that dhclient with reacting to the aliases themselves. I suspect there may be issues with some drivers, but that's not the main problem. This patch adds a flag which causes dhclient to ignore address changes that it didn't cause. Does this seem like an acceptable solution? I'd probably add an rc.conf variable similar to background_dhclient. -- Brooks ----- Forwarded message from Brooks Davis ----- From: Brooks Davis Date: Wed, 2 Nov 2005 23:54:08 GMT To: Perforce Change Reviews Subject: PERFORCE change 86258 for review http://perforce.freebsd.org/chv.cgi?CH=3D86258 Change 86258 by brooks@brooks_pagefault on 2005/11/02 23:53:14 Add a -a option to allow IPv4 aliases to be set on an interface. Affected files ... =2E. //depot/user/brooks/cleanup/sbin/dhclient/dhclient.8#6 edit =2E. //depot/user/brooks/cleanup/sbin/dhclient/dhclient.c#8 edit Differences ... =3D=3D=3D=3D //depot/user/brooks/cleanup/sbin/dhclient/dhclient.8#6 (text+k= o) =3D=3D=3D=3D @@ -46,7 +46,7 @@ .Nd "Dynamic Host Configuration Protocol (DHCP) client" .Sh SYNOPSIS .Nm -.Op Fl dqu +.Op Fl abdqu .Op Fl c Ar file .Op Fl l Ar file .Ar interface @@ -63,6 +63,11 @@ .Pp The options are as follows: .Bl -tag -width ".Fl c Ar file" +.It Fl a +Allows IPv4 aliases to be added to the interface. +Normally, +.Nm +exits if IPv4 addresses are added to or deleted from the interface. .It Fl b Forces .Nm =3D=3D=3D=3D //depot/user/brooks/cleanup/sbin/dhclient/dhclient.c#8 (text+k= o) =3D=3D=3D=3D @@ -103,6 +103,7 @@ =20 #define TIME_MAX 2147483647 =20 +int allow_aliases; int log_priority; int no_daemon; int unknown_ok =3D 1; @@ -203,6 +204,8 @@ ifam =3D (struct ifa_msghdr *)rtm; if (ifam->ifam_index !=3D ifi->index) break; + if (allow_aliases) + break; if (findproto((char *)(ifam + 1), ifam->ifam_addrs) !=3D AF_INET) break; if (ifi =3D=3D NULL) @@ -227,12 +230,30 @@ goto die; case RTM_DELADDR: ifam =3D (struct ifa_msghdr *)rtm; + if (ifam->ifam_index !=3D ifi->index) break; if (findproto((char *)(ifam + 1), ifam->ifam_addrs) !=3D AF_INET) break; if (scripttime =3D=3D 0 || t < scripttime + 10) break; + + sa =3D get_ifa((char *)(ifam + 1), ifam->ifam_addrs); + if (sa =3D=3D NULL) + goto die; + + if ((a.len =3D sizeof(struct in_addr)) > sizeof(a.iabuf)) + error("king bula sez: len mismatch"); + memcpy(a.iabuf, &((struct sockaddr_in *)sa)->sin_addr, a.len); + if (addr_eq(a, defaddr)) + break; + + for (l =3D ifi->client->active; l !=3D NULL; l =3D l->next) + if (addr_eq(a, l->address)) + break; + + if (l =3D=3D NULL) /* deleted addr is not the one we set */ + break; goto die; case RTM_IFINFO: ifm =3D (struct if_msghdr *)rtm; @@ -301,8 +322,11 @@ openlog(__progname, LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY); setlogmask(LOG_UPTO(LOG_INFO)); =20 - while ((ch =3D getopt(argc, argv, "bc:dl:nqu")) !=3D -1) + while ((ch =3D getopt(argc, argv, "abc:dl:nqu")) !=3D -1) switch (ch) { + case 'a': + allow_aliases =3D 1; + break; case 'b': immediate_daemon =3D 1; break; ----- End forwarded message ----- --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --KsGdsel6WgEHnImy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDaVX2XY6L6fI4GtQRAmwqAKCIvL4e6emYzb04RyoapnRa7Y3eHwCgvGVu EpcR+dglWQMBvYE2QFBF3D4= =yzbw -----END PGP SIGNATURE----- --KsGdsel6WgEHnImy-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 02:39:37 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A269C16A41F for ; Thu, 3 Nov 2005 02:39:37 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web35704.mail.mud.yahoo.com (web35704.mail.mud.yahoo.com [66.163.179.158]) by mx1.FreeBSD.org (Postfix) with SMTP id EB74D43D45 for ; Thu, 3 Nov 2005 02:39:36 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 63211 invoked by uid 60001); 3 Nov 2005 02:39:36 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=cGkSehjBbHmvKq0zEWd0onPWFNbm18yA5y8j5G6/lWdgL5TCgsPiSx8+QvVuXYwUmNzR3j97aANAGCePL8f2C/8Rz62PW9Wcxlu2J70LsjGj5oVfELBnwLtNoq9pwV57i9rJ2CqLr+s93ormkuhlAc46A3l9ejH+ZYQtwfGhDLo= ; Message-ID: <20051103023936.63209.qmail@web35704.mail.mud.yahoo.com> Received: from [202.79.62.27] by web35704.mail.mud.yahoo.com via HTTP; Wed, 02 Nov 2005 18:39:36 PST Date: Wed, 2 Nov 2005 18:39:36 -0800 (PST) From: kamal kc To: freebsd MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd Subject: allocating 14KB memory per packet compression/decompression results in vm_fault X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 02:39:37 -0000 dear everybody, i am trying to compress/decompress ip packets. for this i have implemented the adaptive lzw compression. i put the code in the ip_output.c and do my compression/decompression just before the if_output() function call so that i won't interfere with the ip processing of the kernel. for my compression/decompression i use string tables and temporary buffers which take about 14KB of memory per packet. I used malloc() to allocate the memory space. i made the call as below: malloc(4096,M_TEMP, M_NOWAIT); I call the malloc 3 to 4 times with 4096 bytes. and release it with call to free() I also sometimes allocate an mbuf during compression/decompression. i use the macro-- struct mbuf *m; MGET(m, M_DONTWAIT,MT_DATA); MCLGET(m,M_DONTWAIT); These are the memory operations i perform in my code. Now when i run the modified kernel the behaviour is unpredictable. The compression/decompression works fine with expected results. But soon the kernel would crash with vm_fault: message. -Is the memory requirement of 14KB per packet too high to be allocated by the kernel ?? - Are there any other techniqures to allocate memory in kernel without producing vm_faults ?? - Am I not following the correct procedures to allocate and deallocate memory in kernel space ?? - Or is the problem elsewhere ?? I am really confused and don't know what to do as this is the only thing that is holding me back to implement the compression/decompression module. I know you guys can provide some help/info. Thanks kamal --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 04:07:11 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81FAE16A41F for ; Thu, 3 Nov 2005 04:07:11 +0000 (GMT) (envelope-from mistry.7@osu.edu) Received: from mail.united-ware.com (am-productions.biz [69.61.164.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09F9743D45 for ; Thu, 3 Nov 2005 04:07:10 +0000 (GMT) (envelope-from mistry.7@osu.edu) Received: from bigguy.am-productions.biz (am-productions.biz [69.61.164.22]) (authenticated bits=0) by mail.united-ware.com (8.13.4/8.13.4) with ESMTP id jA348lgS062426 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Wed, 2 Nov 2005 23:08:52 -0500 (EST) (envelope-from mistry.7@osu.edu) From: Anish Mistry To: freebsd-hackers@freebsd.org Date: Wed, 2 Nov 2005 23:08:53 -0500 User-Agent: KMail/1.8.2 References: <20051103001239.GA19590@odin.ac.hmc.edu> In-Reply-To: <20051103001239.GA19590@odin.ac.hmc.edu> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5159477.q660nsYPiL"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200511022309.01615.mistry.7@osu.edu> X-Spam-Status: No, score=-7.4 required=5.0 tests=ALL_TRUSTED,BAYES_00, MYFREEBSD2 autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on mail.united-ware.com X-Virus-Scanned: ClamAV 0.87/1160/Wed Nov 2 11:26:43 2005 on mail.united-ware.com X-Virus-Status: Clean Cc: Subject: Re: fix for dhclient+aliases X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 04:07:11 -0000 --nextPart5159477.q660nsYPiL Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 02 November 2005 07:12 pm, Brooks Davis wrote: > I've got a proposed fix for dhclient interactions with IPv4 > aliases. It turns out that my speculation that it was driver > issues was wrong and that dhclient with reacting to the aliases > themselves. I suspect there may be issues with some drivers, but > that's not the main problem. > > This patch adds a flag which causes dhclient to ignore address > changes that it didn't cause. Does this seem like an acceptable > solution? I'd probably add an rc.conf variable similar to > background_dhclient. > It works on my laptop's rl running CURRENT :). If deemed acceptable,=20 would it be possible to get this into RELENG_6_0. Thank you for working on this issue. =2D-=20 Anish Mistry --nextPart5159477.q660nsYPiL Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDaY1dxqA5ziudZT0RAjZ/AJ9M6THYqKfjb6DT2+2T/emc0o4q5QCdGM88 zwNhqR3BrkNh0OqgkDRusmk= =uAMh -----END PGP SIGNATURE----- --nextPart5159477.q660nsYPiL-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 04:33:48 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6CEB316A41F for ; Thu, 3 Nov 2005 04:33:48 +0000 (GMT) (envelope-from jflemer@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0265143D45 for ; Thu, 3 Nov 2005 04:33:47 +0000 (GMT) (envelope-from jflemer@gmail.com) Received: by wproxy.gmail.com with SMTP id 70so144695wra for ; Wed, 02 Nov 2005 20:33:47 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EAGlp3pEnR/NoF+mwKp+zgIC5TIsK3SSCYJaM+kcqQTWrWWKwnlBtJfVNuF5dSg/X9MRIv8+SGdWXLcIr+odRCas+gS8x7Kc/eHnMjOYkso6s5kbUgpRtRZrp1s7V4jZlVYBVvFunpkD5L4DejmRpAVEoecZsuipYUKZO6roFMo= Received: by 10.64.185.7 with SMTP id i7mr253120qbf; Wed, 02 Nov 2005 19:34:12 -0800 (PST) Received: by 10.64.131.12 with HTTP; Wed, 2 Nov 2005 19:34:12 -0800 (PST) Message-ID: Date: Wed, 2 Nov 2005 20:34:12 -0700 From: James Flemer To: Brooks Davis In-Reply-To: <20051103001239.GA19590@odin.ac.hmc.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20051103001239.GA19590@odin.ac.hmc.edu> Cc: hackers@freebsd.org Subject: Re: fix for dhclient+aliases X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 04:33:48 -0000 Speaking of dhclient and aliases. Has anyone sucessfully used the alias { ... } syntax of dhclient.conf after switching dhclients? I used to use the following in my dhclient.conf, but had to comment it out when the OpenBSD dhclient was imported. |alias { | interface "sis1"; | fixed-address 192.168.100.2; | option subnet-mask 255.255.255.0; |} I hope to check out this patch shortly. Thanks. -James On 11/2/05, Brooks Davis wrote: > I've got a proposed fix for dhclient interactions with IPv4 aliases. It > turns out that my speculation that it was driver issues was wrong and > that dhclient with reacting to the aliases themselves. I suspect there > may be issues with some drivers, but that's not the main problem. > > This patch adds a flag which causes dhclient to ignore address changes > that it didn't cause. Does this seem like an acceptable solution? I'd > probably add an rc.conf variable similar to background_dhclient. > > -- Brooks From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 04:46:14 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 86BAB16A41F for ; Thu, 3 Nov 2005 04:46:14 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0914E43D48 for ; Thu, 3 Nov 2005 04:46:13 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id jA34kDx2032666; Wed, 2 Nov 2005 20:46:13 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id jA34kDEe032665; Wed, 2 Nov 2005 20:46:13 -0800 Date: Wed, 2 Nov 2005 20:46:13 -0800 From: Brooks Davis To: Anish Mistry Message-ID: <20051103044613.GA32496@odin.ac.hmc.edu> References: <20051103001239.GA19590@odin.ac.hmc.edu> <200511022309.01615.mistry.7@osu.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline In-Reply-To: <200511022309.01615.mistry.7@osu.edu> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-hackers@freebsd.org Subject: Re: fix for dhclient+aliases X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 04:46:14 -0000 --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 02, 2005 at 11:08:53PM -0500, Anish Mistry wrote: > On Wednesday 02 November 2005 07:12 pm, Brooks Davis wrote: > > I've got a proposed fix for dhclient interactions with IPv4 > > aliases. It turns out that my speculation that it was driver > > issues was wrong and that dhclient with reacting to the aliases > > themselves. I suspect there may be issues with some drivers, but > > that's not the main problem. > > > > This patch adds a flag which causes dhclient to ignore address > > changes that it didn't cause. Does this seem like an acceptable > > solution? I'd probably add an rc.conf variable similar to > > background_dhclient. > > > It works on my laptop's rl running CURRENT :). If deemed acceptable,=20 > would it be possible to get this into RELENG_6_0. 6.0-RELEASE has been tagged so no. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --uAKRQypu60I7Lcqm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDaZYUXY6L6fI4GtQRAoUXAJ0ekCYII9NrpgjctDZIHJik4VKzzwCeJYvF uQ6kyVOcunFZZiWS7ZKIGG0= =VUy5 -----END PGP SIGNATURE----- --uAKRQypu60I7Lcqm-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 12:40:36 2005 Return-Path: X-Original-To: hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCF8C16A41F; Thu, 3 Nov 2005 12:40:36 +0000 (GMT) (envelope-from ceri@submonkey.net) Received: from shrike.submonkey.net (cpc2-cdif2-3-1-cust208.cdif.cable.ntl.com [82.31.78.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5503443D45; Thu, 3 Nov 2005 12:40:34 +0000 (GMT) (envelope-from ceri@submonkey.net) Received: from ceri by shrike.submonkey.net with local (Exim 4.54 (FreeBSD)) id 1EXeOJ-000PY8-N1; Thu, 03 Nov 2005 12:40:27 +0000 Date: Thu, 3 Nov 2005 12:40:27 +0000 From: Ceri Davies To: Brooks Davis , bushman@rsu.ru Message-ID: <20051103124027.GE29387@submonkey.net> Mail-Followup-To: Ceri Davies , Brooks Davis , bushman@rsu.ru, hackers@FreeBSD.org, current@FreeBSD.org References: <20051102001507.GB14638@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rE45P3aZNSuYx5ND" Content-Disposition: inline In-Reply-To: <20051102001507.GB14638@odin.ac.hmc.edu> X-PGP: finger ceri@FreeBSD.org User-Agent: Mutt/1.5.11 Sender: Ceri Davies Cc: hackers@FreeBSD.org, current@FreeBSD.org Subject: Re: nsswitch reviewer wanted X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 12:40:37 -0000 --rE45P3aZNSuYx5ND Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In the list that shall not be cc'd to, on Tue, Nov 01, 2005 at 04:15:07PM -0800, Brooks Davis wrote: > Michael Bushkov disk some interesting work for use under the Google > Summer of Code and I'd like to see the appropriate parts committed. > Unfortunately, this isn't an area I have great depths of knowledge so > I'm hoping someone one else is interested in working on this. I realise that you weren't asking for comments, but I took a quick look at http://www.rsu.ru/~bushman/nsswitch_cached/nss_cached.patch and have some. I'll send this to the original lists too. o There aren't nearly enough comments. Granted, I'm not a C aficionado, but it's ~ line 3200 of that patch before we come to a new non-trivial comment, and there aren't many after that. o cached/config.c has magic numbers in create_def_configuration_entry(), which probably belong as #defines in config.h instead. I'm not sure what style(9) says about that though, so am happy to be ignored. o There is a single mention of a ssh_hostkeys cache in include/nsswitch.h, and no code to implement it. o On line 15448, there is a whitespace nit. Also, in this area, are we sure that there is no benefit in continuing to key by euid/egid if perform_actual_lookup is enabled; can we send the euid/egid with the lookup request? o A user should be able to invalidate one of their caches (e.g., "cached -i hosts" to flush their hosts cache). Root should be able to do it for all users with a single command (e.g., "cached -I hosts" to flush all hosts caches). o The manual for cached.conf is unclear over whether it's OK to name an "unknown" cache in cached.conf. o The location of cached.conf is defaulted to /usr/local/etc in cached/cached.c and should be changed on commit. Ceri --=20 Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. -- Einstein (attrib.) --rE45P3aZNSuYx5ND Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDagU7ocfcwTS3JF8RAqJkAKCmjV5v4UrUzWyCsJ9i/8u+zXZGAgCdHgCJ 0KhNqHhqRKr6oXxXBa/qtFE= =tJO2 -----END PGP SIGNATURE----- --rE45P3aZNSuYx5ND-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 13:06:32 2005 Return-Path: X-Original-To: hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B125C16A41F; Thu, 3 Nov 2005 13:06:32 +0000 (GMT) (envelope-from bushman@rsu.ru) Received: from mail.r61.net (mail.r61.net [195.208.245.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5EAA743D5D; Thu, 3 Nov 2005 13:06:28 +0000 (GMT) (envelope-from bushman@rsu.ru) Received: from [195.208.252.201] (celsius.cc.rsu.ru [195.208.252.201]) by mail.r61.net (8.13.4/8.13.4) with ESMTP id jA3D6QNu067009; Thu, 3 Nov 2005 16:06:26 +0300 (MSK) (envelope-from bushman@rsu.ru) Message-ID: <436A0C73.3010405@rsu.ru> Date: Thu, 03 Nov 2005 16:11:15 +0300 From: Michael Bushkov User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051018) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ceri Davies References: <20051102001507.GB14638@odin.ac.hmc.edu> <20051103124027.GE29387@submonkey.net> In-Reply-To: <20051103124027.GE29387@submonkey.net> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.86.2, clamav-milter version 0.86 on asterix.r61.net X-Virus-Status: Clean Cc: hackers@FreeBSD.org, current@FreeBSD.org Subject: Re: nsswitch reviewer wanted X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 13:06:32 -0000 Hello, Ceri! Ceri Davies wrote: >I realise that you weren't asking for comments, but I took a quick look >at http://www.rsu.ru/~bushman/nsswitch_cached/nss_cached.patch and have >some. I'll send this to the original lists too. > > Thanks for comments! I need them much. >o There aren't nearly enough comments. Granted, I'm not a C aficionado, > but it's ~ line 3200 of that patch before we come to a new non-trivial > comment, and there aren't many after that. > > Ok - I'll comment the code. >o cached/config.c has magic numbers in create_def_configuration_entry(), > which probably belong as #defines in config.h instead. I'm not sure > what style(9) says about that though, so am happy to be ignored. > > Yes, that's right - I guess, the most correct way is to move them to config.h >o There is a single mention of a ssh_hostkeys cache in > include/nsswitch.h, and no code to implement it. > > I've implemented the patch for OpenSSH, which allows it to use nsswitch for the hostkeys. It should be committed by the OpenSSH team. That's why the ssh_hostkeys cache is mentioned in the nsswitch.h. This line can easialy be removed - as it doesn't affect anything. >o On line 15448, there is a whitespace nit. Also, in this area, are we > sure that there is no benefit in continuing to key by euid/egid if > perform_actual_lookup is enabled; can we send the euid/egid with the > lookup request? > > You are talking about passing euid/egid to the underlying nsswitch modules, right? This will require significant changes in these modules, and, as far as I'm converned, won't gain us any benefits. I can't see any benefit of keying by euid/egud when the 'perform_actual_lookups' mode is enabled. By ignoring them, we make the cache common for all users, and no user can poison it - because all requests are made solely by ourselves. If we won't ignore the euid/egid, then for every user, we'll have to make similar requests, this will also affect the cache size. When perform_actual_lookups mode is off, cache should be certainly separated by eud/egid for (basically) security reasons. >o A user should be able to invalidate one of their caches (e.g., > "cached -i hosts" to flush their hosts cache). Root should be able > to do it for all users with a single command (e.g., "cached -I hosts" > to flush all hosts caches). > > > Ok - I'll do that. >o The manual for cached.conf is unclear over whether it's OK to name > an "unknown" cache in cached.conf. > > > I'll corect this. In fact, it's ok to do that. >o The location of cached.conf is defaulted to /usr/local/etc in > cached/cached.c and should be changed on commit. > > > Will be corrected. >Ceri > > -- Michael From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 13:26:15 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BDE6516A420 for ; Thu, 3 Nov 2005 13:26:15 +0000 (GMT) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from comsys.ntu-kpi.kiev.ua (comsys.ntu-kpi.kiev.ua [195.245.194.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8606343D8D for ; Thu, 3 Nov 2005 13:25:50 +0000 (GMT) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from pm513-1.comsys.ntu-kpi.kiev.ua (pm513-1.comsys.ntu-kpi.kiev.ua [10.18.52.101]) (authenticated bits=0) by comsys.ntu-kpi.kiev.ua (8.12.10/8.12.10) with ESMTP id jA3DYecp082273 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 3 Nov 2005 15:34:43 +0200 (EET) Received: by pm513-1.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1001) id 7F88A5C029; Thu, 3 Nov 2005 15:25:00 +0200 (EET) Date: Thu, 3 Nov 2005 15:25:00 +0200 From: Andrey Simonenko To: Dinesh Nair Message-ID: <20051103132500.GA73085@pm513-1.comsys.ntu-kpi.kiev.ua> References: <20051027.205250.55834228.imp@bsdimp.com> <43690424.1040904@alphaque.com> <43690EED.10703@elischer.org> <20051102.132709.101593999.imp@bsdimp.com> <436927AE.4030809@alphaque.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <436927AE.4030809@alphaque.com> User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on comsys.ntu-kpi.kiev.ua X-Virus-Scanned: ClamAV 0.82/1158/Wed Nov 2 15:29:56 2005 on comsys.ntu-kpi.kiev.ua X-Virus-Status: Clean Cc: freebsd-hackers@freebsd.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 13:26:15 -0000 On Thu, Nov 03, 2005 at 04:55:10AM +0800, Dinesh Nair wrote: > > On 11/03/05 04:27 M. Warner Losh said the following: > >that this is the case: sleep in an ioctl, and the entire process hangs > >until the ioctl returns. > > which is probably what's happening in my case. i've got 4 threads spun off, > and one thread reads what the other writes and vice versa. after writing, a > thread goes off into an ioctl or a read where a tsleep() is executed. this > would block the reader thread as well if libc_r were to be used, as is what > i am using. Having read all messages (really interesting) in this thread, I decided to add some words. Multi threaded application which uses user level thread library always will have problems if used user level thread library is not aware about some function which can block in the kernel. According to my understanding... Blocking operations on file descriptors internally in user level thread library are converted to non-blocking and library periodically checks for events on such descriptors (at least before switching to another userland thread, somewhere in signal handler (user level scheduler), which is used in the same style as hardware clock). And application does not need to do anything to convert all blocking syscalls to non-blocking versions. Since implementation of ioctl() (own device's part), is unknown to the library (really it is unknown also for the kernel) it is impossible to say from the userland if this system call is blocking or not. As I remember, SysV semaphores had the same problem in <4.x (but it seems that it is possible to fix this problem, again nonblocking variant with periodic checks). The same problem with custom syscalls (they like custom ioctls). From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 12:57:43 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 57A2C16A41F for ; Thu, 3 Nov 2005 12:57:43 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1287243D45 for ; Thu, 3 Nov 2005 12:57:43 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms061.mailsrvcs.net ([192.168.1.2]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IPD00FRQQO6VMC1@vms046.mailsrvcs.net> for freebsd-hackers@freebsd.org; Thu, 03 Nov 2005 06:57:42 -0600 (CST) Date: Thu, 03 Nov 2005 06:57:42 -0600 (CST) From: Sergey Babkin To: "M. Warner Losh" , scottl@samsco.org Message-id: <20669850.1131022662391.JavaMail.root@vms061.mailsrvcs.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailman-Approved-At: Thu, 03 Nov 2005 13:37:01 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: babkin@users.sf.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 12:57:43 -0000 >From: "M. Warner Losh" > Scott Long writes: >: Dinesh Nair wrote: >: > >: > >: > On 11/03/05 03:12 Warner Losh said the following: >: > >: >> Yes. if you tsleep with signals enabled, the periodic timer will go >: >> off, and you'll return early. This typically isn't what you want >: >> either. >: > >: > >: > looks like i've got a lot of work to do, poring thru all the ioctls for >: > the device and trying to use another method to wait instead of tsleep(). >: >: Note that a thread can block on select/poll in 4.x and still allow other >: threads to run. I used this to solve a very similar problem to your in >: a 4.x app of mine. I have the app thread wait on select() on the device >: node for the driver. When the driver gets to a state when an ioctl >: won't block (like data being available to read), then it does the >: appropriate magic in it's d_poll method. select in userland sees this, >: allows the thread to resume running, and the thread then calls ioctl. >: Of course you have to be careful that you don't have multiple threads >: competing for the same data or that the data won't somehow disappear >: before the ioctl call runs. But it does work. Look at the aac(4) >: driver for my example of this. > >Yes. If you have the ability to know that an ioctl won't block before >you call it, that would work too. This method is a little trickier, >like you say, but can be made to work. I've also seen ioctls that Maybe it can be fixed in the kernel without too much trouble. Basically, the trick would be to start another kernel thread when the first one blocks. Then the original one can be left executing the ioctl while the new one continues the work. Then of cours ethere should be some notification mechanism that the ioctl has completed. The new thread can start in a signal handler, kind of like what UnixWare does (and I believe Solaris too): they have an M:N model where M user threads are scheduled on N kernel threads. When all the kernel threads of a process get blocked, a signal is sent thread which handler then starts a new kernel thread if there are any runnable user threads. Hm, suppose we have a per-process property "is threaded" that would be set by the threads library. Any blocking calls (tsleep() and such) would check it, and if it's set than immediately post this "all threads are blocked" signal. Then the library can catch it and handle in some useful way, maybe doing an rfork() or just running another user thread and returning to this one later. -SB From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 13:55:49 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 97B0216A41F for ; Thu, 3 Nov 2005 13:55:49 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2596F43D49 for ; Thu, 3 Nov 2005 13:55:48 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (thor.farley.org [IPv6:2001:470:1f01:290:1::5]) by mail.farley.org (8.13.1/8.13.1) with ESMTP id jA3E1O1v009743 for ; Thu, 3 Nov 2005 08:01:25 -0600 (CST) (envelope-from sean-freebsd@farley.org) Date: Thu, 3 Nov 2005 07:57:23 -0600 (CST) From: =?ISO-8859-1?Q?Se=E1n_C=2E_Farley?= To: freebsd-hackers@freebsd.org In-Reply-To: <20051101110151.D67802@underfoot.windborne.net> Message-ID: <20051103074840.T95526@thor.farley.org> References: <20051101164904.Y92812@geri.cc.fer.hr> <20051101110151.D67802@underfoot.windborne.net> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1491609002-1131026243=:95526" Subject: Re: [FreeBSD-Announce] New Logo X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 13:55:49 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1491609002-1131026243=:95526 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Tue, 1 Nov 2005, Branson Matheson wrote: > On Tue, Nov 01, 2005 at 04:50:43PM +0100,Ivan Voras did mutter: >>> Man, I _so_ hope this is a joke... >> >> Agreed. The "logo" looks like some anime rendering of a sea mine, and >> the font really doesn't agree with it. > > Since there has been a plethora of negative.. i thought i'd add my > 2cents.. I think the new logo is pretty cool. Modern and artsy. The > font is a bit to curved for my tastes .. but it does hilight the > circular direction of the font ..etc. > > Definately keeps with the roots of our Daemon .. while showing we can > evolve and be more modern. Kudos to the artist and the selecton crew. I also like it. OTOH, it reminds me a little of the Saturday morning (or maybe everyday?) block of kids shows mascot (JETIX[1]). Some JETIX images without the feet: [2] and [3]. When looking at the bottom of the winning example page[4], I like the look of the two overlapping images in the bottom-left. It almost appears that the bottom layer logo has grown a tail. Se=E1n 1. http://www.prof1c.ru/tv/images/ch/Jetix.JPG 2. http://www.thecharactershop.co.uk/portfolio/images/jetix-1.jpg 3. http://www.thecharactershop.co.uk/portfolio/images/jetix-4.jpg 4. http://logo-contest.freebsd.org/result/640-1.png --=20 sean-freebsd@farley.org --0-1491609002-1131026243=:95526-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 14:02:30 2005 Return-Path: X-Original-To: hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E15C516A41F; Thu, 3 Nov 2005 14:02:29 +0000 (GMT) (envelope-from ceri@submonkey.net) Received: from shrike.submonkey.net (cpc2-cdif2-3-1-cust208.cdif.cable.ntl.com [82.31.78.208]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B0B443D5C; Thu, 3 Nov 2005 14:02:25 +0000 (GMT) (envelope-from ceri@submonkey.net) Received: from ceri by shrike.submonkey.net with local (Exim 4.54 (FreeBSD)) id 1EXffZ-00082v-7Y; Thu, 03 Nov 2005 14:02:21 +0000 Date: Thu, 3 Nov 2005 14:02:21 +0000 From: Ceri Davies To: Michael Bushkov Message-ID: <20051103140221.GF29387@submonkey.net> Mail-Followup-To: Ceri Davies , Michael Bushkov , Brooks Davis , hackers@FreeBSD.org, current@FreeBSD.org References: <20051102001507.GB14638@odin.ac.hmc.edu> <20051103124027.GE29387@submonkey.net> <436A0C73.3010405@rsu.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TYoqghpzCwoKvQG2" Content-Disposition: inline In-Reply-To: <436A0C73.3010405@rsu.ru> X-PGP: finger ceri@FreeBSD.org User-Agent: Mutt/1.5.11 Sender: Ceri Davies Cc: hackers@FreeBSD.org, current@FreeBSD.org Subject: Re: nsswitch reviewer wanted X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 14:02:30 -0000 --TYoqghpzCwoKvQG2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Michael, On Thu, Nov 03, 2005 at 04:11:15PM +0300, Michael Bushkov wrote: > Ceri Davies wrote: >=20 > >I realise that you weren't asking for comments, but I took a quick look > >at http://www.rsu.ru/~bushman/nsswitch_cached/nss_cached.patch and have > >some. I'll send this to the original lists too. > > Thanks for comments! I need them much. Glad to be of some help. Don't take anything I say as any kind of authority though. > >o There aren't nearly enough comments. Granted, I'm not a C aficionado, > > but it's ~ line 3200 of that patch before we come to a new non-trivial > > comment, and there aren't many after that. > > > Ok - I'll comment the code. Thanks. > >o cached/config.c has magic numbers in create_def_configuration_entry(), > > which probably belong as #defines in config.h instead. I'm not sure > > what style(9) says about that though, so am happy to be ignored. > > > Yes, that's right - I guess, the most correct way is to move them to=20 > config.h As I mentioned, I'm no guru, but that seems to be conventional. > >o There is a single mention of a ssh_hostkeys cache in > > include/nsswitch.h, and no code to implement it. > > > I've implemented the patch for OpenSSH, which allows it to use nsswitch= =20 > for the hostkeys. It should be committed by the OpenSSH team. That's why= =20 > the ssh_hostkeys cache is mentioned in the nsswitch.h. This line can=20 > easialy be removed - as it doesn't affect anything. I hadn't realised that. I'd be interested to see that patch if you still have a copy, as it would answer the question of how much work doing such a thing would be. So far as I'm concerned there is no issue leaving that in there, I just wanted to make sure that it hadn't slipped in by mistake. > >o On line 15448, there is a whitespace nit. Also, in this area, are we > > sure that there is no benefit in continuing to key by euid/egid if > > perform_actual_lookup is enabled; can we send the euid/egid with the > > lookup request? > > > You are talking about passing euid/egid to the underlying nsswitch=20 > modules, right? This will require significant changes in these modules,= =20 > and, as far as I'm converned, won't gain us any benefits. >=20 > I can't see any benefit of keying by euid/egud when the=20 > 'perform_actual_lookups' mode is enabled. By ignoring them, we make the= =20 > cache common for all users, and no user can poison it - because all=20 > requests are made solely by ourselves. If we won't ignore the euid/egid,= =20 > then for every user, we'll have to make similar requests, this will also= =20 > affect the cache size. > When perform_actual_lookups mode is off, cache should be certainly=20 > separated by eud/egid for (basically) security reasons. OK, that's an good enough explanation for me. Thanks. > >o A user should be able to invalidate one of their caches (e.g., > > "cached -i hosts" to flush their hosts cache). Root should be able > > to do it for all users with a single command (e.g., "cached -I hosts" > > to flush all hosts caches). > > > Ok - I'll do that. Superb! > >o The manual for cached.conf is unclear over whether it's OK to name > > an "unknown" cache in cached.conf. > > > I'll corect this. In fact, it's ok to do that. I thought that was the intended meaning. That's great. > >o The location of cached.conf is defaulted to /usr/local/etc in > > cached/cached.c and should be changed on commit. > > > Will be corrected. Cool. Thanks again for working on this. Ceri --=20 Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. -- Einstein (attrib.) --TYoqghpzCwoKvQG2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDahhsocfcwTS3JF8RAp9mAJ9LXX2xeqhRiRcQry9t/wkZaHLxXQCeJ+S1 w1i53+FbA0vZ3qBsiHfEAVs= =X2nz -----END PGP SIGNATURE----- --TYoqghpzCwoKvQG2-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 14:21:03 2005 Return-Path: X-Original-To: hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E9E5916A41F; Thu, 3 Nov 2005 14:21:03 +0000 (GMT) (envelope-from bushman@rsu.ru) Received: from mail.r61.net (mail.r61.net [195.208.245.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E5D143D53; Thu, 3 Nov 2005 14:21:02 +0000 (GMT) (envelope-from bushman@rsu.ru) Received: from [195.208.252.201] (celsius.cc.rsu.ru [195.208.252.201]) by mail.r61.net (8.13.4/8.13.4) with ESMTP id jA3EL0SS083874; Thu, 3 Nov 2005 17:21:00 +0300 (MSK) (envelope-from bushman@rsu.ru) Message-ID: <436A1DED.9090805@rsu.ru> Date: Thu, 03 Nov 2005 17:25:49 +0300 From: Michael Bushkov User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051018) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ceri Davies References: <20051102001507.GB14638@odin.ac.hmc.edu> <20051103124027.GE29387@submonkey.net> <436A0C73.3010405@rsu.ru> <20051103140221.GF29387@submonkey.net> In-Reply-To: <20051103140221.GF29387@submonkey.net> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.86.2, clamav-milter version 0.86 on asterix.r61.net X-Virus-Status: Clean Cc: hackers@FreeBSD.org, current@FreeBSD.org Subject: Re: nsswitch reviewer wanted X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 14:21:04 -0000 Hello, Ceri! I'll do all the necessary changes and will send the updated patch to you and to the lists. >I hadn't realised that. I'd be interested to see that patch if you >still have a copy, as it would answer the question of how much work >doing such a thing would be. So far as I'm concerned there is no issue >leaving that in there, I just wanted to make sure that it hadn't slipped >in by mistake. > > > There is a patch for the openssh-portable port here: http://www.rsu.ru/~bushman/nsswitch_cached/openssh-portable_port.patch I'll make a patch to the standard openssh distribution to commit it to the official openssh source-tree and will send you a copy. Actually, It's not hard to add nsswitch support to the particular application - we need to find the places in the code, where lookups are done and substitute them with nsdispatch calls. The old code is refactored to meet the nsswitch module standards. >Thanks again for working on this. > > I'm really enjoying doing it :) >Ceri > > -- Michael From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 14:57:46 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 626AF16A41F; Thu, 3 Nov 2005 14:57:46 +0000 (GMT) (envelope-from keramida@linux.gr) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC4CD43D62; Thu, 3 Nov 2005 14:57:39 +0000 (GMT) (envelope-from keramida@linux.gr) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) by kane.otenet.gr (8.13.4/8.13.4/Debian-1) with SMTP id jA3EvbCi002251; Thu, 3 Nov 2005 16:57:38 +0200 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id jA3EvTF4002154; Thu, 3 Nov 2005 16:57:29 +0200 (EET) (envelope-from keramida@linux.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id jA3EvTIC002153; Thu, 3 Nov 2005 16:57:29 +0200 (EET) (envelope-from keramida@linux.gr) Date: Thu, 3 Nov 2005 16:57:29 +0200 From: Giorgos Keramidas To: kamal kc Message-ID: <20051103145729.GA2088@flame.pc> References: <20051103023936.63209.qmail@web35704.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051103023936.63209.qmail@web35704.mail.mud.yahoo.com> Cc: freebsd , freebsd Subject: Re: allocating 14KB memory per packet compression/decompression results in vm_fault X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 14:57:46 -0000 On 2005-11-02 18:39, kamal kc wrote: > dear everybody, > > i am trying to compress/decompress ip packets. > for this i have implemented the adaptive lzw compression. > i put the code in the ip_output.c and do my compression/decompression > just before the if_output() function call so that i won't interfere with > the ip processing of the kernel. > > for my compression/decompression i use string tables and temporary > buffers which take about 14KB of memory per packet. If you're allocating 14 KB of data just to send (approximately) 1.4 KB and then you throw away the 14 KB immediately, it sounds terrible. From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 16:23:44 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 46A3E16A41F for ; Thu, 3 Nov 2005 16:23:44 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id D899043D46 for ; Thu, 3 Nov 2005 16:23:43 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jA3GNAih011087; Thu, 3 Nov 2005 09:23:10 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 03 Nov 2005 09:23:25 -0700 (MST) Message-Id: <20051103.092325.119936663.imp@bsdimp.com> To: babkin@users.sourceforge.net, babkin@verizon.net From: "M. Warner Losh" In-Reply-To: <20669850.1131022662391.JavaMail.root@vms061.mailsrvcs.net> References: <20669850.1131022662391.JavaMail.root@vms061.mailsrvcs.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 03 Nov 2005 09:23:10 -0700 (MST) Cc: freebsd-hackers@freebsd.org, scottl@samsco.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 16:23:44 -0000 In message: <20669850.1131022662391.JavaMail.root@vms061.mailsrvcs.net> Sergey Babkin writes: : Maybe it can be fixed in the kernel without : too much trouble. It already is in libthr and libposix. They already use execution contexts to map M threads onto N contexts. libc_r is being retired and not worth the effort to modernize. Since there's really no good threading paradigm in 4.x and since it is also being retired, I don't think it is worth the effort there. Warner From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 17:48:10 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E48C16A41F for ; Thu, 3 Nov 2005 17:48:10 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C08243D49 for ; Thu, 3 Nov 2005 17:48:05 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.23.117]) ([10.251.23.117]) by a50.ironport.com with ESMTP; 03 Nov 2005 09:48:05 -0800 X-IronPort-Anti-Spam-Filtered: true Message-ID: <436A4D54.6090000@elischer.org> Date: Thu, 03 Nov 2005 09:48:04 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: babkin@users.sourceforge.net References: <20669850.1131022662391.JavaMail.root@vms061.mailsrvcs.net> In-Reply-To: <20669850.1131022662391.JavaMail.root@vms061.mailsrvcs.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, scottl@samsco.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 17:48:10 -0000 Sergey Babkin wrote: >>From: "M. Warner Losh" >> Scott Long writes: >>: Dinesh Nair wrote: >>: > >>: > >>: > On 11/03/05 03:12 Warner Losh said the following: >>: > >>: >> Yes. if you tsleep with signals enabled, the periodic timer will go >>: >> off, and you'll return early. This typically isn't what you want >>: >> either. >>: > >>: > >>: > looks like i've got a lot of work to do, poring thru all the ioctls for >>: > the device and trying to use another method to wait instead of tsleep(). >>: >>: Note that a thread can block on select/poll in 4.x and still allow other >>: threads to run. I used this to solve a very similar problem to your in >>: a 4.x app of mine. I have the app thread wait on select() on the device >>: node for the driver. When the driver gets to a state when an ioctl >>: won't block (like data being available to read), then it does the >>: appropriate magic in it's d_poll method. select in userland sees this, >>: allows the thread to resume running, and the thread then calls ioctl. >>: Of course you have to be careful that you don't have multiple threads >>: competing for the same data or that the data won't somehow disappear >>: before the ioctl call runs. But it does work. Look at the aac(4) >>: driver for my example of this. >> >>Yes. If you have the ability to know that an ioctl won't block before >>you call it, that would work too. This method is a little trickier, >>like you say, but can be made to work. I've also seen ioctls that >> >> > >Maybe it can be fixed in the kernel without >too much trouble. Basically, the trick would be >to start another kernel thread when the first >one blocks. Then the original one can be left >executing the ioctl while the new one continues >the work. Then of cours ethere should be some >notification mechanism that the ioctl has >completed. > >The new thread can start in a signal handler, >kind of like what UnixWare does (and I believe >Solaris too): they have an M:N model where M >user threads are scheduled on N kernel threads. >When all the kernel threads of a process get >blocked, a signal is sent thread which handler >then starts a new kernel thread if there >are any runnable user threads. > > > so you've just describes KSE in 5,6 and 7 >Hm, suppose we have a per-process property "is >threaded" that would be set by the threads library. Any >blocking calls (tsleep() and such) would check it, >and if it's set than immediately post this "all >threads are blocked" signal. Then the library can >catch it and handle in some useful way, maybe >doing an rfork() or just running another user thread >and returning to this one later. > >-SB > > >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 17:48:57 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 903E716A41F for ; Thu, 3 Nov 2005 17:48:57 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5109243D49 for ; Thu, 3 Nov 2005 17:48:57 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.23.117]) ([10.251.23.117]) by a50.ironport.com with ESMTP; 03 Nov 2005 09:48:57 -0800 X-IronPort-Anti-Spam-Filtered: true Message-ID: <436A4D88.5070105@elischer.org> Date: Thu, 03 Nov 2005 09:48:56 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "M. Warner Losh" References: <20669850.1131022662391.JavaMail.root@vms061.mailsrvcs.net> <20051103.092325.119936663.imp@bsdimp.com> In-Reply-To: <20051103.092325.119936663.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, babkin@users.sourceforge.net, babkin@verizon.net, scottl@samsco.org Subject: Re: locking in a device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 17:48:57 -0000 M. Warner Losh wrote: >In message: <20669850.1131022662391.JavaMail.root@vms061.mailsrvcs.net> > Sergey Babkin writes: >: Maybe it can be fixed in the kernel without >: too much trouble. > >It already is in libthr and libposix. They already use execution >contexts to map M threads onto N contexts. libc_r is being retired >and not worth the effort to modernize. > >Since there's really no good threading paradigm in 4.x and since it is >also being retired, I don't think it is worth the effort there. > > I suggest linking with the linuxthreads port. >Warner >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 20:35:20 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC24216A41F for ; Thu, 3 Nov 2005 20:35:20 +0000 (GMT) (envelope-from V.Haisman@sh.cvut.cz) Received: from service.sh.cvut.cz (service.sh.cvut.cz [147.32.127.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0690C43D49 for ; Thu, 3 Nov 2005 20:35:19 +0000 (GMT) (envelope-from V.Haisman@sh.cvut.cz) Received: from localhost (localhost [127.0.0.1]) by service.sh.cvut.cz (Postfix) with ESMTP id 48EA91A33B8 for ; Thu, 3 Nov 2005 21:35:18 +0100 (CET) Received: from service.sh.cvut.cz ([127.0.0.1]) by localhost (service [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 17478-09 for ; Thu, 3 Nov 2005 21:35:14 +0100 (CET) Received: from logout.sh.cvut.cz (logout.sh.cvut.cz [147.32.127.203]) by service.sh.cvut.cz (Postfix) with ESMTP id 59FE21A33A6 for ; Thu, 3 Nov 2005 21:35:14 +0100 (CET) Received: from [192.168.1.2] (localhost [127.0.0.1]) by logout.sh.cvut.cz (Postfix) with ESMTP id 975DF3C0BE for ; Thu, 3 Nov 2005 21:35:20 +0100 (CET) Message-ID: <436A7474.4040501@sh.cvut.cz> Date: Thu, 03 Nov 2005 21:35:00 +0100 From: =?UTF-8?B?VsOhY2xhdiBIYWlzbWFu?= User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers X-Enigmail-Version: 0.93.0.0 OpenPGP: id=733031B4 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEUnMzWJm5S+0864pn5r blp/hnW2up7X7uqftbNRVUrW1LGBdGfHwJqPi3ScoYtBQzhDxGEwAAAAB3RJTUUH1QoQDDgyQtx8 HQAAAkNJREFUeJzFU0toU0EUPYu66CpGdCUUmoUJkpUDQUoNBVEUrBJsq1Ki2EIKIUZ8mydBhYi0 wVUXJVCLCrFN4DIEQdxIqdBIFsMkWD9YJClCRGKjJaviynjfe8RPogtXPcObuXPOPXd+PHj+Aeyo QNmobGLXVeANGM+GsP0B2yqHHNVoCD2LwLglVGZx7yXSlADR0uZu9C4Bpy3hUxPvH/cuUw6UoPCL h64I8KAJuMpwRU8uUMJy0OIpHVeXmulZoCc/t0LlTbJLEY1EudPRcnVjgAP5Osdl4K5HVP4+2bAI okaUA0Iq6Q59+Zy2eMWN6EpFTsa3+uD1+JKj4TPHuYTSMaLScLAaqk94YJqG4ds30hojOVgYoNJc NTztNU2TBYbhu9Aafnq08ORja37da1NwBrN/b7NVEc+b8yecuYkp08vNvLYneVZRaSH1vS0UnfHm OUPzWaZufHPmCWSdWrfeGVQQKmcsO4If8pAdXJ/xF4QQAeOVY1AQQcfirwkLUWeWVTgi6vaGt2xe BGzBEIMQorru8RxgPqY1V6uxYnwVBRZEI1ytCm3dE8mC2DgcbzCJGHdBEVDKuWDSwsrSGoqzJmNt 2jJpNueIH0qS8/0JrDKnVBdvOzIsdVr4zaX9dn9xcLLKdCtQGfutVacLE9Ja+yfbDvO4aMWrklfK /JYv15C8Kw9S10kup5Bys0N1bLdcn4HvTl/Xlh6Fpllwj5/XpH9BUXn/ym0Dvv7Rt2MywojpYiSi i7Hsscaa19zZ//y/hR+BT/ns80nmJAAAAABJRU5ErkJggg== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig835EE96641A5CFC437D7409B" X-Virus-Scanned: by amavisd-new at sh.cvut.cz Subject: Kernel source hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 20:35:21 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig835EE96641A5CFC437D7409B Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, I have noticed that there are still places in kernel sources that use K&R style of function parameter definitions. Are the core developers interested in changing it into proper ANSI definitions? I would do it because it would give me a reason to read the code and learn something about the kernel. Also, is there a page with other tasks for kernel neophytes like me? I looked for some such page but I couldn't find any. Vaclav Haisman --------------enig835EE96641A5CFC437D7409B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iQEVAwUBQ2p0fW56zbtzMDG0AQK1KAf/ePZ9uog3a0thBRmbaksYDle2K+28i3ln JNactgcUGkdw/3zkP23ewwXQcqvWQsF9VNAoVRJ1B9QOQUwsoqLw222nd7zKLmmr tau5KACL5/D8KJXdcj7up006/dRY9YsYKcy9SIi9RT/TxG1uwlsNcp6J+3oHJBw8 Du9J8iArW03WhcIHsD0r+EuNScnq1tIZ94ZuFKTraEthuweMbxoPa2vM0+yDX7+w jTyHLD645gsnLHZPIBJIk+DKgEC3Dba4QMBpleievczMuFFndxRw9Yc2d/esdrdl z7YsYlHidD1UUSBXDvcVGRE5Ba4sbcds9Xo5auTb5hl9u0it1CUrcA== =1KCl -----END PGP SIGNATURE----- --------------enig835EE96641A5CFC437D7409B-- From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 21:52:29 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1275616A41F; Thu, 3 Nov 2005 21:52:29 +0000 (GMT) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E2A743D46; Thu, 3 Nov 2005 21:52:28 +0000 (GMT) (envelope-from bra@fsn.hu) Received: from localhost (localhost [127.0.0.1]) by people.fsn.hu (Postfix) with ESMTP id 64A9F8441F; Thu, 3 Nov 2005 22:52:26 +0100 (CET) Received: from people.fsn.hu ([127.0.0.1]) by localhost (people.fsn.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 99721-06; Thu, 3 Nov 2005 22:52:20 +0100 (CET) Received: from [172.16.164.2] (fw.axelero.hu [195.228.243.120]) by people.fsn.hu (Postfix) with ESMTP id F31918441E; Thu, 3 Nov 2005 22:52:19 +0100 (CET) Message-ID: <436A868F.4010606@fsn.hu> Date: Thu, 03 Nov 2005 22:52:15 +0100 From: Attila Nagy User-Agent: Debian Thunderbird 1.0.2 (X11/20050602) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-amd64@freebsd.org Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at fsn.hu Cc: freebsd-hackers@freebsd.org Subject: Reproduceable freeze with quotas enabled X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 21:52:29 -0000 Hello, I have an "easily" (at least to me) reproduceable freeze with both 6-STABLE and 7-CURRENT on an amd64 SMP machine. What I do is simply copy a lot of directories, files and symlinks with different uids from another machine to this one, using rsync. With quotas enabled it freezes constantly, without quotas it doesn't. I have MP_WATCHDOG enabled (the kernel config is the default GENERIC+SMP with debuggers and MP_WATCHDOG only) so after the freeze it drops me into the debugger in which I can see the following: FreeBSD/amd64 (helen) (ttyv0) login: Watchdog timer: 3 Watchdog timer: 2 Watchdog timer: 1 Watchdog timer: 0 Watchdog firing! NMI ... going to debugger [thread pid 157 tid 100143 ] Stopped at vinactive+0x83: jz 0x365245a9 db> bt Tracing pid 157 tid 100143 td 0xffffff007b9c14c0 vinactive() at vinactive+0x83 vput() at vput+0x1cf qsync() at qsync+0x260 ffs_sync() at ffs_sync+0x159 sync_fsync() at sync_fsync+0x191 VOP_FSYNC_APV() at VOP_FSYNC_APV+0x3d sched_sync() at sched_sync+0x428 fork_exit() at fork_exit+0x86 fork_trampoline() at fork_trampoline+0xe --- trap 0, rip = 0, rsp = 0xffffffffb2029d00, rbp = 0 --- db> ps 157 ffffff007b9489c0 0 0 0 0000204 [CPU 0] syncer Any ideas? Thanks, -- Attila Nagy e-mail: Attila.Nagy@fsn.hu Free Software Network (FSN.HU) phone: +3630 306 6758 ISOs: http://www.fsn.hu/?f=download From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 04:41:46 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 216E216A41F for ; Fri, 4 Nov 2005 04:41:46 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id BA8AB43D45 for ; Fri, 4 Nov 2005 04:41:45 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jA44ekll017475; Thu, 3 Nov 2005 21:40:46 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 03 Nov 2005 21:41:04 -0700 (MST) Message-Id: <20051103.214104.62371333.imp@bsdimp.com> To: V.Haisman@sh.cvut.cz From: "M. Warner Losh" In-Reply-To: <436A7474.4040501@sh.cvut.cz> References: <436A7474.4040501@sh.cvut.cz> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 03 Nov 2005 21:40:46 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel source hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 04:41:46 -0000 In message: <436A7474.4040501@sh.cvut.cz> V=E1clav Haisman writes: : I have noticed that there are still places in kernel sources that use= : K&R style of function parameter definitions. You must be looking at old sources. Most of the kernel has been converted, but it is still a work in progress. There's very little gain for the risk that something subtle that's different between K&R and ANSI causes breakage... The risk is much lower these days since we insist on proper prototypes... : Are the core developers interested in changing it into proper ANSI : definitions? I would do it because it would give me a reason to read = the : code and learn something about the kernel. Nearly all of the kernel has been converted. The parts that remain are the less widely travelled paths through the code. : Also, is there a page with other tasks for kernel neophytes like me? = I : looked for some such page but I couldn't find any. phk used to have a /jkh/ page, or Junior Kernel Hacker page. Don't know if that's still that way or not. Warner From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 06:56:31 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D464F16A420 for ; Fri, 4 Nov 2005 06:56:31 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web35704.mail.mud.yahoo.com (web35704.mail.mud.yahoo.com [66.163.179.158]) by mx1.FreeBSD.org (Postfix) with SMTP id 1A7E943D48 for ; Fri, 4 Nov 2005 06:56:31 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 9594 invoked by uid 60001); 4 Nov 2005 06:56:30 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=YyEtfQTpEi9/vaQJdTKeHfVbJNrsyDGEM2JbbNafddEuYI0hs1CKCSsN2AMdSbpWoGh4x41jvv+hilI3Y3t7Th/RmXavQSEh9WOT3z9TS3uVZFh9W+a6P/x1vY7Y/WbNmYqZ61yWJwEYzdoxs8RJ0jm1ALhFxqVc1nuj5Zjjtns= ; Message-ID: <20051104065630.9592.qmail@web35704.mail.mud.yahoo.com> Received: from [202.79.62.15] by web35704.mail.mud.yahoo.com via HTTP; Thu, 03 Nov 2005 22:56:30 PST Date: Thu, 3 Nov 2005 22:56:30 -0800 (PST) From: kamal kc To: Giorgos Keramidas In-Reply-To: <20051103145729.GA2088@flame.pc> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd , freebsd Subject: Re: allocating 14KB memory per packet compression/decompression results in vm_fault X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 06:56:32 -0000 > > for my compression/decompression i use string > tables and temporary > > buffers which take about 14KB of memory per > packet. > > If you're allocating 14 KB of data just to send > (approximately) 1.4 KB > and then you throw away the 14 KB immediately, it > sounds terrible. yes that's true. since i am using the adaptive LZW compression scheme it requires construction of string table for compression/decompression. So an ip packet of size 1500 bytes requires a table of size (4KB + 4KB + 2KB =12KB). further still i copy the ip packet data in another data buffer (about 1.4KB) and then compress it. So all this adds up to about 14KB. Right now i can't do with less than 14KB. as i said before the compression/decompression works fine. but soon the kernel would panic with one of the vm_fault: error message. what would be the best possible way to allocate/deallocate 14KB memory per packet without causing vm_faults ?? is there anything i am missing ?? thanks kamal __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 09:15:36 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C722D16A41F for ; Fri, 4 Nov 2005 09:15:35 +0000 (GMT) (envelope-from V.Haisman@sh.cvut.cz) Received: from service.sh.cvut.cz (service.sh.cvut.cz [147.32.127.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E7E543D48 for ; Fri, 4 Nov 2005 09:15:34 +0000 (GMT) (envelope-from V.Haisman@sh.cvut.cz) Received: from localhost (localhost [127.0.0.1]) by service.sh.cvut.cz (Postfix) with ESMTP id DFE131A33CA; Fri, 4 Nov 2005 10:15:32 +0100 (CET) Received: from service.sh.cvut.cz ([127.0.0.1]) by localhost (service [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01152-07; Fri, 4 Nov 2005 10:15:29 +0100 (CET) Received: from logout.sh.cvut.cz (logout.sh.cvut.cz [147.32.127.203]) by service.sh.cvut.cz (Postfix) with ESMTP id 2A3F81A33CD; Fri, 4 Nov 2005 10:15:29 +0100 (CET) Received: from [192.168.1.2] (localhost [127.0.0.1]) by logout.sh.cvut.cz (Postfix) with ESMTP id A7BA13C0BE; Fri, 4 Nov 2005 10:15:31 +0100 (CET) Message-ID: <436B26A7.2020104@sh.cvut.cz> Date: Fri, 04 Nov 2005 10:15:19 +0100 From: =?UTF-8?B?VsOhY2xhdiBIYWlzbWFu?= User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "M. Warner Losh" References: <436A7474.4040501@sh.cvut.cz> <20051103.214104.62371333.imp@bsdimp.com> In-Reply-To: <20051103.214104.62371333.imp@bsdimp.com> X-Enigmail-Version: 0.93.0.0 OpenPGP: id=733031B4 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEUnMzWJm5S+0864pn5r blp/hnW2up7X7uqftbNRVUrW1LGBdGfHwJqPi3ScoYtBQzhDxGEwAAAAB3RJTUUH1QoQDDgyQtx8 HQAAAkNJREFUeJzFU0toU0EUPYu66CpGdCUUmoUJkpUDQUoNBVEUrBJsq1Ki2EIKIUZ8mydBhYi0 wVUXJVCLCrFN4DIEQdxIqdBIFsMkWD9YJClCRGKjJaviynjfe8RPogtXPcObuXPOPXd+PHj+Aeyo QNmobGLXVeANGM+GsP0B2yqHHNVoCD2LwLglVGZx7yXSlADR0uZu9C4Bpy3hUxPvH/cuUw6UoPCL h64I8KAJuMpwRU8uUMJy0OIpHVeXmulZoCc/t0LlTbJLEY1EudPRcnVjgAP5Osdl4K5HVP4+2bAI okaUA0Iq6Q59+Zy2eMWN6EpFTsa3+uD1+JKj4TPHuYTSMaLScLAaqk94YJqG4ds30hojOVgYoNJc NTztNU2TBYbhu9Aafnq08ORja37da1NwBrN/b7NVEc+b8yecuYkp08vNvLYneVZRaSH1vS0UnfHm OUPzWaZufHPmCWSdWrfeGVQQKmcsO4If8pAdXJ/xF4QQAeOVY1AQQcfirwkLUWeWVTgi6vaGt2xe BGzBEIMQorru8RxgPqY1V6uxYnwVBRZEI1ytCm3dE8mC2DgcbzCJGHdBEVDKuWDSwsrSGoqzJmNt 2jJpNueIH0qS8/0JrDKnVBdvOzIsdVr4zaX9dn9xcLLKdCtQGfutVacLE9Ja+yfbDvO4aMWrklfK /JYv15C8Kw9S10kup5Bys0N1bLdcn4HvTl/Xlh6Fpllwj5/XpH9BUXn/ym0Dvv7Rt2MywojpYiSi i7Hsscaa19zZ//y/hR+BT/ns80nmJAAAAABJRU5ErkJggg== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4C263B41CA0E9A207B530183" X-Virus-Scanned: by amavisd-new at sh.cvut.cz Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel source hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 09:15:36 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4C263B41CA0E9A207B530183 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable M. Warner Losh wrote: > In message: <436A7474.4040501@sh.cvut.cz> > V=C3=A1clav Haisman writes: > : I have noticed that there are still places in kernel sources that use= > : K&R style of function parameter definitions. >=20 > You must be looking at old sources. Most of the kernel has been I noticed that in version 1.651 of vfs_subr.c on MAIN branch through FreeBSD's CVSweb. > converted, but it is still a work in progress. There's very little > gain for the risk that something subtle that's different between K&R > and ANSI causes breakage... The risk is much lower these days since > we insist on proper prototypes... I think there is very little risk, with proper patch review. >=20 > : Are the core developers interested in changing it into proper ANSI > : definitions? I would do it because it would give me a reason to read = the > : code and learn something about the kernel. >=20 > Nearly all of the kernel has been converted. The parts that remain > are the less widely travelled paths through the code. >=20 > : Also, is there a page with other tasks for kernel neophytes like me? = I > : looked for some such page but I couldn't find any. >=20 > phk used to have a /jkh/ page, or Junior Kernel Hacker page. Don't > know if that's still that way or not. >=20 > Warner Vaclav Haisman --------------enig4C263B41CA0E9A207B530183 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iQEVAwUBQ2smrW56zbtzMDG0AQI9agf8CTtCii8ZUUkG1s9hFeioeDd+CoVMQQc2 axc7piQ/7bsLut0W6gpn/LvFgRu55pbtYotFuH/+4/4UDaUzcWA/NYmimsVS1LKd V0x2uA7PXqU2codtTB/nutcYobp1W+ejziWepwGi18JcAe0ATrXvNzL4Mdwlfasn 0vhkUqGuPyA4T9MvNcVPxBcGBhY0Q4Lj/zAN46VMj4hkO6IbdSkW/guiXFy7g6b/ EVPHSo+XOfWaMT/SAmPOWhDy5fWqckroWp+fNq1RSZwoH9YlG9OzCeKzMANZvBCF FowFE+PA8VVoH1N+qzio9ngrkn79ugQxSp/7QtKdtydERjV2A22GmQ== =dtj+ -----END PGP SIGNATURE----- --------------enig4C263B41CA0E9A207B530183-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 09:19:03 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 581AD16A41F; Fri, 4 Nov 2005 09:19:03 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB91643D45; Fri, 4 Nov 2005 09:19:02 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id D94AD46B8D; Fri, 4 Nov 2005 04:19:01 -0500 (EST) Date: Fri, 4 Nov 2005 09:19:01 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: nocool In-Reply-To: <20051104012809.04472B28@smtp.263.net> Message-ID: <20051104091034.A9692@fledge.watson.org> References: <20051104012809.04472B28@smtp.263.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers , freebsd-current Subject: Re: Why INVARIANTS option and sanity checking? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 09:19:03 -0000 On Fri, 4 Nov 2005, nocool wrote: > In my apprehension, these debugging options aim to help developers > detect and locate program's error or exception. In view of efficiency > and usability, will be turned off in release. That is to say, these > option will not be used to resist intrusion. That is correct. While some users do run with INVARIANTS turned on in production, this is not the recommended configuration for performance reasons. The benefit to running with INVARIANTS on is that, in principle, if you do run into a bug, the system may fail stop faster, rather than perhaps allowing kernel memory corruption to persist. I'm not sure this is likely in a number of cases (often you get a panic immediately afterwards because the invariant is violated), but it does make bugs easier to track down. Because INVARIANTS does perform kernel memory scrubbing, it is quite expensive in terms of CPU. > Part of my work is to review the object reuse protection of FreeBSD 5.4 > release. Object reuse come from the Trusted Computer System Evaluation > Criteria as "The reassignment to some subject of a storage medium (e.g., > page frame, disk sector, magnetic tape) that contained one or more > objects. To be securely reassigned, no residual data can be available to > the new subject through standard system mechanisms." > > In review object reuse, should we take kernel area memory management > into account? To clean the kernel memory during reassignment using > vm_page_alloc and ctor or dtor and set up MEMGUARD to insulate the > memory between freeing and reallocating? The design for FreeBSD calls for all memory and other resources provided to unprivileged processes to be scrubbed before being made available. Only using privilege should a process be able to gain access to unscrubbed resources through allocation. For example: - When a process allocates a new file, it will be created as zero-length. When extended using ftruncate(), any data read or pages mapped from the file will be zero-filled. - When new memory is allocated to the process at time of exec(), using brk(), or using anonymous mmap(), zero'd pages are provided to the process (often optimized using copy-on-write). - When kernel data structures are returned to user space, they are zero'd. This is necessary even when a structure is filled out explicitly, as the padding in the structure introduced by the compiler must also be zero'd. For example, with data structures returned by ioctl(), sysctl(), etc. When using privilege, it is possible to bypass these protections by directly accessing the disk device (allowing reading outside of allocated file space), direct access to allocated and unallocated kernel memory (/dev/mem, /dev/kmem), direct access to swap devices, and so on. If you are aware of bugs in the implementation that result in improper scrubbing of objects on reuse, please let us know by submitting a bug report. While we do optimize reuse scrubbing in a number of situations (copy-on-write from zero'd pages, for example), the semantics should be consistent for the user process. This is especially important with the advent of services like IPSEC, where valuable keying material persists in the kernel for extended periods. Robert N M Watson From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 09:47:34 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A3F1316A41F for ; Fri, 4 Nov 2005 09:47:34 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D83B43D46 for ; Fri, 4 Nov 2005 09:47:34 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id DE4FA46B17; Fri, 4 Nov 2005 04:47:33 -0500 (EST) Date: Fri, 4 Nov 2005 09:47:33 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: "M. Warner Losh" In-Reply-To: <20051103.214104.62371333.imp@bsdimp.com> Message-ID: <20051104094643.S9692@fledge.watson.org> References: <436A7474.4040501@sh.cvut.cz> <20051103.214104.62371333.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel source hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 09:47:34 -0000 On Thu, 3 Nov 2005, M. Warner Losh wrote: > : Also, is there a page with other tasks for kernel neophytes like me? I > : looked for some such page but I couldn't find any. > > phk used to have a /jkh/ page, or Junior Kernel Hacker page. Don't know > if that's still that way or not. Now that we have a FreeBSD Developer wiki, it may make sense to move the page there so it can be more easily reached and maintained by a broader set of developers? Robert N M Watson From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 09:49:09 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58E7216A41F for ; Fri, 4 Nov 2005 09:49:09 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail25.syd.optusnet.com.au (mail25.syd.optusnet.com.au [211.29.133.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E7C443D46 for ; Fri, 4 Nov 2005 09:49:08 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail25.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id jA49n5H4017949 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 4 Nov 2005 20:49:06 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id jA49n5Hh069040; Fri, 4 Nov 2005 20:49:05 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id jA49n5dq069039; Fri, 4 Nov 2005 20:49:05 +1100 (EST) (envelope-from pjeremy) Date: Fri, 4 Nov 2005 20:49:05 +1100 From: Peter Jeremy To: kamal kc Message-ID: <20051104094904.GL39882@cirb503493.alcatel.com.au> References: <20051103145729.GA2088@flame.pc> <20051104065630.9592.qmail@web35704.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051104065630.9592.qmail@web35704.mail.mud.yahoo.com> User-Agent: Mutt/1.4.2.1i X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc Cc: freebsd , Giorgos Keramidas Subject: Re: allocating 14KB memory per packet compression/decompression results in vm_fault X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 09:49:09 -0000 [dropping -net] On Thu, 2005-Nov-03 22:56:30 -0800, kamal kc wrote: >as i said before the compression/decompression works >fine. but soon the kernel would panic with one >of the vm_fault: error message. What's the exact panic and traceback? Have you enabled the various sanity checks (WITNESS, DEBUG_MEMGUARD, INVARIANTS)? >what would be the best possible way to >allocate/deallocate 14KB memory per packet without >causing vm_faults ?? The most efficient way would be to statically allocate the dictionary and string tables. The downside is that you then need to serialise the [de]compression. You could look at zone(9) as an alternative to malloc(9). >is there anything i am missing ?? - Are you correctly allocating the mbuf for the outgoing packet correctly? - Are you correctly freeing the mbuf for the incoming packet? - Are you sure that you're not writing outside the bounds of one of the memory blocks you're allocating? -- Peter Jeremy From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 09:54:09 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A207C16A41F; Fri, 4 Nov 2005 09:54:09 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16B7B43D45; Fri, 4 Nov 2005 09:54:09 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id BE2D546B17; Fri, 4 Nov 2005 04:54:08 -0500 (EST) Date: Fri, 4 Nov 2005 09:54:08 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Attila Nagy In-Reply-To: <436A868F.4010606@fsn.hu> Message-ID: <20051104095129.M9692@fledge.watson.org> References: <436A868F.4010606@fsn.hu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: Reproduceable freeze with quotas enabled X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 09:54:09 -0000 On Thu, 3 Nov 2005, Attila Nagy wrote: > Hello, > > I have an "easily" (at least to me) reproduceable freeze with both > 6-STABLE and 7-CURRENT on an amd64 SMP machine. > > What I do is simply copy a lot of directories, files and symlinks with > different uids from another machine to this one, using rsync. This is probably a vnode lock leak or deadlock. As it looks like you have both the ability to get into the debugger and also a serial or other remote console, the output of: show allpcpu alltrace show lockedvnods show allocks would be helpful. There are also "options DEBUG_LOCKS" which extends the debugging information available via "show lockedvnods" with information about where the lock was acquired, which can be quite helpful. Robert N M Watson > > With quotas enabled it freezes constantly, without quotas it doesn't. > > I have MP_WATCHDOG enabled (the kernel config is the default GENERIC+SMP with > debuggers and MP_WATCHDOG only) so after the freeze it drops me into the > debugger in which I can see the following: > > FreeBSD/amd64 (helen) (ttyv0) > > login: Watchdog timer: 3 > Watchdog timer: 2 > Watchdog timer: 1 > Watchdog timer: 0 > Watchdog firing! > NMI ... going to debugger > [thread pid 157 tid 100143 ] > Stopped at vinactive+0x83: jz 0x365245a9 > db> bt > Tracing pid 157 tid 100143 td 0xffffff007b9c14c0 > vinactive() at vinactive+0x83 > vput() at vput+0x1cf > qsync() at qsync+0x260 > ffs_sync() at ffs_sync+0x159 > sync_fsync() at sync_fsync+0x191 > VOP_FSYNC_APV() at VOP_FSYNC_APV+0x3d > sched_sync() at sched_sync+0x428 > fork_exit() at fork_exit+0x86 > fork_trampoline() at fork_trampoline+0xe > --- trap 0, rip = 0, rsp = 0xffffffffb2029d00, rbp = 0 --- > db> ps > 157 ffffff007b9489c0 0 0 0 0000204 [CPU 0] syncer > > Any ideas? > > Thanks, > -- > Attila Nagy e-mail: Attila.Nagy@fsn.hu > Free Software Network (FSN.HU) phone: +3630 306 6758 > ISOs: http://www.fsn.hu/?f=download > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 10:26:54 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E346016A420; Fri, 4 Nov 2005 10:26:53 +0000 (GMT) (envelope-from SRS0=iBhji9T3=ZD=metro.cx=fbsd@sonologic.nl) Received: from mx1.sonologic.nl (mx1.sonologic.nl [82.94.245.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id ECAD843D45; Fri, 4 Nov 2005 10:26:52 +0000 (GMT) (envelope-from SRS0=iBhji9T3=ZD=metro.cx=fbsd@sonologic.nl) Received: from [127.0.0.1] (mx1.sonologic.nl [82.94.245.21]) (authenticated bits=0) by mx1.sonologic.nl (8.13.3/8.13.3) with ESMTP id jA4AQdKl030225; Fri, 4 Nov 2005 10:26:39 GMT Message-ID: <436B36E1.7010704@metro.cx> Date: Fri, 04 Nov 2005 11:24:33 +0100 From: Koen Martens Organization: Sonologic User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robert Watson References: <2B3B2AA816369A4E87D7BE63EC9D2F269B7B4D@SDCEXCHANGE01.ad.amcc.com> <432F1310.80007@metro.cx> <20050920153806.F34322@fledge.watson.org> <433FF87C.3090101@metro.cx> <20051005090715.D84936@fledge.watson.org> In-Reply-To: <20051005090715.D84936@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Helo-Milter-Authen: gmc@sonologic.nl, fbsd@metro.cx, mx1 Received-SPF: pass (mx1.sonologic.nl: 82.94.245.21 is authenticated by a trusted mechanism) Cc: Koen Martens , freebsd-hackers@FreeBSD.org, Dimitry Andric , Vinod Kashyap , jhb@FreeBSD.org Subject: Re: panic in propagate_priority w/ postgresql under heavy load X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 10:26:54 -0000 Robert Watson wrote: > > On Sun, 2 Oct 2005, Koen Martens wrote: > >> kernel trap 12 with interrupts disabled >> >> >> Fatal trap 12: page fault while in kernel mode >> cpuid = 1; apic id = 06 >> fault virtual address = 0x24 >> fault code = supervisor read, page not present >> instruction pointer = 0x8:0xc051c253 >> stack pointer = 0x10:0xe93efb3c >> frame pointer = 0x10:0xe93efb50 >> code segment = base 0x0, limit 0xfffff, type 0x1b >> = DPL 0, pres 1, def32 1, gran 1 >> processor eflags = resume, IOPL = 0 >> current process = 6092 (postgres) >> >> And that, that is all.. No ddb> no 'dumping xxxxMB', just that. So >> basically, i fear this is a non-debugable problem, since putting in >> witness and such slows the kernel to a point where the panic does not >> occur anymore (at least, not in the 4 weeks i've been running the box >> with witness & invariants). Clueless :) > > > This looks like a NULL pointer dereference in kernel code. Probably, > this is not a locking problem, so running without WITNESS to debug > this should be OK. Are you using a serial console? If not, you might > find that it increases the reliability of entering DDB. If this box > is an SMP box, you may also want to add options KDB_STOP_NMI to your > kernel config. > > Using gdb, could you work out what function 0xc051c253 is, and where > in the function. You should be able to run gdb on your kernel.debug > (or kernel on 7.x), and use "l *0xc051c253" to generate a pointer to > the line and snippet, which will give us a substantial hint about what > is happening. Sorry for not getting back on this timely, have had rather a busy period (lousy excuse, i know). Anyway, I have currently downgraded the machine to a 5.3-RELEASE-p22 kernel, which seems to have solved the problem. There are no panics anymore (it has been two weeks since the downgrade). Makes me a bit warry about upgrading anything to 6.x :) Anyway, i did get into the ddb prompt on one of the last panics, and put some of the resources online: http://www.sonologic.nl/fbsd/ As you can see, i was pretty clueless about what to do, and just traced about everything that was not swapped out.. Did not put the core dump online, as i don't feel like sharing that with the world. Available upon request though for those who want to get a crack at this. I don't have a copy of the kernel.debug lying around, for which I apologise. I cannot however upgrade to 5.4 again, we've had enought trouble with this machine and the user load on that machine has increased to a point where i cannot afford these random panics anymore. I don't have the spare identical hardware lying around at this point to copy the entire setup for testing purposes.. What i will try when i find some time is doing incremental upgrades from 5.3-RELEASE-p22 to 5.4-RELEASE-p6, step by step, to see what patchlevel introduces the problem. Best, Koen From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 12:45:47 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4A8416A41F for ; Fri, 4 Nov 2005 12:45:47 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from coe.ufrj.br (roma.coe.ufrj.br [146.164.53.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 320DA43D45 for ; Fri, 4 Nov 2005 12:45:47 +0000 (GMT) (envelope-from jonny@jonny.eng.br) Received: from localhost (localhost [127.0.0.1]) by coe.ufrj.br (Postfix) with ESMTP id 3EFDF1700A; Fri, 4 Nov 2005 10:45:45 -0200 (BRST) Received: from coe.ufrj.br ([146.164.53.65]) by localhost (roma.coe.ufrj.br [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 29424-02; Fri, 4 Nov 2005 10:45:38 -0200 (BRST) Received: from [10.0.0.15] (telco [201.8.56.200]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by coe.ufrj.br (Postfix) with ESMTP id EF70A17008; Fri, 4 Nov 2005 10:45:35 -0200 (BRST) Message-ID: <436B57EC.6090004@jonny.eng.br> Date: Fri, 04 Nov 2005 10:45:32 -0200 From: =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Luis?= User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Peter Jeremy References: <20051103145729.GA2088@flame.pc> <20051104065630.9592.qmail@web35704.mail.mud.yahoo.com> <20051104094904.GL39882@cirb503493.alcatel.com.au> In-Reply-To: <20051104094904.GL39882@cirb503493.alcatel.com.au> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAADBQ TFRFAAAAgAAAAIAAgIAAAACAgACAAICAgICAwMDA/wAAAP8A//8AAAD//wD/AP//////ex+xxAAA Ac9JREFUOMtdk8FupDAMhr1qRbjR2x77GD3uq7BS1TkuhyrmFnppcvOrUlUquXltJ2EAIw1Dvvz+ bRPgrQbU6NpzuY0AF1LABIc4AH9crxLwb/4VztEU42W9SOBezwX4ClzeLuC9PBFRq+2xpJJHN8KQ Oa9Hd/ACnldgUVADvgHKA2usVwW12BVSkrThJH+5lqqQXIAAvRkQM6WqkADpO5gBx5m5VOxRgBZV HRLRcgc4dv3ukbOBm3de8uHIe1n0BBUBIi4hi0U2ownGkkwrwN425ygVPjntsvOmkFyyXYfreHXq f1tugFLCFDhZcsffYIqxKNAB/FkNbBDslUTz0MMQfuRnkN6D5nLVQ0G2H3bWC6KByTZPZWhJ/jgs ChX3e/P5y0VReCUCYm0/pUQd1lQ4/aIty/YtW6y3WMHc8yazpcU8UuqqB+LfMql/wVx4kXNTwGQO PxTuL7+AhbSkWS4z0TdZFbo1BR6qQkA08DnogNNHey/SGc5GejqFttxhjBHd3rjd62nR08gnxeFr Ic2e52we+QC0rIg6KYn1AKQsbF3wcgAP00MZrZ6X0yc5v5TRXgTi/jtVwef5I6Y+J7kyb+d1eB6K 4LoOLphBW/8PdNW9dapKWXwAAAAASUVORK5CYII= Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at coe.ufrj.br Cc: kamal kc , freebsd , Giorgos Keramidas Subject: Re: allocating 14KB memory per packet compression/decompression results in vm_fault X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 12:45:47 -0000 Peter Jeremy wrote: >>what would be the best possible way to >>allocate/deallocate 14KB memory per packet without >>causing vm_faults ?? > > The most efficient way would be to statically allocate the dictionary > and string tables. The downside is that you then need to serialise > the [de]compression. I would suggest static allocation, also. I agree that malloc should not misbehave, but static allocation will surely be faster. And, if you have more than one CPU, you could allocate one static buffer per CPU to allow for parallelization. If you don't have more than one CPU, I think serialization will do no big harm. From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 3 19:00:22 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 82CCE16A41F; Thu, 3 Nov 2005 19:00:22 +0000 (GMT) (envelope-from nvidican@wmptl.com) Received: from wmptl.net (fw1.wmptl.com [216.8.159.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id DED0E43D49; Thu, 3 Nov 2005 19:00:21 +0000 (GMT) (envelope-from nvidican@wmptl.com) Received: from [10.0.0.104] (r3140ca.wmptl.net [10.0.0.104]) by wmptl.net (8.13.1/8.13.1) with ESMTP id jA3J0E96082805; Thu, 3 Nov 2005 14:00:14 -0500 (EST) (envelope-from nvidican@wmptl.com) Message-ID: <436A5E3E.7000809@wmptl.com> Date: Thu, 03 Nov 2005 14:00:14 -0500 From: Nathan Vidican User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: questions@freebsd.org Content-Type: multipart/mixed; boundary="------------070905080103060303030402" X-Spam-Score: 0.111 () RATWR10_MESSID X-Scanned-By: MIMEDefang 2.44 X-Mailman-Approved-At: Fri, 04 Nov 2005 13:23:27 +0000 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: nssldap@padl.com, hackers@freebsd.org Subject: nss_ldap-243 & FreeBSD/amd64 ... anyone? (build/errors/info attached) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Nov 2005 19:00:22 -0000 This is a multi-part message in MIME format. --------------070905080103060303030402 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Wasn't sure which list to post to entirely, so sorry if seems off-topic. I can't seem to get nss_ldap-243 to compile at all under FreeBSD-6.0RC1/amd64, nor under 5.3-RELEASE, nor 5.4-RELEASE... all produce similar errors, however my development machine happens to be FreeBSD 6.0RC1/amd64 at the moment (dual AMD Opteron 246 box, 2gb ECC Registered, 1.25TB RAID 5). Here's a brief transcript of what I've done/where I am at, a longer version including the output from make/configure/etc. My comments start with a # to help differentiate from output: # configure (with options as specified, openldap-2.3.11 compiled with --prefix=/usr/openldap, # installed, configured, and running with DB). configure exits clean and generates a makefile: wmptwo# ./configure CPPFLAGS="-I/usr/openldap/include -I/usr/include" LDFLAGS="-L/usr/openldap/lib -L/usr/lib" --with-ldap=openldap --prefix=/usr --with-ldap-dir=/usr/openldap wmptwo# # now we run make, and get our first errors in ldap-nss.c, a quick inspection shows ldap-nss.c calling CONSTs defined in wmptwo# make 25a26,29 > #ifndef MAXHOSTNAMELEN > #include > #endif > # now I run make again, aside from a whole bunch of compiler warnings about null arguments being passed/required, (see output attached) # ldap-nss.c compiles, now we get a whole new set of compiler errors in ldap-pwd.c, first error complains of UID_NOBODY not being # defined but still being called/used... closer look reveals UID_NOBODY defined in ldap-nss.h, but not being defined: wmptwo# make # so I try patching ldap-nss.h, and update #define UID_NOBODY to reflect the default UID for the user 'nobody' on a 'standard' FreeBSD installation: 446d445 < #ifndef HAVE_NSSWITCH_H 448,449c447 < #define UID_NOBODY (-2) < #endif --- > #define UID_NOBODY (65534) # again, I run make, this time clean first, this time we're moving further into ldap-pwd.c, but still producing fatal compiler errors # complaining about `structure has no member named `pw_comment'`, this is the point where I step back and wonder where to go next... # should I systematically continue to retry make after I try to find/fix every compiler error; will this introduce new errors, will the # code even work? wmptwo# Again, output of all the above is attached in a txt file, please fee free to take a look through. Has anyone out there been able to get nss_ldap to compile on FreeBSD; other than the patched/older dist included with the ports collection? Problem with the ports version (in my case) being the old(er) release of openldap/ldap librairies it depends on. Working out some issues with samba and nss here alltogether, needed to update openldap to get past some other un-related bugs. System still has openldap-2.2.9 installed from the ports collection for the nss_ldap, and pam_ldap that is currently running. Samba source code has been modified, compiled, and been in use for a while now running the new(er) openldap librairies installed into /usr/openldap. Just not sure where to go with nss_ldap here; havn't even begun trying to compile pam_ldap to use the new(er) openldap librairies either - but suspect I may run into similar issues. Any suggestions/guidance would be greatly appreciated at this point... kinda running out of things to try and can't really audit the entire source code for something I know little about the internals of. Thanx all -- Nathan Vidican nvidican@wmptl.com Windsor Match Plate & Tool Ltd. http://www.wmptl.com/ --------------070905080103060303030402-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 12:32:47 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 400AB16A41F; Fri, 4 Nov 2005 12:32:47 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms048pub.verizon.net (vms048pub.verizon.net [206.46.252.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id E441B43D49; Fri, 4 Nov 2005 12:32:46 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms064.mailsrvcs.net ([192.168.1.1]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IPF00AJOK6GKYV7@vms048.mailsrvcs.net>; Fri, 04 Nov 2005 06:32:40 -0600 (CST) Date: Fri, 04 Nov 2005 06:32:40 -0600 (CST) From: Sergey Babkin To: kamal kc , Giorgos Keramidas Message-id: <16844104.1131107560448.JavaMail.root@vms064.mailsrvcs.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailman-Approved-At: Fri, 04 Nov 2005 13:23:27 +0000 Cc: freebsd , freebsd Subject: Re: Re: allocating 14KB memory per packet compression/decompression results in v X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: babkin@users.sf.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 12:32:47 -0000 >From: kamal kc >since i am using the adaptive LZW >compression scheme it requires construction of string >table for compression/decompression. So an ip packet > of size 1500 bytes requires a table of size (4KB + > 4KB + 2KB =12KB). > >further still i copy the ip packet > data in another data buffer (about 1.4KB) and >then compress it. > >So all this adds up to about 14KB. > >Right now i can't do with less than 14KB. > >as i said before the compression/decompression works >fine. but soon the kernel would panic with one >of the vm_fault: error message. Most likely you overrun your buffer somewhere and damage some unrelated memory area. >what would be the best possible way to >allocate/deallocate 14KB memory per packet without >causing vm_faults ?? The best possible way is to not do it at all. Allocate you 14KB buffer once and then reuse it for every packet. Obviously, your code would have to be either single-threaded, or synchronize the access to the buffer, or use a separate buffer per CPU. >is there anything i am missing ?? Also an extra memory-to-memory copy is a bad idea. It hurts the performance. -SB From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 13:13:38 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 397D016A41F; Fri, 4 Nov 2005 13:13:38 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.95]) by mx1.FreeBSD.org (Postfix) with ESMTP id D9DB343D67; Fri, 4 Nov 2005 13:13:30 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) by kane.otenet.gr (8.13.4/8.13.4/Debian-1) with SMTP id jA4DDToE025194; Fri, 4 Nov 2005 15:13:29 +0200 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id jA4CoGdh001262; Fri, 4 Nov 2005 14:50:16 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id jA4CoGuB001261; Fri, 4 Nov 2005 14:50:16 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 4 Nov 2005 14:50:16 +0200 From: Giorgos Keramidas To: kamal kc Message-ID: <20051104125016.GA1235@flame.pc> References: <20051103145729.GA2088@flame.pc> <20051104065630.9592.qmail@web35704.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051104065630.9592.qmail@web35704.mail.mud.yahoo.com> X-Mailman-Approved-At: Fri, 04 Nov 2005 13:23:27 +0000 Cc: freebsd , freebsd Subject: Re: allocating 14KB memory per packet compression/decompression results in vm_fault X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 13:13:38 -0000 On 2005-11-03 22:56, kamal kc wrote: >>> for my compression/decompression i use string tables and >>> temporary buffers which take about 14KB of memory per >>> packet. >> >> If you're allocating 14 KB of data just to send >> (approximately) 1.4 KB >> and then you throw away the 14 KB immediately, it >> sounds terrible. > > yes that's true. > > since i am using the adaptive LZW compression scheme it > requires construction of string table for > compression/decompression. So an ip packet of size 1500 bytes > requires a table of size (4KB + 4KB + 2KB = 12KB). I may be stating the obvious or something totally wrong, but couldn't the string table be constructed once instead of each time a packet goes down? It is my intuition that this would perform much much better than re-doing the work of the string table each time a packet goes out. > what would be the best possible way to allocate/deallocate 14KB > memory per packet without causing vm_faults ?? Bearing in mind that packets may be as small as 34 bytes, there's no good way, IMHO. - Giorgos From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 14:08:39 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8479416A41F; Fri, 4 Nov 2005 14:08:39 +0000 (GMT) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEC3E43D45; Fri, 4 Nov 2005 14:08:38 +0000 (GMT) (envelope-from max@love2party.net) Received: from p54A3FCCD.dip.t-dialin.net [84.163.252.205] (helo=donor.laier.local) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis), id 0ML2Dk-1EY2F81CGZ-0008Gt; Fri, 04 Nov 2005 15:08:34 +0100 From: Max Laier To: freebsd-hackers@freebsd.org Date: Fri, 4 Nov 2005 15:08:15 +0100 User-Agent: KMail/1.8.2 References: <436A7474.4040501@sh.cvut.cz> <20051103.214104.62371333.imp@bsdimp.com> <20051104094643.S9692@fledge.watson.org> In-Reply-To: <20051104094643.S9692@fledge.watson.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1625918.NCegTV81GH"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200511041508.32729.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: Alexander Leidinger , Robert Watson Subject: Re: Kernel source hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 14:08:39 -0000 --nextPart1625918.NCegTV81GH Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 04 November 2005 10:47, Robert Watson wrote: > On Thu, 3 Nov 2005, M. Warner Losh wrote: > > : Also, is there a page with other tasks for kernel neophytes like me? I > > : looked for some such page but I couldn't find any. > > > > phk used to have a /jkh/ page, or Junior Kernel Hacker page. Don't know > > if that's still that way or not. > > Now that we have a FreeBSD Developer wiki, it may make sense to move the > page there so it can be more easily reached and maintained by a broader > set of developers? http://www.freebsd.org/news/status/report-mar-2005-june-2005.html#TODO-list= =2Dfor-volunteers Not sure what the current status of the above is ... =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart1625918.NCegTV81GH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDa2tgXyyEoT62BG0RAlAmAJ9cUpGRV1ivdTAbEEMfbk5TwReA4QCfbwr+ h1XT3P01spK3UOyQQG4pl+4= =dXHn -----END PGP SIGNATURE----- --nextPart1625918.NCegTV81GH-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 15:02:31 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E445916A41F; Fri, 4 Nov 2005 15:02:31 +0000 (GMT) (envelope-from netchild@FreeBSD.org) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6451743D45; Fri, 4 Nov 2005 15:02:29 +0000 (GMT) (envelope-from netchild@FreeBSD.org) Received: from Andro-Beta.Leidinger.net (p54A5E2E2.dip.t-dialin.net [84.165.226.226]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.1/8.13.1) with ESMTP id jA4Eeeeh039515; Fri, 4 Nov 2005 15:40:41 +0100 (CET) (envelope-from netchild@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by Andro-Beta.Leidinger.net (8.13.3/8.13.3) with ESMTP id jA4F22Ic016879; Fri, 4 Nov 2005 16:02:02 +0100 (CET) (envelope-from netchild@FreeBSD.org) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by netchild.homeip.net (Horde MIME library) with HTTP; Fri, 04 Nov 2005 16:02:01 +0100 Message-ID: <20051104160201.fpz6q922g44800ws@netchild.homeip.net> X-Priority: 3 (Normal) Date: Fri, 04 Nov 2005 16:02:01 +0100 From: Alexander Leidinger To: Max Laier References: <436A7474.4040501@sh.cvut.cz> <20051103.214104.62371333.imp@bsdimp.com> <20051104094643.S9692@fledge.watson.org> <200511041508.32729.max@love2party.net> In-Reply-To: <200511041508.32729.max@love2party.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_5g1a28rshqg4" Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0.3) / FreeBSD-4.11 X-Virus-Scanned: by amavisd-new Cc: freebsd-hackers@FreeBSD.org, Robert Watson , brueffer@FreeBSD.org Subject: Re: Kernel source hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 15:02:32 -0000 This message is in MIME format. --=_5g1a28rshqg4 Content-Type: text/plain; charset=UTF-8; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit Max Laier wrote: > On Friday 04 November 2005 10:47, Robert Watson wrote: >> On Thu, 3 Nov 2005, M. Warner Losh wrote: >> > : Also, is there a page with other tasks for kernel neophytes like me? I >> > : looked for some such page but I couldn't find any. >> > >> > phk used to have a /jkh/ page, or Junior Kernel Hacker page. Don't know >> > if that's still that way or not. >> >> Now that we have a FreeBSD Developer wiki, it may make sense to move the >> page there so it can be more easily reached and maintained by a broader >> set of developers? > > http://www.freebsd.org/news/status/report-mar-2005-june-2005.html#TODO-list-for-volunteers > > Not sure what the current status of the above is ... A version of the TODO list for volunteers is scheduled to be reviewed/reformatted by brueffer after 6.0-RELEASE (and I already have several things I want to add to it after it's reviewed). I don't think he will mind if someone else with doc-Fu is willing to pull this item from his TODO list. My intend is to make the page available parallel to the SoC page, so every committer can modify it. I didn't do the work in the wiki, since the wiki has some kind of test-status. The wiki is also not visible from www.freebsd.org (linking to the wiki from internal/developer.html doesn't count here in my eyes), so listing nice TODO items there isn't the way to go for something which is suppoosed to lure people into producing shiny features. I've attached the version which is available to brueffer for review (the other items I want to add are spread as "idea snippets" over my mailbox folders somewhere). If someone is willing to take one of the items, the "Port DragonFly's IP checksum code" is done and will be committet (RSN, I think). Bye, Alexander. -- http://www.Leidinger.net/ Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org/ netchild @ FreeBSD.org : PGP ID = 72077137 Ignorance is bliss. -- Thomas Gray Fortune updates the great quotes, #42: BLISS is ignorance. --=_5g1a28rshqg4 Content-Type: text/plain; charset=UTF-8; name="volunteerTODO.sgml.txt" Content-Disposition: attachment; filename="volunteerTODO.sgml.txt" Content-Transfer-Encoding: 7bit %includes; %developers; ]> &header;

Project Ideas

Userland / Installation Tools

  • Small sysinstall renovation:

    • Ask for country & keyboard layout at start - so intl keyboards work correctly.
    • Ask for network config before install - so you don't have to config the net twice.
    • Get hostname from dhcp server too.
    • Make a guess of the timezone based upon country & keyboard.
    • Write the FreeBSD version at the top of the dispaly (or somewhere similar visible) - so lazy users know what they are installing (version: release, stable, snapshot + arch: i386, amd64, etc) even when the CD is unlabeled.
    • Other usability improvements not yet thought of.

    Requirements:

    • Good C knowledge (reading and writting).
    • No fear regarding "naturally grown" code.

  • Bundled PXE Installer:

    It would be great to have a bundled PXE installer. This would allow one to boot an install server from a FreeSBIE live CDROM on one box, set the BIOS on subsequent boxes to PXE boot, and then have the rest happen by magic. This would be very helpful for installing cluster nodes, etc.

    Requirements:

    • Good PXE knowledge.

  • Improve our regression testing system:

    Nik Clayton has written a regression test infrastructure using Perl. More of the regression tests should be made to work with libtap.

    • Many of the existing tests should be moved from using assert() to using ok() and friends from libtap.
    • More regression tests should be written.

    Requirements:

    • Good knowledge of scripting languages (perl preferred).
    • Good knowledge of software testing.

    Willing to mentor: &a.nik;

  • Tracking performance over time:

    One of the major issues in a project the size of FreeBSD is monitoring changes in performance characteristics over time. Doing this requires several things. Those include a suite of appropriate tests, hardware to run the tests on, a database to store results in, and software to extract intresting results and display them. Solving the whole problems is probably beyond the scope of one summer's work, but an intresting subset should be managable.

    Willing to mentor: &a.brooks;

Filesystem

  • Autofs:

    Create the autofs filesystem from a specification. Most of this work is done, however kernel transport and interaction with the "amd" automounter needs to be completed.

    Requirements:

    • Knowledge of filesystems and network filesystems.
    • Good knowledge of C.

    Willing to mentor: &a.alfred;

  • Logical Volume Manager
  • Implement Magic Symlinks: Experimental patches exist against 4-STABLE, though the DragonFly implementation using the setvar utility should be examined (interesting files in the DragonFly CVS: sys/kern/init_sysent.c, sys/kern/kern_varsym.c, sys/kern/syscalls.c, sys/kern/syscalls.master, sys/kern/vfs_lookup.c, sys/sys/syscall-hide.h, sys/sys/syscall.h, sys/sys/syscall.mk, sys/sys/sysproto.h, sys/sys/sysunion.h, bin/varsym/varsym.1, bin/varsym/varsym.c). &a.jwd; can coordinate.

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • Some filesystem knowledge.

  • Fix the ext2fs umount problem:

    If an ext2fs is mounted at shutdown time no clean shutdown is possible. The next boot has to fsck the filesystems. If the ext2fs is umounted before the shutdown of the system, everything is fine.

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.

  • Implement NTFS write support:

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • Very good knowledge of the NTFS.

  • Fix mdfs lockups when using non-sync operation modes:

    Rev. 1.115 of md.c has a discussion of the problem.

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • Knowledge of the VFS and VMA subsystems.

Networking

  • Port DragonFly's IP checksum code:

    Our current IP checksum code for x86 CPUs is written in assembly language and has some flaws which prevent its use with Intels C/C++ compiler. Those flaws may soner or later result in broken code with gcc too. Other architectures use C versions of the code. DragonFly's IP checksum code is better suited for modern cpus and should at least be as good as the previous code, while being more portable. Interesting files to look at in the DragonFly CVS are sys/netinet/in_cksum.c, sys/sys/in_cksum.h, sys/netinet/igmp.c, sys/netinet/in.h, sys/netinet/ip_icmp.c and sys/i386/i386/in_cksum2.s.

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • Maybe knowledge of at least i386 assembly language.

  • Add zeroconf (Rendezvous/Bonjour) support to FreeBSD:

    • Find/write a suitable zeroconf implementation.
    • Add zeroconf support to the basesystem daemons.

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.

  • Modernize ISDN4BSD:

    • Refactor i4b to allow to implement locking.
    • Modernize the use of kernel APIs in i4b, e.g. use busspace(9).
    • Test/fix it on amd64.
    • Determine the requirements of external software like asterisk and add missing interfaces.
    • Write/add drivers which get recommended by asterisk.

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • Knowledge about ISDN.
    • Knowledge about device driver APIs.
    • A good understanding of the FreeBSD locking methods.

  • Network Disk Device:

    Add the ability to remotely access devices from one system to another. The goal is to allow remote access to resources such as disks, sound devices, and other miscellaneous pieces of hardware over the network. This project would be a good resume builder, but is not for the faint of heart.

    Requirements:

    • Understanding or interest in remote procedure call systems.
    • Understanding or interest in networking (TCP/IP).
    • Interest to learn how Unix device drivers work as well as process management.

    Willing to mentor: &a.alfred;

  • NFS Lockd (improve semantics):

    • Improve the semantics of the NFS lockd in FreeBSD. Apple has made certain enhancements that can be leveraged in our code base.
    • Implement state recovery in the lockd.

    Requirements:

    • Good knowledge of C.

    Willing to mentor: &a.alfred;

  • NFS Lockd (kernel implementation):

    Moving the lockd implementation into the kernel provides several key performance and semantic improvements.

    Requirements:

    • Good knowledge of C.
    • Good understanding of NFS.
    • Good understanding of locking.
    • Good understanding of RPC.
    • Good understanding of kernel level networking.

    Willing to mentor: &a.alfred;

  • Web100 port to FreeBSD:

    The Web100 project was created to address the problems of TCP performance over long-fat network pipes. They created an interesting set of tuning and monitoring patches for Linux which enable significantly better performance in this area. Integrating this work into FreeBSD could provide significant benefits in terms of TCP performance in certain environments.

    Requirements:

    • Good knowledge of C.
    • The features of Web100 need to be mapped into appropriate FreeBSD abstractions and integrated into the system.
    • The performance impact of these changes would have to be quantified before the changes could be introduced.
    • Good understanding of the TCP protocol.
    • Good understanding of kernel interfaces.

    Willing to mentor: &a.brooks;

Security

  • SecureMines:

    Add meta-data to the system in order to trap intruders and provide an audit log. The goal of this project is to create several means of marking an event as a foreign act (such as opening a trap file) which halts the system and provides as much information as possible, possibilities include using extended attributes to tag such "mines".

    Requirements:

    • Good knowledge of C.
    • Good understanding of the Unix process model.
    • Good understanding of the FreeBSD kernel.

    Willing to mentor: &a.alfred;

Kernel

  • Useable lock implementation with SX-semantics:

    The current sx(9) implementation has several problems that make it unusable in many areas: Might sleep (cv_wait) on the shared lock acquisition, implicit, hardcoded priority order without starvation protection, ... There are several handrolled lock implementations with SX-semantics in the tree already that solve some of the problems in their specific domain: MAC, pfil, ipfw, if_bridge, ...

    • Review existing uses of non-standard sx-locks.
    • Design an API useable to replace most/all of the handrolled hacks or find an existing API to do the same.
    • Write the actual code.

    Requirements:

    • C knowledge.
    • Knowledge about shared/exclusive locking in SMP systems.

    Willing to mentor: &a.mlaier;

  • Document as much sysctl's as possible:

    The sysctl(8) utility retrieves kernel state and allows processes with appropriate privilege to set kernel state. On request it is able to display description lines which document the kernel state. Unfortunately not every sysctl is documented.

    • Find every undocumented sysctl in the kernel.
    • Try to determine what this sysctl is for and document it.
    This task is shareable with other volunteers.

    Requirements:

    • Ability to read and understand foreign C code.

  • Document the sound subsystem:

    • Add sound subsystem related section 9 man-pages, so far no sound subsystem related pages are there yet.
    • Add an example driver in share/examples which allows to write a new driver. For this purpose the example driver should contain enough documentation as comments and/or pointers to documentation in man-section 9. This work can be based upon http://people.freebsd.org/~cg/template.c
    • Rewrite the Sound subsystem chapter in the FreeBSD Architecture Handbook. The rewrite should contain an overview of the available parts in the sound subsystem and how they interact (data flow, dependencies, ...) and fit together. Additionally it should contain links to already available documentation (official standards, section 9 man-pages, ...).

    Requirements:

    • Ability to read and understand foreign C code.
    • Documentation writting skills.

    Willing to mentor: &a.netchild;, &a.matk;

  • Syncing with the 4Front Technologies OSS v4 API:

    4Front Technologies will go live with an improved OSS API in the near future and we're discussing syncing with this API at multimedia@. 4Front Technologies offered assistance. A volunteer would have to:

    • Add the necessary interfaces.
    • Add appropriate code to the sound subsystem/drivers where possible.
    • Document the work (man pages, maybe Sound subsystem chapter in the FreeBSD Architecture Handbook, maybe extending the example driver). This part overlaps with the Sound subsystem documentation project. Maybe 4Front is willing to donate parts of their documentation. Coordination regarding this is required.
    • Use the improved API in our userland programs where it is beneficial.

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • At least one supported soundcard.

    Willing to mentor: &a.netchild;

  • Implement the necessary kernel interface for 4Front Technologies ALSA to OSS wrapper (SALSA):

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • At least one supported soundcard.

    Willing to mentor: &a.netchild;

  • Improve the locking of the sound system:

    Only parts of the sound system provide fine grained locking yet.

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • A good understanding of the FreeBSD locking methods.

  • Add High Definition Audio (HDA) support to our sound system:

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • HDA soundcard.

  • Implement a generic input device layer:

    The kernel is lacking a generic input device layer analog to the Linux 'input core' layer. Having such a layer would make it easy to write e.g. touchscreen support (&a.philip; has some work-in-progress regarding pointer devices and touchscreen support, but not enough time to also cover keyboard support or other generic features).

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.

    Willing to mentor: &a.philip;

  • Add locking to the CAM layer

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • Kowledge about SCSI.
    • A good understanding of the FreeBSD locking methods.

  • Implement iSCSI

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • Kowledge about (i)SCSI/CAM.

  • Port DragonFly's process checkpointing:

    Process checkpointing allows to migrate some processes to other machines or to let some processes "survive" a reboot (subject to some constraints). Interesting files in the DragonFly CVS are sys/sys/ckpt.h, sys/checkpt/* and sys/kern/imgact_elf.c.

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.

  • Evaluate and perhaps port DragonFly's optimized memcpy/bcopy/bzero support subsystem (this includes a FPU subsystem overhault):

    Interesting files in the DragonFly CVS are sys/i386/gnu/fpemul/fpu_system.h, sys/i386/i386/bcopy.s, sys/i386/i386/genassym.c, sys/i386/i386/globals.s, sys/i386/i386/machdep.c, sys/i386/i386/math_emu.h, sys/i386/i386/mp_machdep.c, sys/i386/i386/pmap.c, sys/i386/i386/support.s, sys/i386/i386/swtch.s, sys/i386/i386/trap.c, sys/i386/i386/vm86bios.s, sys/i386/i386/vm_machdep.c, sys/i386/include/asmacros.h, sys/i386/include/globaldata.h, sys/i386/include/md_var.h, sys/i386/include/npx.h, sys/i386/include/pcb.h, sys/i386/include/thread.h sys/i386/isa/npx.c, sys/i386/i386/bcopy.s and sys/i386/i386/bzero.s. A more detailed writeup can be found in this compressed file. This includes a mail from Matthew Dillon with suggestions how to do this in FreeBSD (including a small benchmark which shows 35%-55% speed improvement for at least those benchmarks).

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • Knowledge of at least i386/MMX/XMM assembly.
    • A good understanding of the FreeBSD SMP system.
    • Roughly 6 weeks of free time.

  • Sync our i386 boot code with DragonFly's boot code:

    DragonFly invested alot of time to clean-up and document it. Additionally they fixed some bugs. Interesting files in the DragonFly CVS are sys/boot/i386/bootasm.h, sys/boot/i386/bootasmdef.c, sys/boot/boot0/*, sys/boot/boot2/*, sys/boot/i386/btx/*, sys/boot/i386/cdboot/*, sys/boot/i386/libi386/amd64_tramp.S, sys/boot/i386/libi386/biosdisk.c and sys/boot/i386/loader/main.c. An interested volunteer has to compare both implementations and port over interesting/good parts.

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • Knowledge of i386 assembly.
    • Knowledge of BIOS interfaces.
    • Knowledge of low-level boot behavior.

  • Fix the CPU usage display in top for threaded processes:

    The current kernel statistics do not know how to calculate the CPU usage of threaded processes. A volunteer has to understand the current statistics model, design a new statistics model and implement it.

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • A good understanding of the FreeBSD SMP system.

  • Implement PCI-Hotplug support

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • A good understanding of low-level access of the hardware.
    • A good understanding of the FreeBSD device drivers.

  • Implement something similar to Solaris' dtrace

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • A good understanding of the FreeBSD kernel.

  • Add amd64 native support to thee Linuxulator:

    FreeBSD provides Linux binary compatibility through a Linux system call table that is invoked when Linux ELF binaries are executed. The implementation on amd64 machines only provides support for 32bit (x86) executables.

    • Determine a way how to distinguish between 32 bit and 64 bit applications when entering a system call.
    • Design and implement 64 bit support while keeping 32 bit support.
    This needs to be coordinated with the emulation mailinglistregarding the userland part of the linuxolator.

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • A good understanding of how to do a clean room implementation of GPLed code (no copy & paste!).

  • Annotate every assembler file [*.[sS]] with dwarf2 call frame information:

    A debug kernel is not able anymore to show stack traces which cross exceptions. This is because we do not emit any dwarf2 call frame information for any assembler code, since gdb switched to the dwarf2 format.

    Requirements:

    • Knowledge of assembly code.
    • Knowledge of ".cfa_*" pseudo-ops to insert dwarf2 frame descriptors.

  • Update the Linuxulator:

    FreeBSD provides Linux binary compatibility through a Linux system call table that is invoked when Linux ELF binaries are executed. This implementation should be compared with an up-to-date Linux Kernel so that important missing syscalls can be added to ensure that all mainstream applications continue to work on FreeBSD.

    Requirements:

    • Ability to read and understand foreign C code.
    • Ability to write C code.
    • A good understanding of how to do a clean room implementation of GPLed code (no copy & paste!).

  • Implement passive cooling in ACPI thermal:

    The cpufreq interface should be used to cool the processor, based on the various _PSV settings. Also, we need to implement variable polling intervals for thermal zones based on both the passive settings and polling explicitly specified in the ASL.

    Requirements:

    • Good knowledge of C.
    • Understanding of the hardware/software interface.
    • A laptop that works with ACPI.
    • Kernel awareness.

    Willing to mentor: &a.njl; and &a.bruno;

  • Suspend to disk:

    Implement a suspend/resume from disk mechanism. Possibly use the dump functions to dump pages to disk, then use ACPI to put the system in S4 or power-off. Resume would require changes to the loader to load the memory image directly and then begin executing again.

    Requirements:

    • Good knowledge of C.
    • Understanding of the hardware/software interface.
    • A laptop that works with ACPI.
    • Kernel awareness.

    Willing to mentor: &a.njl; and &a.bruno;

Additional projects may be found by browsing the FreeBSD Development Projects page (the most prominent projects are the FreeBSD ACPI project, C99 & POSIX Conformance Project, Large data storage in FreeBSD, Network Performance Project, Network Cleanup and Consolidation Project and the busdma and SMPng driver conversion Project, but don not forget to have a look at the other projects too) or by viewing some of the recent Developer Status Reports.

Mentors

If you are interested in working on a project not explicitly mentioned above, you may want to contact one of the potential mentors below about writing a proposal in one of the following broad categories.

&footer; --=_5g1a28rshqg4-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 15:48:13 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A665E16A41F for ; Fri, 4 Nov 2005 15:48:13 +0000 (GMT) (envelope-from scottl@FreeBSD.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 094C643D46 for ; Fri, 4 Nov 2005 15:48:12 +0000 (GMT) (envelope-from scottl@FreeBSD.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id jA4FmAln051471; Fri, 4 Nov 2005 08:48:10 -0700 (MST) (envelope-from scottl@FreeBSD.org) Message-ID: <436B82B9.9090503@FreeBSD.org> Date: Fri, 04 Nov 2005 08:48:09 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org Content-Type: multipart/mixed; boundary="------------090302060809050707080802" X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: Eugenia Loli-Queru , hemos@slashdot.org Subject: FreeBSD 6.0 Released X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 15:48:13 -0000 This is a multi-part message in MIME format. --------------090302060809050707080802 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit --------------090302060809050707080802 Content-Type: text/plain; name="6.0-announce.txt.asc" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="6.0-announce.txt.asc" -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 It is my great pleasure and privilege to announce the availability of FreeBSD 6.0-RELEASE. This release is the next step in delivering the high performance and enterprise features that have been under development in the FreeBSD 5.x series for that last several years. Some of the many changes since 5.4 include: ~ Significant performance improvements to the filesystem and direct disk access layers of the OS. The filesystem is now multithreaded and can take full advantage of multiple CPU systems. ~ Expanded support for wireless networking adapters and new support for the WPA wireless security protocol. ~ Experimental support for the PowerPC platform. For a complete list of new features and known problems, please see the release notes and errata list, available at: http://www.FreeBSD.org/releases/6.0R/relnotes.html http://www.FreeBSD.org/releases/6.0R/errata.html For more information about FreeBSD release engineering activities, please see: http://www.FreeBSD.org/releng Availability ------------- FreeBSD 6.0-RELEASE supports the i386, pc98, alpha, sparc64, amd64, powerpc, and ia64 architectures and can be installed directly over the net using bootable media or copied to a local NFS/FTP server. Distributions for all architectures are available now. Please continue to support the FreeBSD Project by purchasing media from one of our supporting vendors. The following companies will be offering FreeBSD 6.0 based products: ~ FreeBSD Mall, Inc. http://www.freebsdmall.com/ ~ Daemonnews, Inc. http://www.bsdmall.com/freebsd1.html If you can't afford FreeBSD on media, are impatient, or just want to use it for evangelism purposes, then by all means download the ISO images. We can't promise that all the mirror sites will carry the larger ISO images, but they will at least be available from the following sites. MD5 and SHA256 checksums for the release images are included at the bottom of this message. Bittorrent ---------- The FreeBSD project encourages the use of BitTorrent for distributing the release ISO images. A collection of torrent files to download the images is available at ftp://ftp.freebsd.org/pub/FreeBSD/torrents/6.0-RELEASE FTP --- At the time of this announcement the following FTP sites have FreeBSD 6.0-RELEASE available. ftp://ftp.FreeBSD.org/pub/FreeBSD/ ftp://ftp2.FreeBSD.org/pub/FreeBSD/ ftp://ftp3.FreeBSD.org/pub/FreeBSD/ ftp://ftp5.FreeBSD.org/pub/FreeBSD/ ftp://ftp.at.FreeBSD.org/pub/FreeBSD/ ftp://ftp2.ch.FreeBSD.org/pub/FreeBSD/ ftp://ftp.cz.FreeBSD.org/pub/FreeBSD/ ftp://ftp.ee.FreeBSD.org/pub/FreeBSD/ ftp://ftp.es.FreeBSD.org/pub/FreeBSD/ ftp://ftp.fi.FreeBSD.org/pub/FreeBSD/ ftp://ftp.fr.FreeBSD.org/pub/FreeBSD/ ftp://ftp2.ie.FreeBSD.org/pub/FreeBSD/ ftp://ftp.is.FreeBSD.org/pub/FreeBSD/ ftp://ftp5.pl.FreeBSD.org/pub/FreeBSD/ ftp://ftp3.ru.FreeBSD.org/pub/FreeBSD/ ftp://ftp.se.FreeBSD.org/pub/FreeBSD/ ftp://ftp.si.FreeBSD.org/pub/FreeBSD/ ftp://ftp2.tw.FreeBSD.org/pub/FreeBSD/ ftp://ftp.uk.FreeBSD.org/pub/FreeBSD/ ftp://ftp2.us.FreeBSD.org/pub/FreeBSD/ ftp://ftp5.us.FreeBSD.org/pub/FreeBSD/ FreeBSD is also available via anonymous FTP from mirror sites in the following countries: Argentina, Australia, Brazil, Bulgaria, Canada, China, Czech Republic, Denmark, Estonia, Finland, France, Germany, Hong Kong, Hungary, Iceland, Ireland, Japan, Korea, Lithuania, Amylonia, the Netherlands, New Zealand, Poland, Portugal, Romania, Russia, Saudi Arabia, South Africa, Slovak Republic, Slovenia, Spain, Sweden, Taiwan, Thailand, Ukraine, and the United Kingdom. Before trying the central FTP site, please check your regional mirror(s) first by going to: ftp://ftp..FreeBSD.org/pub/FreeBSD Any additional mirror sites will be labeled ftp2, ftp3 and so on. More information about FreeBSD mirror sites can be found at: http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/mirrors-ftp.html For instructions on installing FreeBSD, please see Chapter 2 of The FreeBSD Handbook. It provides a complete installation walk-through for users new to FreeBSD, and can be found online at: http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/install.html Acknowledgments ---------------- Many companies donated equipment, network access, or man-hours to finance the release engineering activities for FreeBSD 6.0 including The FreeBSD Foundation, FreeBSD Systems, Hewlett-Packard, Yahoo!, Sentex Communications, and SPARTA. The release engineering team for 6.0-RELEASE includes: Scott Long Release Engineering, I386 and AMD64 Release Building Ken Smith Sparc64 Release Building, Mirror Site Coordination Robert Watson Release Engineering, Security Doug White Release Engineering Murray Stokely Release Engineering Marcel Moolenaar IA64 Release Building Takahashi Yoshihiro PC98 Release Building Wilko Bulte Alpha Release Building Peter Grehan PowerPC Release Building Kris Kennaway Package Building Joe Marcus Clark Package Building Kiril Ponomarew Package Building Colin Percival Security Officer CD Image Checksums ------------------ For Alpha: MD5 (6.0-RELEASE-alpha-bootonly.iso) = 98499535a511e85ae5afe4542b6fd7f3 MD5 (6.0-RELEASE-alpha-disc1.iso) = c8f316202b221035086a08709bc011a6 SHA256 (6.0-RELEASE-alpha-bootonly.iso) = 2fcc391dc123baaeaba34f4f925a22223f209d63260d9283d6ba77227bb23dbd SHA256 (6.0-RELEASE-alpha-disc1.iso) = c71d06359a0dc0c6efb3aa9b40c80df62e359716454aaaf672556638b81b498a For amd64: MD5 (6.0-RELEASE-amd64-bootonly.iso) = 4328c66c900ef6e6ddc1daf9dd8b731f MD5 (6.0-RELEASE-amd64-disc1.iso) = a4e427adaa2bfef868e2bc62d57fbf8d MD5 (6.0-RELEASE-amd64-disc2.iso) = 2f46d344681c1a82b146b3ed1df68e61 SHA256 (6.0-RELEASE-amd64-bootonly.iso) = afa6eb02845185d1968cce02e752614394f8b9c09fc519ae1b61356c583d6df0 SHA256 (6.0-RELEASE-amd64-disc1.iso) = 449b08c98acc73508219e2a19de0787334fd9237123346b2c7949c3009540170 SHA256 (6.0-RELEASE-amd64-disc2.iso) = 25c3e3da1f2e0a0ecb8a23dd78f35f969cc17eba6072db6a41edab3ecfc2e2d4 For i386: MD5 (6.0-RELEASE-i386-bootonly.iso) = d71afd22be9ea7fe28e026575cbbb878 MD5 (6.0-RELEASE-i386-disc1.iso) = cfe3c1a2b4991edd6a294ca9b422b9d5 MD5 (6.0-RELEASE-i386-disc2.iso) = 1003806d98cd60ba4b672f4ca546ced3 SHA256 (6.0-RELEASE-i386-bootonly.iso) = 97ee1c1ffc2774c1c2cdc63ed8820fd3aedf7f0b5bb6273b87e40a05e00b2d1f SHA256 (6.0-RELEASE-i386-disc1.iso) = 0ad601dae704e941beb7d4617bf96b04055849a24835275c716f518eee7a12f1 SHA256 (6.0-RELEASE-i386-disc2.iso) = 1a82de4ff6733ee782da8df80cf66cf47266eefdb9f76cd19bf08063539c1aa0 For ia64: MD5 (6.0-RELEASE-ia64-bootonly.iso) = 3246ae501dac0067d4085e216fcf376a MD5 (6.0-RELEASE-ia64-disc1.iso) = e2fbb0e3b19a26e0b2e72bb8c13a57e9 MD5 (6.0-RELEASE-ia64-disc2.iso) = 2f5bbe94ec1438ecaa0b08915500d605 MD5 (6.0-RELEASE-ia64-livefs.iso) = cb227ea0e1db6873dbcb56249bf45418 SHA256 (6.0-RELEASE-ia64-bootonly.iso) = 9e6d502f32b5dc2cfc3d2af69d1512eb0476e6320851b3ecb5918977780c3cda SHA256 (6.0-RELEASE-ia64-disc1.iso) = fd9aaee8417a1701ebc72db6cd86d15f23738e743149f8a8cb9f6547ab5f336d SHA256 (6.0-RELEASE-ia64-disc2.iso) = 65618e4547ef7f5238a4987622d34e3f05200b4d6d9c0affbca8931b317197d1 SHA256 (6.0-RELEASE-ia64-livefs.iso) = 3e2e689318f05e9946ad24f443019256e73459bb2000be6b9aaf96c7ec1eaae8 For pc98: MD5 (6.0-RELEASE-pc98-disc1.iso) = 5ec7737af58ed3a2618523721dc17cec For powerpc: MD5 (6.0-RELEASE-powerpc-bootonly.iso) = 09219f4db3d3b94528413901757d2e49 MD5 (6.0-RELEASE-powerpc-disc1.iso) = 2ad675f7e4010c51f173e6c636b18b76 SHA256 (6.0-RELEASE-powerpc-bootonly.iso) = 530db1240a5fc4ae4e91b589630ad74c04eab9113b752c0d101f8dc9d14236ba SHA256 (6.0-RELEASE-powerpc-disc1.iso) = a7242065cca689d95c0c3611b1d8fdc38bb1c8b5207bc985289c46bcf75e7e00 For sparc64: MD5 (6.0-RELEASE-sparc64-bootonly.iso) = cf6423fe3c344827fc4a0fb179e0e375 MD5 (6.0-RELEASE-sparc64-disc1.iso) = 5ef7031b720f18bad2e216fb373c8da7 MD5 (6.0-RELEASE-sparc64-disc2.iso) = 31045ae89c097003fe06f77d0ee97227 SHA256 (6.0-RELEASE-sparc64-bootonly.iso) = 17f1849d89bc98107bddc2b86c5b18f33dbc33351e388ea7003efadda6c575b4 SHA256 (6.0-RELEASE-sparc64-disc1.iso) = a212e35e8d016908ec9bc431c66c393ca7e43823aeb7b3333266420ef1b7380c SHA256 (6.0-RELEASE-sparc64-disc2.iso) = 66ed27a2cb202b4249e00bad73609bfc4ffea4fcae8f941a30eb4b90bc0e43a9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDa35dHTr20QF8Xr8RAt7CAJ4riJYL86TdkABalT/tYtCE8KkHlgCdHaMt 1b/M8EpWPpGZf7wH7KC07Zs= =7uAG -----END PGP SIGNATURE----- --------------090302060809050707080802-- From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 21:56:27 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D64516A41F for ; Fri, 4 Nov 2005 21:56:27 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 936A543D45 for ; Fri, 4 Nov 2005 21:56:26 +0000 (GMT) (envelope-from joseph.koshy@gmail.com) Received: by xproxy.gmail.com with SMTP id s9so935573wxc for ; Fri, 04 Nov 2005 13:56:25 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=L0PXpylIHB9Wl757b118fKVDF9I78Sf3UpggRkwX83zYLVhs3J7mtn7QqY/4UPOgzRXX8b5bEK5w0YTcHUENaCGcwDtcoKo5RWTbBivf0FGTCGzSxdcv36pixthGMj907nf52oTKruIuMY7JtagRAhEyFydcL9MrEJ/YyX2uy/8= Received: by 10.70.103.10 with SMTP id a10mr1905985wxc; Fri, 04 Nov 2005 05:03:27 -0800 (PST) Received: by 10.70.105.13 with HTTP; Fri, 4 Nov 2005 05:03:27 -0800 (PST) Message-ID: <84dead720511040503qdcf3940q7ff6e732b937b9e8@mail.gmail.com> Date: Fri, 4 Nov 2005 18:33:27 +0530 From: Joseph Koshy To: kamal kc In-Reply-To: <20051103023936.63209.qmail@web35704.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20051103023936.63209.qmail@web35704.mail.mud.yahoo.com> Cc: freebsd , freebsd Subject: Re: allocating 14KB memory per packet compression/decompression results in vm_fault X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 21:56:27 -0000 > - Am I not following the correct procedures to > allocate and deallocate memory in kernel space ?? > - Or is the problem elsewhere ?? You didn't say whether you've checked your code for buffer overruns. If the fault is happening in seemingly unrelated parts of the kernel with your module is enabled, this could be a root cause. -- FreeBSD Volunteer, http://people.freebsd.org/~jkoshy From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 22:21:13 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E701316A41F; Fri, 4 Nov 2005 22:21:12 +0000 (GMT) (envelope-from SRS0=iBhji9T3=ZD=metro.cx=fbsd@sonologic.nl) Received: from mx1.sonologic.nl (mx1.sonologic.nl [82.94.245.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26ACD43D48; Fri, 4 Nov 2005 22:21:11 +0000 (GMT) (envelope-from SRS0=iBhji9T3=ZD=metro.cx=fbsd@sonologic.nl) Received: from [10.1.4.2] (sonolo.xs4all.nl [80.126.206.91]) (authenticated bits=0) by mx1.sonologic.nl (8.13.3/8.13.3) with ESMTP id jA4ML5Zk078298; Fri, 4 Nov 2005 22:21:05 GMT Message-ID: <436BDED4.1050408@metro.cx> Date: Fri, 04 Nov 2005 23:21:08 +0100 From: Koen Martens Organization: Sonologic User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050317 Thunderbird/1.0.2 Mnenhy/0.7.2.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robert Watson References: <2B3B2AA816369A4E87D7BE63EC9D2F269B7B4D@SDCEXCHANGE01.ad.amcc.com> <432F1310.80007@metro.cx> <20050920153806.F34322@fledge.watson.org> <433FF87C.3090101@metro.cx> <20051005090715.D84936@fledge.watson.org> In-Reply-To: <20051005090715.D84936@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Helo-Milter-Authen: gmc@sonologic.nl, fbsd@metro.cx, mx1 Received-SPF: pass (mx1.sonologic.nl: 80.126.206.91 is authenticated by a trusted mechanism) Cc: Koen Martens , freebsd-hackers@FreeBSD.org, Dimitry Andric , Vinod Kashyap , jhb@FreeBSD.org Subject: Re: panic in propagate_priority w/ postgresql under heavy load X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 22:21:13 -0000 Robert Watson wrote: > > On Sun, 2 Oct 2005, Koen Martens wrote: > >> kernel trap 12 with interrupts disabled >> >> >> Fatal trap 12: page fault while in kernel mode >> cpuid = 1; apic id = 06 >> fault virtual address = 0x24 >> fault code = supervisor read, page not present >> instruction pointer = 0x8:0xc051c253 >> stack pointer = 0x10:0xe93efb3c >> frame pointer = 0x10:0xe93efb50 >> code segment = base 0x0, limit 0xfffff, type 0x1b >> = DPL 0, pres 1, def32 1, gran 1 >> processor eflags = resume, IOPL = 0 >> current process = 6092 (postgres) >> >> And that, that is all.. No ddb> no 'dumping xxxxMB', just that. So >> basically, i fear this is a non-debugable problem, since putting in >> witness and such slows the kernel to a point where the panic does not >> occur anymore (at least, not in the 4 weeks i've been running the box >> with witness & invariants). Clueless :) > > > This looks like a NULL pointer dereference in kernel code. Probably, > this is not a locking problem, so running without WITNESS to debug > this should be OK. Are you using a serial console? If not, you might > find that it increases the reliability of entering DDB. If this box > is an SMP box, you may also want to add options KDB_STOP_NMI to your > kernel config. > > Using gdb, could you work out what function 0xc051c253 is, and where > in the function. You should be able to run gdb on your kernel.debug > (or kernel on 7.x), and use "l *0xc051c253" to generate a pointer to > the line and snippet, which will give us a substantial hint about what > is happening. Sorry for not getting back on this timely, have had rather a busy period (lousy excuse, i know). Anyway, I have currently downgraded the machine to a 5.3-RELEASE-p22 kernel, which seems to have solved the problem. There are no panics anymore (it has been two weeks since the downgrade). Makes me a bit warry about upgrading anything to 6.x :) Anyway, i did get into the ddb prompt on one of the last panics, and put some of the resources online: http://www.sonologic.nl/fbsd/ As you can see, i was pretty clueless about what to do, and just traced about everything that was not swapped out.. Did not put the core dump online, as i don't feel like sharing that with the world. Available upon request though for those who want to get a crack at this. I don't have a copy of the kernel.debug lying around, for which I apologise. I cannot however upgrade to 5.4 again, we've had enought trouble with this machine and the user load on that machine has increased to a point where i cannot afford these random panics anymore. I don't have the spare identical hardware lying around at this point to copy the entire setup for testing purposes.. What i will try when i find some time is doing incremental upgrades from 5.3-RELEASE-p22 to 5.4-RELEASE-p6, step by step, to see what patchlevel introduces the problem. Best, Koen -- K.F.J. Martens, Sonologic, http://www.sonologic.nl/ Networking, hosting, embedded systems, unix, artificial intelligence. Public PGP key: http://www.metro.cx/pubkey-gmc.asc Wondering about the funny attachment your mail program can't read? Visit http://www.openpgp.org/ From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 00:19:17 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CED716A41F for ; Sat, 5 Nov 2005 00:19:17 +0000 (GMT) (envelope-from fierykylin@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D80643D46 for ; Sat, 5 Nov 2005 00:19:16 +0000 (GMT) (envelope-from fierykylin@gmail.com) Received: by xproxy.gmail.com with SMTP id t14so6228wxc for ; Fri, 04 Nov 2005 16:19:16 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=O9L5nHyMvM/WZ4ndoYah3LjuybEqNboA9ZqtWNfUSfdwPROQgUWO2iHL1JCcc1YzdMr+FD6ij3fsRbdgeLNZHJpORvMXUrIP0d5uZUC5s/CKGAHErktefANQXDki68wciLzVYspNtDKHq07l5ndmHkxJNB3L4h+wPGRcNgE3q0c= Received: by 10.70.44.6 with SMTP id r6mr1545534wxr; Thu, 03 Nov 2005 20:30:38 -0800 (PST) Received: by 10.70.18.16 with HTTP; Thu, 3 Nov 2005 20:30:38 -0800 (PST) Message-ID: <87ab37ab0511032030o134b9316j83295dd303e4e44b@mail.gmail.com> Date: Fri, 4 Nov 2005 12:30:38 +0800 From: kylin To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: misc questions about the device&driver arch X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2005 00:19:17 -0000 hello every one :) good day! i have list the 3 puzzle coming to me in my recent coding reading of freebs= d 0 /////////////// pci bridge dynamic resize ///////////// it seems that the device arch of freebsd is similar to what is revealed in window OS. i have read the pcie hotplug tps of windows longhorn ,it is said that with some hardware mechanisms the pci bridge driver can do global pci resource window reconfiguration.so good to the hotplugin pci device for it avoid prelocating resource for the device . i wonder ,if the mem /io/irq reconfiguration possible under freebsd .:) 1 ////////////// is bus_data_generation ///////// what idoes bus_data_generation for, is it the generation count for the device manager tree? void bus_data_generation_update(void) { bus_data_generation++; } 2 ////////////// pci_write_config vs pci_write_config_method ////////////// under the source code /dev/pci .there are functions name pci_write_config ( pcivar.h) and pci_write_config_method(pci.c) they both call the parent method ,though the content is different ,but does that a liitle overlap whit each other? -- we who r about to die,salute u! From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 02:05:06 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 556E616A41F for ; Sat, 5 Nov 2005 02:05:06 +0000 (GMT) (envelope-from joao.barros@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id D2E1E43D45 for ; Sat, 5 Nov 2005 02:05:05 +0000 (GMT) (envelope-from joao.barros@gmail.com) Received: by xproxy.gmail.com with SMTP id t14so20645wxc for ; Fri, 04 Nov 2005 18:05:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GAuqWXpX+BWfHc3kUQ7NKO2AweWBDe9Qod6TuZNjHY3qslHKXfA3tqAdfD4KH9RbFwOFW8EzrYurXCIQZbU3dqQApmRpARnWUQZoJTWGSe+yDcpJ0esONEXwbz36lMQ5MikjkdfYQ63oY+gz28EoECE84DO2Lwdft28aFBIG5Q8= Received: by 10.70.9.5 with SMTP id 5mr2036076wxi; Fri, 04 Nov 2005 06:59:05 -0800 (PST) Received: by 10.70.9.10 with HTTP; Fri, 4 Nov 2005 06:59:05 -0800 (PST) Message-ID: <70e8236f0511040659i72927ea8p2aa73ef4376cbd7d@mail.gmail.com> Date: Fri, 4 Nov 2005 14:59:05 +0000 From: Joao Barros To: Robert Watson In-Reply-To: <20051104094643.S9692@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <436A7474.4040501@sh.cvut.cz> <20051103.214104.62371333.imp@bsdimp.com> <20051104094643.S9692@fledge.watson.org> Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel source hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2005 02:05:06 -0000 On 11/4/05, Robert Watson wrote: > > On Thu, 3 Nov 2005, M. Warner Losh wrote: > > > : Also, is there a page with other tasks for kernel neophytes like me? = I > > : looked for some such page but I couldn't find any. > > > > phk used to have a /jkh/ page, or Junior Kernel Hacker page. Don't kno= w > > if that's still that way or not. > > Now that we have a FreeBSD Developer wiki, it may make sense to move the > page there so it can be more easily reached and maintained by a broader > set of developers? > Could you please provide the link for the Wiki? Thanks. > Robert N M Watson -- Joao Barros From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 02:21:53 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 495E816A41F for ; Sat, 5 Nov 2005 02:21:53 +0000 (GMT) (envelope-from fierykylin@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8625043D4C for ; Sat, 5 Nov 2005 02:21:52 +0000 (GMT) (envelope-from fierykylin@gmail.com) Received: by xproxy.gmail.com with SMTP id t14so22713wxc for ; Fri, 04 Nov 2005 18:21:51 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=qETl+dcCMjTEir1PxYZ23r1m4w+a7ltV5LXQiUMcU7X+CNm5OOiDTJRTWbgo1Q2dc2uCT1w4LSpdEZtBn+TyG5RepWEsvh3O1sB4A5Mla+QxpdoQNnnyBmbSzcWYkZh8pmlKlGry40MxD/DgVTRnwmTpnFmTbDvCY/p8hIa1pP4= Received: by 10.70.7.20 with SMTP id 20mr2692805wxg; Fri, 04 Nov 2005 18:21:51 -0800 (PST) Received: by 10.70.18.16 with HTTP; Fri, 4 Nov 2005 18:21:51 -0800 (PST) Message-ID: <87ab37ab0511041821l611d4d2fkb22db7328920b4d2@mail.gmail.com> Date: Sat, 5 Nov 2005 10:21:51 +0800 From: kylin To: freebsd-questions@freebsd.org, "freebsd-hackers@freebsd.org" , freebsd-arch@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: 3 quizz about the freebsd DD arch X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2005 02:21:53 -0000 hello every one :) good day! i have list the 3 puzzle coming to me in my recent coding reading of freebs= d 0 /////////////// pci bridge dynamic resize ///////////// it seems that the device arch of freebsd is similar to what is revealed in window OS. i have read the pcie hotplug tps of windows longhorn ,it is said that with some hardware mechanisms the pci bridge driver can do global pci resource window reconfiguration.so good to the hotplugin pci device for it avoid prelocating resource for the device . i wonder ,if the mem /io/irq reconfiguration possible under freebsd .:) 1 ////////////// is bus_data_generation ///////// what idoes bus_data_generation for, is it the generation count for the device manager tree? void bus_data_generation_update(void) { bus_data_generation++; } 2 ////////////// pci_write_config vs pci_write_config_method ////////////// under the source code /dev/pci .there are functions name pci_write_config ( pcivar.h) and pci_write_config_method(pci.c) they both call the parent method ,though the content is different ,but does that a liitle overlap whit each other? From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 02:29:57 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 66DF616A41F for ; Sat, 5 Nov 2005 02:29:57 +0000 (GMT) (envelope-from wxs@syn.csh.rit.edu) Received: from syn.csh.rit.edu (syn.csh.rit.edu [129.21.60.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id F206743D45 for ; Sat, 5 Nov 2005 02:29:56 +0000 (GMT) (envelope-from wxs@syn.csh.rit.edu) Received: from syn.csh.rit.edu (localhost [127.0.0.1]) by syn.csh.rit.edu (8.13.3/8.13.1) with ESMTP id jA53XDxi050438; Fri, 4 Nov 2005 22:33:13 -0500 (EST) (envelope-from wxs@syn.csh.rit.edu) Received: (from wxs@localhost) by syn.csh.rit.edu (8.13.3/8.13.1/Submit) id jA53XCeq050436; Fri, 4 Nov 2005 22:33:12 -0500 (EST) (envelope-from wxs) Date: Fri, 4 Nov 2005 22:33:12 -0500 From: Wesley Shields To: Joao Barros Message-ID: <20051105033312.GA41575@csh.rit.edu> References: <436A7474.4040501@sh.cvut.cz> <20051103.214104.62371333.imp@bsdimp.com> <20051104094643.S9692@fledge.watson.org> <70e8236f0511040659i72927ea8p2aa73ef4376cbd7d@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <70e8236f0511040659i72927ea8p2aa73ef4376cbd7d@mail.gmail.com> User-Agent: Mutt/1.5.11 Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel source hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2005 02:29:57 -0000 On Fri, Nov 04, 2005 at 02:59:05PM +0000, Joao Barros wrote: > On 11/4/05, Robert Watson wrote: > > > > On Thu, 3 Nov 2005, M. Warner Losh wrote: > > > > > : Also, is there a page with other tasks for kernel neophytes like me? I > > > : looked for some such page but I couldn't find any. > > > > > > phk used to have a /jkh/ page, or Junior Kernel Hacker page. Don't know > > > if that's still that way or not. > > > > Now that we have a FreeBSD Developer wiki, it may make sense to move the > > page there so it can be more easily reached and maintained by a broader > > set of developers? > > > > Could you please provide the link for the Wiki? Thanks. http://wikitest.freebsd.org/ is the only one I am aware of. If there is a more official one I'm not aware of it. -- WXS From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 07:02:47 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D93816A41F; Sat, 5 Nov 2005 07:02:47 +0000 (GMT) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id D30BD43D45; Sat, 5 Nov 2005 07:02:46 +0000 (GMT) (envelope-from bra@fsn.hu) Received: from localhost (localhost [127.0.0.1]) by people.fsn.hu (Postfix) with ESMTP id 900A784420; Fri, 4 Nov 2005 17:15:32 +0100 (CET) Received: from people.fsn.hu ([127.0.0.1]) by localhost (people.fsn.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 55893-01-3; Fri, 4 Nov 2005 17:15:19 +0100 (CET) Received: from [127.0.0.1] (unknown [192.168.2.3]) by people.fsn.hu (Postfix) with ESMTP id 4AFD58441E; Fri, 4 Nov 2005 17:15:19 +0100 (CET) Message-ID: <436B8918.9060105@fsn.hu> Date: Fri, 04 Nov 2005 17:15:20 +0100 From: Attila Nagy User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050930) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robert Watson References: <436A868F.4010606@fsn.hu> <20051104095129.M9692@fledge.watson.org> In-Reply-To: <20051104095129.M9692@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at fsn.hu Cc: freebsd-hackers@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: Reproduceable freeze with quotas enabled X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2005 07:02:47 -0000 Hello, Robert Watson wrote: > > On Thu, 3 Nov 2005, Attila Nagy wrote: > >> Hello, >> >> I have an "easily" (at least to me) reproduceable freeze with both >> 6-STABLE and 7-CURRENT on an amd64 SMP machine. >> >> What I do is simply copy a lot of directories, files and symlinks with >> different uids from another machine to this one, using rsync. > > > This is probably a vnode lock leak or deadlock. As it looks like you > have both the ability to get into the debugger and also a serial or > other remote console, the output of: > > show allpcpu > alltrace > show lockedvnods > show allocks > > would be helpful. There are also "options DEBUG_LOCKS" which extends > the debugging information available via "show lockedvnods" with > information about where the lock was acquired, which can be quite helpful. > > Robert N M Watson > >> >> With quotas enabled it freezes constantly, without quotas it doesn't. >> >> I have MP_WATCHDOG enabled (the kernel config is the default >> GENERIC+SMP with debuggers and MP_WATCHDOG only) so after the freeze >> it drops me into the debugger in which I can see the following: >> >> FreeBSD/amd64 (helen) (ttyv0) >> >> login: Watchdog timer: 3 >> Watchdog timer: 2 >> Watchdog timer: 1 >> Watchdog timer: 0 >> Watchdog firing! >> NMI ... going to debugger >> [thread pid 157 tid 100143 ] >> Stopped at vinactive+0x83: jz 0x365245a9 >> db> bt >> Tracing pid 157 tid 100143 td 0xffffff007b9c14c0 >> vinactive() at vinactive+0x83 >> vput() at vput+0x1cf >> qsync() at qsync+0x260 >> ffs_sync() at ffs_sync+0x159 >> sync_fsync() at sync_fsync+0x191 >> VOP_FSYNC_APV() at VOP_FSYNC_APV+0x3d >> sched_sync() at sched_sync+0x428 >> fork_exit() at fork_exit+0x86 >> fork_trampoline() at fork_trampoline+0xe >> --- trap 0, rip = 0, rsp = 0xffffffffb2029d00, rbp = 0 --- >> db> ps >> 157 ffffff007b9489c0 0 0 0 0000204 [CPU 0] syncer This is an HP machine, so I can access it via it's ILO port. But it mangles larger outputs, so alltrace will be truncated. I will find a way to get a serial console attached to it, but until that... I've recompiled the kernel with "options DEBUG_LOCKS", rebooted and started the rsync process. This is what I see now: login: Watchdog timer: 3 Watchdog timer: 2 Watchdog timer: 1 Watchdog timer: 0 Watchdog firing! NMI ... going to debugger [thread pid 14 tid 100010 ] db> bt Tracing pid 14 tid 100010 td 0xffffff007b94ebe0 acpi_cpu_c1() at acpi_cpu_c1+0x6 acpi_cpu_idle() at acpi_cpu_idle+0x174 idle_proc() at idle_proc+0x14e fork_exit() at fork_exit+0x86 fork_trampoline() at fork_trampoline+0xe --- trap 0, rip = 0, rsp = 0xffffffffb1e81d00, rbp = 0 --- db> ps [...] 14 ffffff007b97b680 0 0 0 000020c [CPU 0] idle: cpu0 [...] db> show allpcpu cpuid = 0 curthread = 0xffffff007b94ebe0: pid 14 "idle: cpu0" curpcb = 0xffffffffb1e81d10 fpcurthread = none idlethread = 0xffffff007b94ebe0: pid 14 "idle: cpu0" cpuid = 1 curthread = 0xffffff007b94e000: pid 13 "idle: cpu1" curpcb = 0xffffffffb1e68d10 fpcurthread = none idlethread = 0xffffff007b94e000: pid 13 "idle: cpu1" cpuid = 2 curthread = 0xffffff007b9014c0: pid 157 "syncer" curpcb = 0xffffffffb20e8d10 fpcurthread = none idlethread = 0xffffff007b94dbe0: pid 12 "idle: cpu2" cpuid = 3 curthread = 0xffffff007b94d980: pid 11 "mp_watchdog cpu 3" curpcb = 0xffffffffb1e5ed10 fpcurthread = none idlethread = 0xffffff007b94d980: pid 11 "mp_watchdog cpu 3" db> show lockedvnods Locked vnodes 0xffffff0061c05470: tag syncer, type VNON usecount 1, writecount 0, refcount 2 mountedhere 0 flags () lock type syncer: EXCL (count 1) by thread 0xffffff007b9014c0 (pid 157) 0xffffff00418086a8: tag ufs, type VDIR usecount 1, writecount 0, refcount 90 mountedhere 0 flags () lock type ufs: EXCL (count 1) by thread 0xffffff005d435980 (pid 1180) ino 18983427, on dev da1s1d 0xffffff0015a1b6a8: tag ufs, type VLNK usecount 0, writecount 0, refcount 1 mountedhere 0 flags (VI_DOOMED) lock type ufs: EXCL (count 1) by thread 0xffffff005d435980 (pid 1180) ino 19058341, on dev da1s1d WARNING this is not complete! db> alltrace --- syscall (93, FreeBSD ELF64, select), rip = 0x800d4c14c, rsp = 0x7fffffffc2d8 , rbp = 0x1 --- Tracing command rsync pid 1180 tid 100267 td 0xffffff005d435980 sched_switch() at sched_switch+0x11f mi_switch() at mi_switch+0x14c turnstile_wait() at turnstile_wait+0x272 _mtx_lock_sleep() at _mtx_lock_sleep+0xa6 msleep() at msleep+0x2a6 acquire() at acquire+0x76 debuglockmgr() at debuglockmgr+0x500 vop_stdlock() at vop_stdlock+0x3e VOP_LOCK_APV() at VOP_LOCK_APV+0x49 VOP_LOCK_APV() at VOP_LOCK_APV+0x49 debug_vn_lock() at debug_vn_lock+0x8f dqsync() at dqsync+0x95 dqrele() at dqrele+0x68 ufs_reclaim() at ufs_reclaim+0x100 VOP_RECLAIM_APV() at VOP_RECLAIM_APV+0x3d vgonel() at vgonel+0x12f vnlru_free() at vnlru_free+0x29f getnewvnode() at getnewvnode+0x2ca ffs_vget() at ffs_vget+0xe9 ffs_valloc() at ffs_valloc+0x109 ufs_makeinode() at ufs_makeinode+0x6e ufs_symlink() at ufs_symlink+0x3f VOP_SYMLINK_APV() at VOP_SYMLINK_APV+0x65 kern_symlink() at kern_symlink+0x3d3 syscall() at syscall+0x642 Xfast_syscall() at Xfast_syscall+0xa8 --- syscall (57, FreeBSD ELF64, symlink), rip = 0x8006b93ec, rsp = 0x7fffffffb7d 8, rbp = 0xa64388 --- Tracing command sh pid 1178 tid 100202 td 0xffffff00601f8be0 sched_switch() at sched_switch+0x11f mi_switch() at mi_switch+0x14c sleepq_wait_sig() at sleepq_wait_sig+0xe cv_wait_sig() at cv_wait_sig+0x17f kern_select() at kern_select+0xbd4 select() at select+0x3e syscall() at syscall+0x642 Xfast_syscall() at Xfast_syscall+0xa8 --- syscall (93, FreeBSD ELF64, select), rip = 0x4165ac, rsp = 0x7fffffffe948, r bp = 0x7fffffffe970 --- Tracing command adjkerntz pid 271 tid 100195 td 0xffffff0062431000 sched_switch() at sched_switch+0x11f mi_switch() at mi_switch+0x14c sleepq_wait_sig() at sleepq_wait_sig+0xe msleep() at msleep+0x21b kern_sigsuspend() at kern_sigsuspend+0xb1 sigsuspend() at sigsuspend+0x40 syscall() at syscall+0x642 Xfast_syscall() at Xfast_syscall+0xa8 --- syscall (341, FreeBSD ELF64, sigsuspend), rip = 0x80067a18c, rsp = 0x7ffffff fed28, rbp = 0xfffffffffffff1f0 --- (null)() at 0x80067a18c *** error reading from address fffffffffffff1f8 *** I will try to provide a full alltrace output tomorrow. Thanks, -- Attila Nagy e-mail: Attila.Nagy@fsn.hu Adopt a directory on our free software phone: +3630 306 6758 server! http://www.fsn.hu/?f=brick From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 09:21:37 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9BF7816A41F; Sat, 5 Nov 2005 09:21:37 +0000 (GMT) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0361343D46; Sat, 5 Nov 2005 09:21:36 +0000 (GMT) (envelope-from bra@fsn.hu) Received: from localhost (localhost [127.0.0.1]) by people.fsn.hu (Postfix) with ESMTP id B72C48441F; Sat, 5 Nov 2005 10:21:34 +0100 (CET) Received: from people.fsn.hu ([127.0.0.1]) by localhost (people.fsn.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 93111-03-3; Sat, 5 Nov 2005 10:21:29 +0100 (CET) Received: from [127.0.0.1] (unknown [192.168.2.3]) by people.fsn.hu (Postfix) with ESMTP id 268678441E; Sat, 5 Nov 2005 10:21:29 +0100 (CET) Message-ID: <436C7998.5040404@fsn.hu> Date: Sat, 05 Nov 2005 10:21:28 +0100 From: Attila Nagy User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050930) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robert Watson References: <436A868F.4010606@fsn.hu> <20051104095129.M9692@fledge.watson.org> <436B8918.9060105@fsn.hu> In-Reply-To: <436B8918.9060105@fsn.hu> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at fsn.hu Cc: freebsd-hackers@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: Reproduceable freeze with quotas enabled X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2005 09:21:37 -0000 Hello, Attila Nagy wrote: > Robert Watson wrote: >> On Thu, 3 Nov 2005, Attila Nagy wrote: >>> I have an "easily" (at least to me) reproduceable freeze with both >>> 6-STABLE and 7-CURRENT on an amd64 SMP machine. >>> What I do is simply copy a lot of directories, files and symlinks >>> with different uids from another machine to this one, using rsync. >> This is probably a vnode lock leak or deadlock. As it looks like you >> have both the ability to get into the debugger and also a serial or >> other remote console, the output of: >> show allpcpu >> alltrace >> show lockedvnods >> show allocks >> would be helpful. There are also "options DEBUG_LOCKS" which extends >> the debugging information available via "show lockedvnods" with >> information about where the lock was acquired, which can be quite >> helpful. http://people.fsn.hu/~bra/freebsd/crash-20051105/crashlog I've put all together in this file. Tell me please if I can do anything to make the issue more clear. Thanks, -- Attila Nagy e-mail: Attila.Nagy@fsn.hu Adopt a directory on our free software phone: +3630 306 6758 server! http://www.fsn.hu/?f=brick From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 11:01:19 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB87916A41F for ; Sat, 5 Nov 2005 11:01:19 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D77F43D73 for ; Sat, 5 Nov 2005 11:01:15 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 06CB646B92; Sat, 5 Nov 2005 06:01:12 -0500 (EST) Date: Sat, 5 Nov 2005 11:01:11 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Joao Barros In-Reply-To: <70e8236f0511040659i72927ea8p2aa73ef4376cbd7d@mail.gmail.com> Message-ID: <20051105105940.V15711@fledge.watson.org> References: <436A7474.4040501@sh.cvut.cz> <20051103.214104.62371333.imp@bsdimp.com> <20051104094643.S9692@fledge.watson.org> <70e8236f0511040659i72927ea8p2aa73ef4376cbd7d@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel source hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2005 11:01:19 -0000 On Fri, 4 Nov 2005, Joao Barros wrote: > On 11/4/05, Robert Watson wrote: >> >> On Thu, 3 Nov 2005, M. Warner Losh wrote: >> >>> : Also, is there a page with other tasks for kernel neophytes like me? I >>> : looked for some such page but I couldn't find any. >>> >>> phk used to have a /jkh/ page, or Junior Kernel Hacker page. Don't know >>> if that's still that way or not. >> >> Now that we have a FreeBSD Developer wiki, it may make sense to move the >> page there so it can be more easily reached and maintained by a broader >> set of developers? > > Could you please provide the link for the Wiki? Thanks. A test wiki for developer use has been set up here: http://wikitest.FreeBSD.org/ Its primary use so far has been to host content for the Google Summer of Code students, although other content is also starting to make it onto the Wiki. I think the primary reason it's still considered experimental is that it is hosted outside the FreeBSD.org cluster. Robert N M Watson From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 11:31:39 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F02416A41F for ; Sat, 5 Nov 2005 11:31:39 +0000 (GMT) (envelope-from joao.barros@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF53643D48 for ; Sat, 5 Nov 2005 11:31:36 +0000 (GMT) (envelope-from joao.barros@gmail.com) Received: by xproxy.gmail.com with SMTP id t14so77498wxc for ; Sat, 05 Nov 2005 03:31:36 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WG+iFzzlbat3l0nZVoO14wtk8UmaHJkVsjIRqMqFs/tSkThR43Bx/ToB+ETxuM1/lXMZ4JCfPkhJoRvBXu0OxzibQl1LAbBbta6prt7l5mG8byJ0cwBF9y8x7uEumA4buOevZy+gjw8X6E5hQ3Fzm4Bg/1u3ch2vlq+o/W8icpM= Received: by 10.70.9.5 with SMTP id 5mr2996111wxi; Sat, 05 Nov 2005 03:31:36 -0800 (PST) Received: by 10.70.9.10 with HTTP; Sat, 5 Nov 2005 03:31:36 -0800 (PST) Message-ID: <70e8236f0511050331r3863f4bcld094d3a2ed57554f@mail.gmail.com> Date: Sat, 5 Nov 2005 11:31:36 +0000 From: Joao Barros To: Robert Watson In-Reply-To: <20051105105940.V15711@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <436A7474.4040501@sh.cvut.cz> <20051103.214104.62371333.imp@bsdimp.com> <20051104094643.S9692@fledge.watson.org> <70e8236f0511040659i72927ea8p2aa73ef4376cbd7d@mail.gmail.com> <20051105105940.V15711@fledge.watson.org> Cc: freebsd-hackers@freebsd.org, Wesley Shields Subject: Re: Kernel source hacking X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2005 11:31:39 -0000 On 11/5/05, Robert Watson wrote: > > On Fri, 4 Nov 2005, Joao Barros wrote: > > > On 11/4/05, Robert Watson wrote: > >> > >> On Thu, 3 Nov 2005, M. Warner Losh wrote: > >> > >>> : Also, is there a page with other tasks for kernel neophytes like me= ? I > >>> : looked for some such page but I couldn't find any. > >>> > >>> phk used to have a /jkh/ page, or Junior Kernel Hacker page. Don't k= now > >>> if that's still that way or not. > >> > >> Now that we have a FreeBSD Developer wiki, it may make sense to move t= he > >> page there so it can be more easily reached and maintained by a broade= r > >> set of developers? > > > > Could you please provide the link for the Wiki? Thanks. > > A test wiki for developer use has been set up here: > > http://wikitest.FreeBSD.org/ > > Its primary use so far has been to host content for the Google Summer of > Code students, although other content is also starting to make it onto th= e > Wiki. I think the primary reason it's still considered experimental is > that it is hosted outside the FreeBSD.org cluster. > > Robert N M Watson > I was there earlier when you mentioned a link to the MySQL section on the latest "MySQL performance on FreeBSD" thread on stable@ (I think) but never got around to see the rest of the wiki. Thank you and Wesley for the reply. -- Joao Barros From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 17:14:29 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A96DD16A41F; Fri, 4 Nov 2005 17:14:29 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms044pub.verizon.net (vms044pub.verizon.net [206.46.252.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EA7443D5A; Fri, 4 Nov 2005 17:14:29 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms062.mailsrvcs.net ([192.168.1.3]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IPF004RWX8432G2@vms044.mailsrvcs.net>; Fri, 04 Nov 2005 11:14:28 -0600 (CST) Date: Fri, 04 Nov 2005 11:14:28 -0600 (CST) From: Sergey Babkin To: Giorgos Keramidas , kamal kc Message-id: <29995980.1131124468471.JavaMail.root@vms062.mailsrvcs.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailman-Approved-At: Sat, 05 Nov 2005 17:13:10 +0000 Cc: freebsd , freebsd Subject: Re: Re: allocating 14KB memory per packet compression/decompression results in v X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: babkin@users.sf.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 17:14:29 -0000 >From: Giorgos Keramidas >On 2005-11-03 22:56, kamal kc wrote: >> since i am using the adaptive LZW compression scheme it >> requires construction of string table for >> compression/decompression. So an ip packet of size 1500 bytes >> requires a table of size (4KB + 4KB + 2KB = 12KB). > >I may be stating the obvious or something totally wrong, but >couldn't the string table be constructed once instead of each >time a packet goes down? It is my intuition that this would >perform much much better than re-doing the work of the string >table each time a packet goes out. No, the table changes as data is compressed. It records the knowledge about the strings that have already occured in the data. Keeping the table between the packets would improve the compression but the packets would have to be transmitted through a reliable medium since to decompress a packet you would have to decompress all the preceding packets first (essentially you get a stream compression). To keep the packets separate, the compression state must be reset between them. But of course resetting the compression state does not mean that the memory should be deallocated. -SB From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 4 17:20:09 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9958716A41F; Fri, 4 Nov 2005 17:20:09 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.93]) by mx1.FreeBSD.org (Postfix) with ESMTP id B823A43D45; Fri, 4 Nov 2005 17:20:08 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) by aiolos.otenet.gr (8.13.4/8.13.4/Debian-1) with SMTP id jA4HK6RA022039; Fri, 4 Nov 2005 19:20:06 +0200 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id jA4HJvPg001145; Fri, 4 Nov 2005 19:19:57 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id jA4HJvMF001144; Fri, 4 Nov 2005 19:19:57 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 4 Nov 2005 19:19:57 +0200 From: Giorgos Keramidas To: babkin@users.sourceforge.net Message-ID: <20051104171957.GA1120@flame.pc> References: <29995980.1131124468471.JavaMail.root@vms062.mailsrvcs.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <29995980.1131124468471.JavaMail.root@vms062.mailsrvcs.net> X-Mailman-Approved-At: Sat, 05 Nov 2005 17:13:10 +0000 Cc: kamal kc , freebsd , freebsd Subject: Re: Re: allocating 14KB memory per packet compression/decompression results in v X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 17:20:09 -0000 On 2005-11-04 11:14, Sergey Babkin wrote: >Giorgos Keramidas wrote: >>On 2005-11-03 22:56, kamal kc wrote: >>> since i am using the adaptive LZW compression scheme it >>> requires construction of string table for >>> compression/decompression. So an ip packet of size 1500 bytes >>> requires a table of size (4KB + 4KB + 2KB = 12KB). >> >> I may be stating the obvious or something totally wrong, but >> couldn't the string table be constructed once instead of each >> time a packet goes down? It is my intuition that this would >> perform much much better than re-doing the work of the string >> table each time a packet goes out. > > No, the table changes as data is compressed. It records the > knowledge about the strings that have already occured in the > data. > > Keeping the table between the packets would improve the > compression but the packets would have to be transmitted > through a reliable medium since to decompress a packet you > would have to decompress all the preceding packets first > (essentially you get a stream compression). Ah, yes, I see now. You're right of course. I was thinking of something resembling a "compressed tunnel" when I wrote the reply, but that doesn't work with IP very well, unless some other sort of encapsulation is at work. > To keep the packets separate, the compression state > must be reset between them. > > But of course resetting the compression state does not > mean that the memory should be deallocated. Very true :) From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 21:05:55 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E4B816A420 for ; Sat, 5 Nov 2005 21:05:55 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 596FE43D46 for ; Sat, 5 Nov 2005 21:05:54 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jA5L3qlF045899; Sat, 5 Nov 2005 14:03:52 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 05 Nov 2005 14:04:16 -0700 (MST) Message-Id: <20051105.140416.69987626.imp@bsdimp.com> To: fierykylin@gmail.com From: "M. Warner Losh" In-Reply-To: <87ab37ab0511032030o134b9316j83295dd303e4e44b@mail.gmail.com> References: <87ab37ab0511032030o134b9316j83295dd303e4e44b@mail.gmail.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 05 Nov 2005 14:03:52 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: misc questions about the device&driver arch X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2005 21:05:55 -0000 In message: <87ab37ab0511032030o134b9316j83295dd303e4e44b@mail.gmail.com> kylin writes: : /////////////// : pci bridge dynamic resize : ///////////// : it seems that the device arch of freebsd is similar to what is revealed in : window OS. i have read the pcie hotplug tps of windows longhorn ,it is said : that with some hardware mechanisms the pci bridge driver can do global pci : resource window reconfiguration.so good to the hotplugin pci device for it : avoid prelocating resource for the device . : i wonder ,if the mem /io/irq reconfiguration possible under freebsd .:) : 1 Yes. Cardbus does it all the time. However, there's no pcie hot-plug support yet, so the process for kicking off configuration of the new device doesn't happen. : ////////////// : is bus_data_generation : ///////// : what idoes bus_data_generation for, is it the generation count for the : device manager tree? : void : bus_data_generation_update(void) : { : bus_data_generation++; : } Anytime the device_t tree changes, this gets updated. It is used by devinfo and friends. : ////////////// : pci_write_config vs pci_write_config_method : ////////////// : under the source code /dev/pci .there are functions name pci_write_config ( : pcivar.h) and pci_write_config_method(pci.c) : they both call the parent method ,though the content is different ,but does : that a liitle overlap whit each other? pci_write_config is the user's interface. This gets translated into a series of calls up the tree using pci_write_config_method to find the right place in the tree to actually write to the configuration registers. Warner From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 5 23:37:04 2005 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13E1516A421 for ; Sat, 5 Nov 2005 23:37:04 +0000 (GMT) (envelope-from spork@fasttrackmonkey.com) Received: from angryfist.fasttrackmonkey.com (angryfist.fasttrackmonkey.com [216.220.107.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6141643D58 for ; Sat, 5 Nov 2005 23:36:59 +0000 (GMT) (envelope-from spork@fasttrackmonkey.com) Received: (qmail 93001 invoked by uid 2003); 5 Nov 2005 23:30:36 -0000 Received: from spork@fasttrackmonkey.com by angryfist.fasttrackmonkey.com by uid 1001 with qmail-scanner-1.20 (clamscan: 0.65. Clear:RC:1(216.220.116.154):. Processed in 0.049214 secs); 05 Nov 2005 23:30:36 -0000 Received: from unknown (HELO white.nat.fasttrackmonkey.com) (216.220.116.154) by 0 with (DHE-RSA-AES256-SHA encrypted) SMTP; 5 Nov 2005 23:30:35 -0000 Date: Sat, 5 Nov 2005 18:36:56 -0500 (EST) From: Charles Sprickman X-X-Sender: spork@white.nat.fasttrackmonkey.com To: hackers@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: twe and giant X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Nov 2005 23:37:04 -0000 Hello all, I was just wondering about this... I recently bumped a soon-to-be production box to 6.0 as it seems like upgrading now is easier than doing it the week after the box goes into production (it's amazing how the release engineering team knows to schedule this way...:). One thing I noticed in reviewing the boot messages is that twe is still under the giant lock: twe0: <3ware Storage Controller. Driver version 1.50.01.002> port 0x2860-0x286f mem 0xf4000000-0xf47fffff irq 17 at device 13.0 on pci0 twe0: [GIANT-LOCKED] twe0: 4 ports, Firmware FE8S 1.05.00.068, BIOS BE7X 1.08.00.048 I bring this up because I could have sworn that I read here or elsewhere that this driver was revamped. I also could have sworn that at some point in 5.x it was not under giant. Maybe I'm imagining things... Anyhow, does anyone know the status of this, and also is there a central repository that tracks changes like this that I can watch? Thanks, Charles