From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 30 08:28:17 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68C77106566C for ; Sun, 30 Mar 2008 08:28:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id AFADC8FC14 for ; Sun, 30 Mar 2008 08:28:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from [212.86.226.226] (account mav@alkar.net HELO [192.168.3.2]) by cmail.optima.ua (CommuniGate Pro SMTP 5.1.14) with ESMTPA id 99970234; Sun, 30 Mar 2008 11:28:15 +0300 Message-ID: <47EF4F18.502@FreeBSD.org> Date: Sun, 30 Mar 2008 11:28:08 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org, FreeBSD Net Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Multiple netgraph 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: Sun, 30 Mar 2008 08:28:17 -0000 Hi. I have implemented a patch (for the HEAD) making netgraph to use several own threads for event queues processing instead of using single swinet. It should significantly improve netgraph SMP scalability on complicated workloads that require queueing by implementation (PPTP/L2TP) or stack size limitations. It works perfectly on my UP system, showing results close to original or even a bit better. I have no real SMP test server to measure real scalability, but test on HTT CPU works fine, utilizing both virtual cores at the predictable level. Reviews and feedbacks are welcome. URL: http://people.freebsd.org/~mav/netgraph.threads.patch -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 30 09:13:36 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 319041065670; Sun, 30 Mar 2008 09:13:36 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 6DE0A8FC21; Sun, 30 Mar 2008 09:13:35 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [62.113.132.89] (account mc467741@c2i.net [62.113.132.89] verified) by mailfe05.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 773504940; Sun, 30 Mar 2008 11:13:33 +0200 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org, FreeBSD Net Date: Sun, 30 Mar 2008 11:14:42 +0200 User-Agent: KMail/1.9.7 References: <47EF4F18.502@FreeBSD.org> In-Reply-To: <47EF4F18.502@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803301114.43336.hselasky@c2i.net> Cc: Alexander Motin Subject: Re: Multiple netgraph 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: Sun, 30 Mar 2008 09:13:36 -0000 Hi, Have you thought about nodes that lock the same mutex must be run on the same thread else for example one thread will run while another will just waits for a mutex ? You can achieve this by grouping nodes into a tree, and the node at the top of the tree decides on which thread the nodes in the tree should be run. How does your patch handle this ? Also see recent discussion about multithreaded callouts on "freebsd-arch@freebsd.org". Subject "timeout/callout small step forward". --HPS On Sunday 30 March 2008, Alexander Motin wrote: > Hi. > > I have implemented a patch (for the HEAD) making netgraph to use several > own threads for event queues processing instead of using single swinet. > It should significantly improve netgraph SMP scalability on complicated > workloads that require queueing by implementation (PPTP/L2TP) or stack > size limitations. It works perfectly on my UP system, showing results > close to original or even a bit better. I have no real SMP test server > to measure real scalability, but test on HTT CPU works fine, utilizing > both virtual cores at the predictable level. > > Reviews and feedbacks are welcome. > > URL: http://people.freebsd.org/~mav/netgraph.threads.patch From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 30 09:49:29 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E117106566B; Sun, 30 Mar 2008 09:49:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id 73A788FC12; Sun, 30 Mar 2008 09:49:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from [212.86.226.226] (account mav@alkar.net HELO [192.168.3.2]) by cmail.optima.ua (CommuniGate Pro SMTP 5.1.14) with ESMTPA id 99987913; Sun, 30 Mar 2008 12:49:27 +0300 Message-ID: <47EF6226.3090808@FreeBSD.org> Date: Sun, 30 Mar 2008 12:49:26 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Hans Petter Selasky References: <47EF4F18.502@FreeBSD.org> <200803301114.43336.hselasky@c2i.net> In-Reply-To: <200803301114.43336.hselasky@c2i.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD Net Subject: Re: Multiple netgraph 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: Sun, 30 Mar 2008 09:49:29 -0000 Hans Petter Selasky wrote: > Have you thought about nodes that lock the same mutex must be run on the same > thread else for example one thread will run while another will just waits for > a mutex ? Usually different nodes does not share data, keeping them inside node/hook private data, so I don't see problem here. It is possible that two messages will be queued to the same node at same time, but to fulfil serialization requirements each node queue processed only by one thread at a time, so there is no place for congestion. > You can achieve this by grouping nodes into a tree, and the node at the top of > the tree decides on which thread the nodes in the tree should be run. Netgraph graphs usually not linear and it is from hard to impossible to predict the way execution will go and the locks that may be congested. Including usually big number of nodes and usually small lock time, congestion probability IMHO looks insignificant comparing to additional logic overhead. If some node/hook needs big lock time it may be instead declared as FORCE_WRITER to enqueue congested messages instead of blocking them (such way now implemented all existing ppp compression/encryption nodes). -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 30 10:34:21 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E77D3106566B; Sun, 30 Mar 2008 10:34:21 +0000 (UTC) (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 C82AE8FC16; Sun, 30 Mar 2008 10:34:21 +0000 (UTC) (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 59F6946B54; Sun, 30 Mar 2008 06:34:21 -0400 (EDT) Date: Sun, 30 Mar 2008 11:34:21 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Motin In-Reply-To: <47EF4F18.502@FreeBSD.org> Message-ID: <20080330112846.Y5921@fledge.watson.org> References: <47EF4F18.502@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, FreeBSD Net Subject: Re: Multiple netgraph 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: Sun, 30 Mar 2008 10:34:22 -0000 On Sun, 30 Mar 2008, Alexander Motin wrote: > I have implemented a patch (for the HEAD) making netgraph to use several own > threads for event queues processing instead of using single swinet. It > should significantly improve netgraph SMP scalability on complicated > workloads that require queueing by implementation (PPTP/L2TP) or stack size > limitations. It works perfectly on my UP system, showing results close to > original or even a bit better. I have no real SMP test server to measure > real scalability, but test on HTT CPU works fine, utilizing both virtual > cores at the predictable level. Reviews and feedbacks are welcome. URL: > http://people.freebsd.org/~mav/netgraph.threads.patch FYI, you might be interested in some similar work I've been doing in the rwatson_netisr branch in Perforce, which: (1) Adds per-CPU netisr threads (2) Introduces inpcb affinity, assigned using a hash on the tuple (similar to RSS) to load balance (3) Moves to rwlock use on inpcb and pcbinfo, used extensively in UDP and somewhat in TCP My initial leaning would be that we would like to avoid adding too many more threads that will do per-packet work, as that leads to excessive context switching. I have similar worries regarding ithreads, and I suspect (hope?) we will have an active discussion of this at the BSDCan developer summit. BTW, I'd be careful with the term "should" and SMP -- often times scalability to multiple cores involves not just introducing the opportunity for parallelism, but also significantly refining or changing the data model to allow that parallelism to be efficiently used. Right now, despite loopback performance being a bottleneck with a single netisr thread, we're not seeing a performance improvement for database workloads over loopback with multiple netisr threads. We're diagnosing this still -- initially it appeared to be tcbinfo lock contention (not surprising), but moving to read locking on tcbinfo didn't appear to help (except in reducing contention leading to more idle time rather than more progress). The current theory is that something about the approach isn't working well with the scheduler but we need to analyze the scheduler traces further. My recommendation would be that you do a fairly thorough performance evaluation before committing. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 30 10:36:26 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3017D1065674 for ; Sun, 30 Mar 2008 10:36:26 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from snoogles.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 0BA938FC1C for ; Sun, 30 Mar 2008 10:36:26 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from localhost (localhost [127.0.0.1]) by snoogles.rachie.is-a-geek.net (Postfix) with ESMTP id 95BD01CD18 for ; Sun, 30 Mar 2008 02:20:42 -0800 (AKDT) From: Mel To: freebsd-hackers@freebsd.org Date: Sun, 30 Mar 2008 12:20:38 +0200 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803301220.39921.fbsd.hackers@rachie.is-a-geek.net> Subject: Popen and EVFILT_WRITE question 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 Mar 2008 10:36:26 -0000 Hi, from reading the manpage on EVFILT_WRITE I thought it would be an easy to use interface to detect when a program wants input. So far, that doesn't seem to be the case. Ultimately what I want to do is pipe all the popen(3)'d output to a logfile and act on any input it wants. Could anyone explain to me why I'm never getting the EVFILT_WRITE event in below testcode? (It doesn't matter if I open the pipe with w+ or r+). test.c: #include #include #include #include #include #include int main(int argc, char **argv) { FILE *proc; int kq; struct kevent changes[2], events[2]; proc = popen("./test.sh", "w+"); if( -1 == (kq = kqueue()) ) err(EX_OSERR, "Cannot get a kqueue"); EV_SET(&changes[0], fileno(proc), EVFILT_WRITE, EV_ADD|EV_ENABLE, 0, 0, 0); EV_SET(&changes[1], fileno(proc), EVFILT_READ, EV_ADD|EV_ENABLE, 0, 0, 0); for( ;; ) { int nev, i; if( -1 == (nev = kevent(kq, changes, 2, events, 2, NULL)) ) err(EX_OSERR, "kevent"); for( i = 0; i < nev; i++ ) { char *buf; if( events[i].filter == EVFILT_READ ) { if( events[i].flags & EV_ERROR ) { warn("Event error"); goto END; } if( events[i].flags & EV_EOF ) goto END; buf = malloc(events[i].data); (void)fread(buf, sizeof(char), events[i].data, proc); (void)fwrite(buf, sizeof(char), events[i].data, stdout); free(buf); } else if( events[i].filter == EVFILT_WRITE ) { if( events[i].flags & EV_ERROR ) { warn("Event error"); goto END; } if( events[i].flags & EV_EOF ) goto END; fprintf(proc, "yes\n"); } } } END: close(kq); pclose(proc); return 0; } test.sh: #!/bin/sh i=0 while(test $i -lt 3); do echo sleeping sleep 1; i=$((i+1)); done echo "Do you wanna write? "; read ANSWER echo $ANSWER -- Mel From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 30 11:22:09 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AACBE106566B; Sun, 30 Mar 2008 11:22:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id F10388FC1C; Sun, 30 Mar 2008 11:22:08 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from [212.86.226.226] (account mav@alkar.net HELO [192.168.3.2]) by cmail.optima.ua (CommuniGate Pro SMTP 5.1.14) with ESMTPA id 100031004; Sun, 30 Mar 2008 14:22:07 +0300 Message-ID: <47EF77DE.6040200@FreeBSD.org> Date: Sun, 30 Mar 2008 14:22:06 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Robert Watson References: <47EF4F18.502@FreeBSD.org> <20080330112846.Y5921@fledge.watson.org> In-Reply-To: <20080330112846.Y5921@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD Net Subject: Re: Multiple netgraph 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: Sun, 30 Mar 2008 11:22:09 -0000 Robert Watson wrote: > FYI, you might be interested in some similar work I've been doing > in the rwatson_netisr branch in Perforce, which: > Adds per-CPU netisr threads Thanks. Netgraph from the beginning uses concept of direct function calls, when level of parallelism limited by data source. In that point multiple netisr threads will give benefits. > My initial leaning would be that we would like to avoid adding too many > more threads that will do per-packet work, as that leads to excessive > context switching. Netgraph uses queueing only as last resort, when direct call is not possible due to locking or stack limitations. For example, while working with kernel sockets (*upcall)() I have got many issues which make impossible to freely use received data without queueing as upcall() caller holds some locks leading to unpredicted LORs in socket/TCP/UDP code. In case of such forced queueing, node becomes an independent data source which can be pinned to and processed by whatever specialized thread or netisr, when it will be able to do it more effectively. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 30 13:27:23 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CFBA106564A; Sun, 30 Mar 2008 13:27:23 +0000 (UTC) (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 3D59F8FC14; Sun, 30 Mar 2008 13:27:23 +0000 (UTC) (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 D68CE46B3B; Sun, 30 Mar 2008 09:27:22 -0400 (EDT) Date: Sun, 30 Mar 2008 14:27:22 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Motin In-Reply-To: <47EF77DE.6040200@FreeBSD.org> Message-ID: <20080330142332.Y5921@fledge.watson.org> References: <47EF4F18.502@FreeBSD.org> <20080330112846.Y5921@fledge.watson.org> <47EF77DE.6040200@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, FreeBSD Net Subject: Re: Multiple netgraph 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: Sun, 30 Mar 2008 13:27:23 -0000 On Sun, 30 Mar 2008, Alexander Motin wrote: >> My initial leaning would be that we would like to avoid adding too many >> more threads that will do per-packet work, as that leads to excessive >> context switching. > > Netgraph uses queueing only as last resort, when direct call is not possible > due to locking or stack limitations. For example, while working with kernel > sockets (*upcall)() I have got many issues which make impossible to freely > use received data without queueing as upcall() caller holds some locks > leading to unpredicted LORs in socket/TCP/UDP code. In case of such forced > queueing, node becomes an independent data source which can be pinned to and > processed by whatever specialized thread or netisr, when it will be able to > do it more effectively. I guess my caution is that it does not necessarily follow from a design that allows for explicit parallelism that the implementation will use it well, and that any time context switchs are necessarily introduced, cost goes up. The move to direct dispatch from the ithread, despite reducing opportunities for parallelism, significantly increased performance for many local workloads. If we have a netisr thread, an ithread, and a netgraph thread, the potential context switch overhead is significant, even if we are doing a good job at batching work transfer between them. Often times, the way this behaves in practice is quite dependent on scheduling, and right now we have known defficiencies in this area, so give it a try on an SMP box and see what happens. Since you're a FreeBSD committer, you can sign up to use the netperf cluster, which might not be a bad idea if you don't have local access to a good SMP test setup. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 31 03:49:35 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7DF8106566C for ; Mon, 31 Mar 2008 03:49:35 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 9475B8FC14 for ; Mon, 31 Mar 2008 03:49:35 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id A3956208E; Mon, 31 Mar 2008 05:49:33 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Mel References: <200803301220.39921.fbsd.hackers@rachie.is-a-geek.net> Date: Mon, 31 Mar 2008 05:49:33 +0200 In-Reply-To: <200803301220.39921.fbsd.hackers@rachie.is-a-geek.net> (Mel's message of "Sun\, 30 Mar 2008 12\:20\:38 +0200") Message-ID: <86ve33wo1e.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Popen and EVFILT_WRITE question 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 Mar 2008 03:49:35 -0000 Mel writes: > Hi, > > from reading the manpage on EVFILT_WRITE I thought it would be an easy to= use=20 > interface to detect when a program wants input. > So far, that doesn't seem to be the case. Ultimately what I want to do is= pipe=20 > all the popen(3)'d output to a logfile and act on any input it wants. > > Could anyone explain to me why I'm never getting the EVFILT_WRITE event i= n=20 > below testcode? > (It doesn't matter if I open the pipe with w+ or r+). > > test.c: > #include > #include > #include > #include > #include > #include > > int main(int argc, char **argv) > { > FILE *proc; > int kq; > struct kevent changes[2], events[2]; > > proc =3D popen("./test.sh", "w+"); > if( -1 =3D=3D (kq =3D kqueue()) ) > err(EX_OSERR, "Cannot get a kqueue"); > > EV_SET(&changes[0], fileno(proc), EVFILT_WRITE, EV_ADD|EV_ENABLE, 0, > 0, 0); > EV_SET(&changes[1], fileno(proc), EVFILT_READ, EV_ADD|EV_ENABLE, 0, > 0, 0); This is never going to work. First, the second kevent overrides the first, because they both have the same ident. Second, you're going to run into buffering issues. Third, an EVFILT_WRITE event will trigger as long as there is space in the pipe buffer. There is no such thing as "when a program wants input" in Unix; it will either read input or it won't, and what happens when it reads depends entirely on what the fd it reads from is connected to, whether it's a slow or fast device, blocking or non-blocking, etc. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 31 03:51:20 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADD2D1065672 for ; Mon, 31 Mar 2008 03:51:20 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 6A9968FC1A for ; Mon, 31 Mar 2008 03:51:20 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id DADD2207F; Mon, 31 Mar 2008 05:51:18 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Mel References: <200803301220.39921.fbsd.hackers@rachie.is-a-geek.net> <86ve33wo1e.fsf@ds4.des.no> Date: Mon, 31 Mar 2008 05:51:18 +0200 In-Reply-To: <86ve33wo1e.fsf@ds4.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8rg?= =?utf-8?Q?rav=22's?= message of "Mon\, 31 Mar 2008 05\:49\:33 +0200") Message-ID: <86r6drwnyh.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Popen and EVFILT_WRITE question 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 Mar 2008 03:51:20 -0000 Dag-Erling Sm=C3=B8rgrav writes: > [...] Apologies for my atrocious quoting... DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 31 07:10:49 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1609106564A for ; Mon, 31 Mar 2008 07:10:49 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-3.dlr.de (smtp-3.dlr.de [195.37.61.187]) by mx1.freebsd.org (Postfix) with ESMTP id 95F7C8FC1B for ; Mon, 31 Mar 2008 07:10:49 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from knop-beagle.kn.op.dlr.de ([129.247.173.6]) by smtp-3.dlr.de over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Mon, 31 Mar 2008 09:10:46 +0200 Date: Mon, 31 Mar 2008 09:11:28 +0200 (CEST) From: Harti Brandt X-X-Sender: brandt_h@knop-beagle.kn.op.dlr.de To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= In-Reply-To: <86ve33wo1e.fsf@ds4.des.no> Message-ID: <20080331090902.P89672@knop-beagle.kn.op.dlr.de> References: <200803301220.39921.fbsd.hackers@rachie.is-a-geek.net> <86ve33wo1e.fsf@ds4.des.no> X-OpenPGP-Key: harti@freebsd.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 31 Mar 2008 07:10:46.0921 (UTC) FILETIME=[579B6790:01C892FE] Cc: Mel , freebsd-hackers@freebsd.org Subject: Re: Popen and EVFILT_WRITE question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Harti Brandt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2008 07:10:50 -0000 On Mon, 31 Mar 2008, Dag-Erling Smrgrav wrote: DS>Mel writes: DS> DS>> EV_SET(&changes[0], fileno(proc), EVFILT_WRITE, EV_ADD|EV_ENABLE, 0, DS>> 0, 0); DS>> EV_SET(&changes[1], fileno(proc), EVFILT_READ, EV_ADD|EV_ENABLE, 0, DS>> 0, 0); DS> DS>This is never going to work. DS> DS>First, the second kevent overrides the first, because they both have the DS>same ident. Why is that so? The man page states that the kevent is identified by the (ident, filter) pair. This would also make more sense, because with bi-directional descriptors (sockets or so) you might want to 'select' on read and write. harti From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 31 14:51:19 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E33C1065670 for ; Mon, 31 Mar 2008 14:51:19 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.freebsd.org (Postfix) with ESMTP id DA4698FC2D for ; Mon, 31 Mar 2008 14:51:18 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1JgKji-00012p-Ds for freebsd-hackers@freebsd.org; Mon, 31 Mar 2008 17:11:46 +0300 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 31 Mar 2008 17:11:46 +0300 From: Danny Braniss Message-ID: Subject: MODULES_OVERRIDE magic needed 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 Mar 2008 14:51:19 -0000 hi, I'm trying to compile only a few kernel modules, but using MODULES_OVERRIDE I can only select one module. MODULE_OVERRIDE="unionfs" or MODULE_OVERRIDE="if_sis" is ok, but MODULE_OVERRIDE="if_sis unionfs" failes with either if_sis: not found if it's defined in src.conf, or with make: don't know how to make if_sis from the command line. danny From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 31 15:07:50 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 456CC106566B for ; Mon, 31 Mar 2008 15:07:50 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id E29CD8FC1E for ; Mon, 31 Mar 2008 15:07:49 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id A4DBD1B10F42; Mon, 31 Mar 2008 17:07:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on blah.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.6 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.3 Received: from hater.haters.org (hater.cmotd.com [192.168.3.125]) by blah.sun-fish.com (Postfix) with ESMTP id F21151B10CAA; Mon, 31 Mar 2008 17:07:44 +0200 (CEST) Message-ID: <47F0FE40.2070202@moneybookers.com> Date: Mon, 31 Mar 2008 18:07:44 +0300 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.12 (X11/20080326) MIME-Version: 1.0 To: Danny Braniss References: In-Reply-To: Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/6499/Mon Mar 31 14:58:03 2008 on blah.cmotd.com X-Virus-Status: Clean Cc: freebsd-hackers@freebsd.org Subject: Re: MODULES_OVERRIDE magic needed 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 Mar 2008 15:07:50 -0000 Greetings, Danny Braniss wrote: > hi, > I'm trying to compile only a few kernel modules, but > using MODULES_OVERRIDE I can only select one module. > MODULE_OVERRIDE="unionfs" > or > MODULE_OVERRIDE="if_sis" > is ok, but > MODULE_OVERRIDE="if_sis unionfs" > failes with either > if_sis: not found > if it's defined in src.conf, or with > make: don't know how to make if_sis > from the command line. > MODULES_OVERRIDE=module1 module2 works for me on -current Try removing quotes. > danny > > > _______________________________________________ > 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" > -- Best Wishes, Stefan Lambrev ICQ# 24134177 From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 31 15:33:31 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24483106564A for ; Mon, 31 Mar 2008 15:33:31 +0000 (UTC) (envelope-from grafan@gmail.com) Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.190]) by mx1.freebsd.org (Postfix) with ESMTP id B29618FC1D for ; Mon, 31 Mar 2008 15:33:30 +0000 (UTC) (envelope-from grafan@gmail.com) Received: by gv-out-0910.google.com with SMTP id n40so171506gve.39 for ; Mon, 31 Mar 2008 08:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=t1nENE0ClVtsxYrUdayF0o/HPhc8VTQdgbHdfLrA4R4=; b=XNMn/46IINrLzG0vS3BDN6D9C1oJm9foH5uQDTC4+du8Ttle985A9JeWMzVZ4cTtCiVRnSuwU5ERJtKtFCvO5V5mBQYeSg3gk9zAJhfd9LhCd0lWNkTrZQo2FCNtKX3NU/Wzf3zVexVNGqnN/xO04s0aiY13htd3wMSNhd0S1Rg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=H5JHM13KWYCa9ZfF73nFwWwWiWEDLErGuj9MuVkHjSc3p1ZYT3EgLWbMQ0lwBvU8olOxDN9Hb+hQkEO5r/dShiLFCA52b7evvOvn9pDtNchzpHi2VMu0XRADxNR4Qh6ioQz3ahM5asbc3K207C4Xhmjt0f82GfFgsRtbX9D/BuY= Received: by 10.151.143.3 with SMTP id v3mr3388474ybn.176.1206976031857; Mon, 31 Mar 2008 08:07:11 -0700 (PDT) Received: by 10.150.196.16 with HTTP; Mon, 31 Mar 2008 08:07:11 -0700 (PDT) Message-ID: <6eb82e0803310807j515287cck2b0f026938617ed1@mail.gmail.com> Date: Mon, 31 Mar 2008 23:07:11 +0800 From: "Rong-en Fan" To: "Danny Braniss" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: freebsd-hackers@freebsd.org Subject: Re: MODULES_OVERRIDE magic needed 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 Mar 2008 15:33:31 -0000 On Mon, Mar 31, 2008 at 10:11 PM, Danny Braniss wrote: > hi, > I'm trying to compile only a few kernel modules, but > using MODULES_OVERRIDE I can only select one module. > MODULE_OVERRIDE="unionfs" > or > MODULE_OVERRIDE="if_sis" > is ok, but > MODULE_OVERRIDE="if_sis unionfs" > failes with either > if_sis: not found Try MODULE_OVERRIDE=if_sis unionfs I think that is what I used before. Regards, Rong-En Fan > if it's defined in src.conf, or with > make: don't know how to make if_sis > from the command line. > > danny > > > _______________________________________________ > 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 Mon Mar 31 16:01:44 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81C80106566B for ; Mon, 31 Mar 2008 16:01:44 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 49B2D8FC17 for ; Mon, 31 Mar 2008 16:01:43 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JgMS4-0000O8-W6 for freebsd-hackers@freebsd.org; Mon, 31 Mar 2008 16:01:40 +0000 Received: from 213.202.123.81 ([213.202.123.81]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 Mar 2008 16:01:40 +0000 Received: from ivoras by 213.202.123.81 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 Mar 2008 16:01:40 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Mon, 31 Mar 2008 18:01:48 +0200 Lines: 4 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 213.202.123.81 User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) X-Enigmail-Version: 0.94.1.0 Sender: news Subject: Purpose of O_EXEC? 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 Mar 2008 16:01:44 -0000 Hi, What is the purpose of O_EXEC ("open file for execution") flag to open(2)? Just a hint to the VM system on how to cache the file pages or is there something else that makes it different from O_RDONLY? From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 31 16:05:47 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 319B2106564A for ; Mon, 31 Mar 2008 16:05:47 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay02.kiev.sovam.com (relay02.kiev.sovam.com [62.64.120.197]) by mx1.freebsd.org (Postfix) with ESMTP id CB5F28FC15 for ; Mon, 31 Mar 2008 16:05:46 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.226] (helo=skuns.kiev.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1JgMVw-000FfX-U3; Mon, 31 Mar 2008 19:05:45 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by skuns.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m2VG5gA5084863 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 31 Mar 2008 19:05:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m2VG5WJl014800; Mon, 31 Mar 2008 19:05:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m2VG5WL7014799; Mon, 31 Mar 2008 19:05:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 31 Mar 2008 19:05:31 +0300 From: Kostik Belousov To: Ivan Voras Message-ID: <20080331160531.GL21209@deviant.kiev.zoral.com.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bX/mw5riLlTkt+Gv" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on skuns.kiev.zoral.com.ua X-Scanner-Signature: 5bcd58edb95cdacf596e852bfe0375ec X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 2531 [Mar 31 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: freebsd-hackers@freebsd.org Subject: Re: Purpose of O_EXEC? 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 Mar 2008 16:05:47 -0000 --bX/mw5riLlTkt+Gv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 31, 2008 at 06:01:48PM +0200, Ivan Voras wrote: > Hi, > What is the purpose of O_EXEC ("open file for execution") flag to > open(2)? Just a hint to the VM system on how to cache the file pages or > is there something else that makes it different from O_RDONLY? No, this is the only way to open file that has, for instance, mode 0111. You can get the filedescriptor pointing to this file, that is useful for the fexecve(2). Note that fexecve(2) ignores the open mode of the filedescriptor and checks the vnode access right for the exec. --bX/mw5riLlTkt+Gv Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkfxC8sACgkQC3+MBN1Mb4i21gCcDWNhEpRo3Sq9M1LL22YmIeMO 2DEAn3BKi7WDfWo6agJbOJK/ggqlc32k =AF8k -----END PGP SIGNATURE----- --bX/mw5riLlTkt+Gv-- From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 31 16:40:44 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C4C21065673 for ; Mon, 31 Mar 2008 16:40:44 +0000 (UTC) (envelope-from prvs=19765cc17e=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 8F1C58FC21 for ; Mon, 31 Mar 2008 16:40:43 +0000 (UTC) (envelope-from prvs=19765cc17e=killing@multiplay.co.uk) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=multiplay.co.uk; s=Multiplay; t=1206980885; x=1207585685; q=dns/txt; h=Received: Message-ID:From:To:References:Subject:Date:MIME-Version: Content-Type:Content-Transfer-Encoding; bh=Ij+HW5JbzKsnKJ2S1NZ5X CabIT2N7G2iFJh+lB49KBY=; b=eyRMn9ZqU9db+Wfkhha8BvWTuz8o3nkB7PKor V6+BrO5WXj56NPq3tivgrQuOkHYf/S89KJ4MEg9WeBv++KJgE9yOPW1zHbpHVlHj rTblrsm5/WXHBKx3aG781rAH6KfxIzET+lKvA620Pb/XdmMPwbX5FSSK193xwVby 7VTo8U= X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-14.7 required=6.0 tests=BAYES_00, USER_IN_WHITELIST, USER_IN_WHITELIST_TO autolearn=ham version=3.1.8 Received: from r2d2 by mail1.multiplay.co.uk (MDaemon PRO v9.6.3) with ESMTP id md50005399610.msg for ; Mon, 31 Mar 2008 17:28:02 +0100 Message-ID: <04dc01c8934c$2f4d6ce0$3d010a0a@multiplay.co.uk> From: "Steven Hartland" To: , "Danny Braniss" References: Date: Mon, 31 Mar 2008 17:27:59 +0100 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.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Authenticated-Sender: Killing@multiplay.co.uk X-MDRemoteIP: 213.123.247.160 X-Return-Path: prvs=19765cc17e=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org X-Spam-Processed: mail1.multiplay.co.uk, Mon, 31 Mar 2008 17:28:03 +0100 X-MDAV-Processed: mail1.multiplay.co.uk, Mon, 31 Mar 2008 17:28:05 +0100 Cc: Subject: Re: MODULES_OVERRIDE magic needed 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 Mar 2008 16:40:44 -0000 The following works fine here note its MODULE'S' not MODULE makeoptions MODULES_OVERRIDE="linux linprocfs acpi nfsclient nfsserver nullfs accf_http" Regards Steve ----- Original Message ----- From: "Danny Braniss" To: Sent: Monday, March 31, 2008 3:11 PM Subject: MODULES_OVERRIDE magic needed > hi, > I'm trying to compile only a few kernel modules, but > using MODULES_OVERRIDE I can only select one module. > MODULE_OVERRIDE="unionfs" > or > MODULE_OVERRIDE="if_sis" > is ok, but > MODULE_OVERRIDE="if_sis unionfs" > failes with either > if_sis: not found > if it's defined in src.conf, or with > make: don't know how to make if_sis > from the command line. > > danny > > > _______________________________________________ > 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" > ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 31 18:45:37 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D03C81065672 for ; Mon, 31 Mar 2008 18:45:37 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: from web54302.mail.re2.yahoo.com (web54302.mail.re2.yahoo.com [206.190.49.112]) by mx1.freebsd.org (Postfix) with SMTP id 7E7998FC1E for ; Mon, 31 Mar 2008 18:45:37 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: (qmail 59335 invoked by uid 60001); 31 Mar 2008 18:18:56 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.hk; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=gs43KxMtFDasSF1/LJyCOxs6ntbLWTNvnFExOcSKeBasVeqf2Oz9DEgUd7zXAzqOXXOAoBtcv77jzrSSmKIUjf9Rs98ay27J5bCO80yrDV9Y44WdsvJXt7fp1b7Iyi6qgYii0voJYbZMNbSwy0II4wqD03vVooF/TRlfysnLC18=; X-YMail-OSG: 0JVluREVM1lLfPX62ohR5m6X27fEw6kgbzKmJeghzbeI0RwxY6WVM_uE6OTN3Lhu51xY3C1j6dmoLJzlA6CSv5abCjT5YoQN4.wIiClDl07E6GikiBspqmiCP8C7by1FYKZK7iGn78esqPxEzRilWIhwLQ-- Received: from [61.15.61.52] by web54302.mail.re2.yahoo.com via HTTP; Mon, 31 Mar 2008 11:18:56 PDT Date: Mon, 31 Mar 2008 11:18:56 -0700 (PDT) From: Patrick Dung To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <763154.59087.qm@web54302.mail.re2.yahoo.com> Subject: Feature request 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 Mar 2008 18:45:37 -0000 Hello I have some suggestions about improving FreeBSD in some of the areas/features. Let's discuss. 1. Cluster capability As I know, there is: - Linux HA heartbeart in ports - LVS (Linux Virtual Server for load balancing) for FreeBSD 5.3 in http://dragon.linux-vs.org/~dragonfly/htm/lvs_freebsd.htm - SunGrid in ports. But looks like there is no native FreeBSD clustering/load balancing tools to do it in 'a FreeBSD way'. 2. Networking support As we know FreeBSD has a good history/reputation on networking. FreeBSD lacks these support: a) MPLS For MPLS, Linux has project working since around in 2001. It is called mpls-linux in Sourceforge. There was a project to port Ayame to NetBSD 4.0 current, but I don't know about the outcome. b) NAT-T on IPSEC I see NAT-T patch for FreeBSD 6 in 2005 but the patch not in RELEASE/CURRENT. As I know, there maybe patent infringement for NAT-T. But I see NetBSD 3.0 (with warning) and Linux has NAT-T support out of the box. http://netbsd.gw.com/cgi-bin/man-cgi?ipsec++NetBSD-3.0 c) multiple default gateways Looks like FreeBSD do not support metrics in 'route'. 3. Support LDAP SSO out of the box Linux/Solaris/AIX have native LDAP SSO support. I have asked about this feature before. The problem is whether it should integrate OpenLDAP to base system. BTW, I see ISC Bind, Sendmail and Amd automounter is in base. 4. LVM and file systems As of FreeBSD 7.0, ZFS is ported. This is great as FreeBSD do not have LVM in the past. I am sure there is still room for improvement. For example: ZFS/UFS shrink support, native file system journaling. Regards Patrick ____________________________________________________________________________________ No Cost - Get a month of Blockbuster Total Access now. Sweet deal for Yahoo! users and friends. http://tc.deals.yahoo.com/tc/blockbuster/text1.com From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 31 19:36:18 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 691B21065674 for ; Mon, 31 Mar 2008 19:36:18 +0000 (UTC) (envelope-from mohacsi@niif.hu) Received: from mail.ki.iif.hu (mail.ki.iif.hu [IPv6:2001:738:0:411::241]) by mx1.freebsd.org (Postfix) with ESMTP id DE63A8FC55 for ; Mon, 31 Mar 2008 19:36:17 +0000 (UTC) (envelope-from mohacsi@niif.hu) Received: from localhost (localhost [IPv6:::1]) by mail.ki.iif.hu (Postfix) with ESMTP id CA45384B1F; Mon, 31 Mar 2008 21:36:16 +0200 (CEST) X-Virus-Scanned: by amavisd-new at mignon.ki.iif.hu Received: from mail.ki.iif.hu ([127.0.0.1]) by localhost (mignon.ki.iif.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Ykh7RDSxsbTM; Mon, 31 Mar 2008 21:36:10 +0200 (CEST) Received: by mail.ki.iif.hu (Postfix, from userid 9002) id 26BDA84A1B; Mon, 31 Mar 2008 21:36:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.ki.iif.hu (Postfix) with ESMTP id 25816849B8; Mon, 31 Mar 2008 21:36:10 +0200 (CEST) Date: Mon, 31 Mar 2008 21:36:10 +0200 (CEST) From: Mohacsi Janos X-X-Sender: mohacsi@mignon.ki.iif.hu To: Patrick Dung In-Reply-To: <763154.59087.qm@web54302.mail.re2.yahoo.com> Message-ID: <20080331213205.G26493@mignon.ki.iif.hu> References: <763154.59087.qm@web54302.mail.re2.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Feature request 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 Mar 2008 19:36:18 -0000 On Mon, 31 Mar 2008, Patrick Dung wrote: > Hello > > I have some suggestions about improving FreeBSD in some of the > areas/features. Let's discuss. > > 1. Cluster capability > > As I know, there is: > - Linux HA heartbeart in ports > - LVS (Linux Virtual Server for load balancing) for FreeBSD 5.3 in > http://dragon.linux-vs.org/~dragonfly/htm/lvs_freebsd.htm > - SunGrid in ports. > > But looks like there is no native FreeBSD clustering/load balancing > tools to do it in 'a FreeBSD way'. There is *BSD way of doing loadbalancing with pf. A big plus is the pf supports IPv6, while LVS does not. > > 2. Networking support > > As we know FreeBSD has a good history/reputation on networking. > FreeBSD lacks these support: > > a) MPLS > For MPLS, Linux has project working since around in 2001. > It is called mpls-linux in Sourceforge. > There was a project to port Ayame to NetBSD 4.0 current, but I don't > know about the outcome. > > b) NAT-T on IPSEC > I see NAT-T patch for FreeBSD 6 in 2005 but the patch not in > RELEASE/CURRENT. > > As I know, there maybe patent infringement for NAT-T. > But I see NetBSD 3.0 (with warning) and Linux has NAT-T support out of > the box. > http://netbsd.gw.com/cgi-bin/man-cgi?ipsec++NetBSD-3.0 > > c) multiple default gateways > Looks like FreeBSD do not support metrics in 'route'. This is sometime missing. OpenBSD has good support for it - maybe can be ported from OpenBSD. > > 3. Support LDAP SSO out of the box > > Linux/Solaris/AIX have native LDAP SSO support. > > I have asked about this feature before. > The problem is whether it should integrate OpenLDAP to base system. > BTW, I see ISC Bind, Sendmail and Amd automounter is in base. > unfortunately you have to use the ports for this.... > 4. LVM and file systems > > As of FreeBSD 7.0, ZFS is ported. > This is great as FreeBSD do not have LVM in the past. > I am sure there is still room for improvement. > For example: ZFS/UFS shrink support, native file system journaling. > > Regards > Patrick Janos Mohacsi Network Engineer, Research Associate, Head of Network Planning and Projects NIIF/HUNGARNET, HUNGARY Key 70EF9882: DEC2 C685 1ED4 C95A 145F 4300 6F64 7B00 70EF 9882 > > > ____________________________________________________________________________________ > No Cost - Get a month of Blockbuster Total Access now. Sweet deal for Yahoo! users and friends. > http://tc.deals.yahoo.com/tc/blockbuster/text1.com > _______________________________________________ > 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 Mon Mar 31 19:46:02 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62EE4106566C for ; Mon, 31 Mar 2008 19:46:02 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from snoogles.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 2FF448FC15 for ; Mon, 31 Mar 2008 19:46:02 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from localhost (localhost [127.0.0.1]) by snoogles.rachie.is-a-geek.net (Postfix) with ESMTP id 1DD8E1CC91; Mon, 31 Mar 2008 11:46:01 -0800 (AKDT) From: Mel To: Dag-Erling =?utf-8?q?Sm=C3=B8rgrav?= Date: Mon, 31 Mar 2008 21:45:38 +0200 User-Agent: KMail/1.9.7 References: <200803301220.39921.fbsd.hackers@rachie.is-a-geek.net> <86ve33wo1e.fsf@ds4.des.no> In-Reply-To: <86ve33wo1e.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200803312145.39372.fbsd.hackers@rachie.is-a-geek.net> Cc: freebsd-hackers@freebsd.org Subject: Re: Popen and EVFILT_WRITE question 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 Mar 2008 19:46:02 -0000 On Monday 31 March 2008 05:49:33 Dag-Erling Sm=C3=B8rgrav wrote: > Mel writes: > > Hi, > > > > from reading the manpage on EVFILT_WRITE I thought it would be an easy = to > > use interface to detect when a program wants input. > > So far, that doesn't seem to be the case. Ultimately what I want to do = is > > pipe all the popen(3)'d output to a logfile and act on any input it > > wants. > > > > Could anyone explain to me why I'm never getting the EVFILT_WRITE event > > in below testcode? > > (It doesn't matter if I open the pipe with w+ or r+). > > > > test.c: > > #include > > #include > > #include > > #include > > #include > > #include > > > > int main(int argc, char **argv) > > { > > FILE *proc; > > int kq; > > struct kevent changes[2], events[2]; > > > > proc =3D popen("./test.sh", "w+"); > > if( -1 =3D=3D (kq =3D kqueue()) ) > > err(EX_OSERR, "Cannot get a kqueue"); > > > > EV_SET(&changes[0], fileno(proc), EVFILT_WRITE, EV_ADD|EV_ENABLE, 0, > > 0, 0); > > EV_SET(&changes[1], fileno(proc), EVFILT_READ, EV_ADD|EV_ENABLE, 0, > > 0, 0); > > This is never going to work. > > First, the second kevent overrides the first, because they both have the > same ident. No, the ident is one part of the uniqueness. The filter type is the second. > Third, an EVFILT_WRITE event will trigger as long as there is space in > the pipe buffer. > There is no such thing as "when a program wants input"=20 > in Unix; Yeah, I figured that out. Still, the write never fires and that seems like = a=20 bug to me, cause it should fire since there's space in the buffer. In fact,= =20 if you fill the buffer partially before going into the event loop, it does= =20 fire each loop. Plan was to use trickery like fill the buffer up to PIPE_SIZE and when it's= =20 drained means the child read the input and we should fill it again. Then I saw the various pipe sizes and didn't think it would be a good idea,= so=20 went with a timeout of 'no input received' instead. > it will either read input or it won't, and what happens when it=20 > reads depends entirely on what the fd it reads from is connected to, > whether it's a slow or fast device, blocking or non-blocking, etc. The kernel knows that the fd at the end of the pipe is blocked for reading.= =20 Does it also know it's the end of a pipe and what's on the other end? Cause= =20 it would be a cool filter to have, if you could detect a blocked child as a= =20 parent. It sure is better then arbitrary timeouts (this code will run 'make= =20 install' as a daemon(3) and write 'yes' on those nasty post-install questio= ns=20 in ports). =2D-=20 Mel From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 31 21:26:40 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7D27106564A for ; Mon, 31 Mar 2008 21:26:40 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (student.mired.org [66.92.153.77]) by mx1.freebsd.org (Postfix) with ESMTP id 7ED248FC1D for ; Mon, 31 Mar 2008 21:26:40 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 79283 invoked by uid 1001); 31 Mar 2008 17:25:54 -0400 Received: from bhuda.mired.org (192.168.195.1) by bhuda.mired.org (tmda-ofmipd) with ESMTP; Mon, 31 Mar 2008 17:25:53 -0400 Date: Mon, 31 Mar 2008 17:25:52 -0400 To: Patrick Dung Message-ID: <20080331172552.313e8d49@bhuda.mired.org> In-Reply-To: <763154.59087.qm@web54302.mail.re2.yahoo.com> References: <763154.59087.qm@web54302.mail.re2.yahoo.com> Organization: Meyer Consulting X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; amd64-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Mike Meyer Cc: freebsd-hackers@freebsd.org Subject: Re: Feature request 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 Mar 2008 21:26:40 -0000 On Mon, 31 Mar 2008 11:18:56 -0700 (PDT) Patrick Dung wrote: > 3. Support LDAP SSO out of the box > > Linux/Solaris/AIX have native LDAP SSO support. > I have asked about this feature before. > > The problem is whether it should integrate OpenLDAP to base system. Why OpenLDAP? Why not one of the other ldap implementations available in the ports? In particular, do any of them already have plugins for use with pam? > BTW, I see ISC Bind, Sendmail and Amd automounter is in base. Yes, but you're asking to move a major chunk of functionality into the base from ports. That doesn't really happen very often, for lots of good reasons. Those reasons are often used to suggest that the packages you just named be moved *out* of the base system, but that's not much easier than moving things into it. The other issue is - well, how much use is this for ports? After all, most of the servers you're going to install come from ports, so if they don't play here, then there's not much of a win. > 4. LVM and file systems > As of FreeBSD 7.0, ZFS is ported. > This is great as FreeBSD do not have LVM in the past. True, there's no "volume manager" per se. On the other hand, most of the functionality provided by a volume manager is available through the geom system. Frankly, geom is a lot saner than the volume managers I've dealt with. > I am sure there is still room for improvement. > For example: ZFS/UFS shrink support, native file system journaling. Um, is something wrong with gjournal? Or for that matter, soft updates (which solve the same problem that journaling does, only with lower overhead)? FreeBSD is an open source, volunteer driven project. A list of "nice to haves" is cool for your personal use, but if you want to actually make any of them happen, then you're the best person to do that. Either start coding yourself, or convince somebody else to do it (and you'll find cash offers work fairly well). Even then, it may not make it into the base system. Being available as a port is often considered sufficient, or it may be that your changes aren't considered appropriate for some other reason, like duplicating functionality that already exists. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 06:03:34 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA1D9106564A for ; Tue, 1 Apr 2008 06:03:34 +0000 (UTC) (envelope-from nikhil.rao@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx1.freebsd.org (Postfix) with ESMTP id A55878FC41 for ; Tue, 1 Apr 2008 06:03:34 +0000 (UTC) (envelope-from nikhil.rao@intel.com) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 31 Mar 2008 23:03:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.25,585,1199692800"; d="scan'208";a="363875546" Received: from orsmsx334.amr.corp.intel.com (HELO orsmsx334.jf.intel.com) ([10.22.226.45]) by orsmga001.jf.intel.com with ESMTP; 31 Mar 2008 23:03:34 -0700 Received: from orsmsx419.amr.corp.intel.com ([10.22.226.88]) by orsmsx334.jf.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 31 Mar 2008 23:03:33 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Mon, 31 Mar 2008 23:03:31 -0700 Message-ID: <12A5C15467D5B94F8E0FF265D9498ADD02CBF8FF@orsmsx419.amr.corp.intel.com> In-reply-to: <20080329120018.0A8F5106567F@hub.freebsd.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: pfind() and the proc structure Thread-Index: AciRlVXRan1T6qPHQM+SE5skl3WtfwCJwAKw References: <20080329120018.0A8F5106567F@hub.freebsd.org> From: "Rao, Nikhil" To: X-OriginalArrivalTime: 01 Apr 2008 06:03:33.0875 (UTC) FILETIME=[1E232C30:01C893BE] Subject: pfind() and the proc structure 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 Apr 2008 06:03:34 -0000 Hi List, The pfind(..) (in kern_proc.c) function below returns the proc structure for the PID passed in Say the thread that calls pfind() gets blocked at PROC_LOCK(p) (line 255 below), in the meantime what prevents the process from exiting and deallocating the proc structure ? Maybe I am missing something simple or the answer requires knowledge of the mutex implementation. Thanks, Nikhil 242 struct proc * 243 pfind(pid) 244 register pid_t pid; 245 { 246 register struct proc *p; 247=20 248 sx_slock(&allproc_lock); 249 LIST_FOREACH(p, PIDHASH(pid), p_hash) 250 if (p->p_pid =3D=3D pid) { 251 if (p->p_state =3D=3D PRS_NEW) { 252 p =3D NULL; 253 break; 254 } 255 PROC_LOCK(p); 256 break; 257 } 258 sx_sunlock(&allproc_lock); 259 return (p); 260 } From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 06:36:38 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53FFC106564A for ; Tue, 1 Apr 2008 06:36:38 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.freebsd.org (Postfix) with ESMTP id 054478FC14 for ; Tue, 1 Apr 2008 06:36:37 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1Jga6m-000Cj7-CY for freebsd-hackers@freebsd.org; Tue, 01 Apr 2008 09:36:36 +0300 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 01 Apr 2008 09:36:36 +0300 From: Danny Braniss Message-ID: Subject: Re: MODULES_OVERRIDE magic needed 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 Apr 2008 06:36:38 -0000 > The following works fine here note its MODULE'S' not MODULE > > makeoptions MODULES_OVERRIDE="linux linprocfs acpi nfsclient nfsserver nullfs accf_http" > > Regards > Steve > > hi, > > I'm trying to compile only a few kernel modules, but > > using MODULES_OVERRIDE I can only select one module. > > MODULE_OVERRIDE="unionfs" > > or > > MODULE_OVERRIDE="if_sis" > > is ok, but > > MODULE_OVERRIDE="if_sis unionfs" > > failes with either > > if_sis: not found > > if it's defined in src.conf, or with > > make: don't know how to make if_sis > > from the command line. > > > > danny thanks to all who replied! I was getting frustrated, what I forgot to mention was that the 'command' was run from a shell file, and when I tried it directly it worked, so eval to the rescue, in my shell file now: eval "/usr/bin/time $cmd" where cmd was built starting from cmd="MODULES_OVERRIDE=\"sis wlan ndis unionfs\"" thanks again, danny From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 07:56:52 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A60A1065672 for ; Tue, 1 Apr 2008 07:56:52 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id D72BD8FC1F for ; Tue, 1 Apr 2008 07:56:51 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id C117067AAA6; Tue, 1 Apr 2008 09:56:36 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SBprjXyN7tVj; Tue, 1 Apr 2008 09:56:24 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id C501D67A9B2; Tue, 1 Apr 2008 09:56:24 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m317uO7u019811; Tue, 1 Apr 2008 09:56:24 +0200 (CEST) (envelope-from rdivacky) Date: Tue, 1 Apr 2008 09:56:24 +0200 From: Roman Divacky To: "Rao, Nikhil" Message-ID: <20080401075623.GA19770@freebsd.org> References: <20080329120018.0A8F5106567F@hub.freebsd.org> <12A5C15467D5B94F8E0FF265D9498ADD02CBF8FF@orsmsx419.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12A5C15467D5B94F8E0FF265D9498ADD02CBF8FF@orsmsx419.amr.corp.intel.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: pfind() and the proc structure 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 Apr 2008 07:56:52 -0000 On Mon, Mar 31, 2008 at 11:03:31PM -0700, Rao, Nikhil wrote: > Hi List, > > The pfind(..) (in kern_proc.c) function below returns the proc structure > for the PID passed in > > Say the thread that calls pfind() gets blocked at PROC_LOCK(p) (line 255 > below), in the meantime what prevents the process from exiting and > deallocating the proc structure ? Maybe I am missing something simple or > the answer requires knowledge of the mutex implementation. thats what the allproc_lock is there for From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 10:14:11 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE632106564A for ; Tue, 1 Apr 2008 10:14:11 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id B35DF8FC18 for ; Tue, 1 Apr 2008 10:14:11 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 24809208C; Tue, 1 Apr 2008 12:14:09 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Mel References: <200803301220.39921.fbsd.hackers@rachie.is-a-geek.net> <86ve33wo1e.fsf@ds4.des.no> <200803312145.39372.fbsd.hackers@rachie.is-a-geek.net> Date: Tue, 01 Apr 2008 12:14:08 +0200 In-Reply-To: <200803312145.39372.fbsd.hackers@rachie.is-a-geek.net> (Mel's message of "Mon\, 31 Mar 2008 21\:45\:38 +0200") Message-ID: <868wzx287j.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Popen and EVFILT_WRITE question 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 Apr 2008 10:14:12 -0000 Mel writes: > Dag-Erling Sm=C3=B8rgrav writes: > > it will either read input or it won't, and what happens when it > > reads depends entirely on what the fd it reads from is connected to, > > whether it's a slow or fast device, blocking or non-blocking, etc. > The kernel knows that the fd at the end of the pipe is blocked for > reading.=20 I'm not sure what you mean by that; do you mean that it's sleeping in read() or similar? What if it uses select(), poll() or kqueue() instead? > Does it also know it's the end of a pipe and what's on the other end? Cau= se=20 > it would be a cool filter to have, if you could detect a blocked child as= a=20 > parent. It sure is better then arbitrary timeouts (this code will run 'ma= ke=20 > install' as a daemon(3) and write 'yes' on those nasty post-install quest= ions=20 > in ports). Many ports will simply use the default configuration instead of asking if you build them with -DBATCH. Those that don't should be fixed, unless there is a very good reason (such as asking the user to accept a license before installing). You could also ask somebody in portmgr@ how the package-building cluster deals with this. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 12:52:06 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1BB7106566B for ; Tue, 1 Apr 2008 12:52:06 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: from web54306.mail.re2.yahoo.com (web54306.mail.re2.yahoo.com [206.190.49.116]) by mx1.freebsd.org (Postfix) with SMTP id 948F88FC27 for ; Tue, 1 Apr 2008 12:52:06 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: (qmail 95712 invoked by uid 60001); 1 Apr 2008 12:52:05 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.hk; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=RdsCShNT1DQg0QTDsR9WkeI5Vm3QTanZ1GPhwLm8n5pTRJgIG6StHZverG/VbN/qP4FbN/jFppiPMRxInCQsm2WVe2zPrhaieK3UJ844zNz/pqEObHbFdfBJECHZT4ONA5cNY+1LNVX0/zxMekd7mKFzpJpG5WgThTEzDYSLcgk=; X-YMail-OSG: IwNj5WkVM1mixjVUuuaaRWsVeJiQuGG4R9lBZmWgY3k95sxVvXZCsSikhDQEarTAEhY3sIn4fUIHNwX_T2M_UPr2pfLu1aGnMBQ- Received: from [61.15.61.52] by web54306.mail.re2.yahoo.com via HTTP; Tue, 01 Apr 2008 05:52:05 PDT Date: Tue, 1 Apr 2008 05:52:05 -0700 (PDT) From: Patrick Dung To: Mohacsi Janos In-Reply-To: <20080331213205.G26493@mignon.ki.iif.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <771941.95149.qm@web54306.mail.re2.yahoo.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Feature request 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 Apr 2008 12:52:07 -0000 --- Mohacsi Janos wrote: > > > > On Mon, 31 Mar 2008, Patrick Dung wrote: > > > Hello > > > > I have some suggestions about improving FreeBSD in some of the > > areas/features. Let's discuss. > > > > 1. Cluster capability > > > > As I know, there is: > > - Linux HA heartbeart in ports > > - LVS (Linux Virtual Server for load balancing) for FreeBSD 5.3 in > > http://dragon.linux-vs.org/~dragonfly/htm/lvs_freebsd.htm > > - SunGrid in ports. > > > > But looks like there is no native FreeBSD clustering/load balancing > > tools to do it in 'a FreeBSD way'. > > There is *BSD way of doing loadbalancing with pf. A big plus is the > pf > supports IPv6, while LVS does not. > Yes, I missed the 'sticky-address' feature of pf which can do the stick session. And we have pf CRAP to do the HA. > > > > > > 2. Networking support > > > > As we know FreeBSD has a good history/reputation on networking. > > FreeBSD lacks these support: > > > > a) MPLS > > For MPLS, Linux has project working since around in 2001. > > It is called mpls-linux in Sourceforge. > > There was a project to port Ayame to NetBSD 4.0 current, but I > don't > > know about the outcome. > > > > b) NAT-T on IPSEC > > I see NAT-T patch for FreeBSD 6 in 2005 but the patch not in > > RELEASE/CURRENT. > > > > As I know, there maybe patent infringement for NAT-T. > > But I see NetBSD 3.0 (with warning) and Linux has NAT-T support out > of > > the box. > > http://netbsd.gw.com/cgi-bin/man-cgi?ipsec++NetBSD-3.0 > > > > c) multiple default gateways > > Looks like FreeBSD do not support metrics in 'route'. > > > This is sometime missing. OpenBSD has good support for it - maybe can > be > ported from OpenBSD. > > > > > > 3. Support LDAP SSO out of the box > > > > Linux/Solaris/AIX have native LDAP SSO support. > > > > I have asked about this feature before. > > The problem is whether it should integrate OpenLDAP to base system. > > BTW, I see ISC Bind, Sendmail and Amd automounter is in base. > > > > unfortunately you have to use the ports for this.... > > > > 4. LVM and file systems > > > > As of FreeBSD 7.0, ZFS is ported. > > This is great as FreeBSD do not have LVM in the past. > > I am sure there is still room for improvement. > > For example: ZFS/UFS shrink support, native file system journaling. > > > > Regards > > Patrick > > Janos Mohacsi > Network Engineer, Research Associate, Head of Network Planning and > Projects > NIIF/HUNGARNET, HUNGARY > Key 70EF9882: DEC2 C685 1ED4 C95A 145F 4300 6F64 7B00 70EF 9882 > > > > > > > > > > ____________________________________________________________________________________ > > No Cost - Get a month of Blockbuster Total Access now. Sweet deal > for Yahoo! users and friends. > > http://tc.deals.yahoo.com/tc/blockbuster/text1.com > > _______________________________________________ > > 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" > > > Regards Patrick ____________________________________________________________________________________ OMG, Sweet deal for Yahoo! users/friends:Get A Month of Blockbuster Total Access, No Cost. W00t http://tc.deals.yahoo.com/tc/blockbuster/text2.com From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 13:00:22 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 796031065670 for ; Tue, 1 Apr 2008 13:00:22 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 30A6B8FC19 for ; Tue, 1 Apr 2008 13:00:21 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Jgg67-0000lZ-3W for freebsd-hackers@freebsd.org; Tue, 01 Apr 2008 13:00:19 +0000 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Apr 2008 13:00:19 +0000 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 01 Apr 2008 13:00:19 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Tue, 01 Apr 2008 15:00:05 +0200 Lines: 29 Message-ID: References: <763154.59087.qm@web54302.mail.re2.yahoo.com> <20080331172552.313e8d49@bhuda.mired.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig68A2ECC2294B67B4C7FF3644" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.6 (X11/20071022) In-Reply-To: <20080331172552.313e8d49@bhuda.mired.org> X-Enigmail-Version: 0.95.0 Sender: news Subject: Re: Feature request 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 Apr 2008 13:00:22 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig68A2ECC2294B67B4C7FF3644 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > Why OpenLDAP? Why not one of the other ldap implementations available > in the ports? In particular, do any of them already have plugins for > use with pam? What are the other LDAP implementations in ports? Especially the ones that are actively maintained (which excludes tinyldap)? Any compliant LDAP server with proper schemas will "support" PAM. --------------enig68A2ECC2294B67B4C7FF3644 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.6 (GNU/Linux) iD8DBQFH8jHbldnAQVacBcgRAtbWAKCLn1tvLRfH1ToEqDCps32Ad4aRUwCg4k6G vvgudy9qxYqeAyEvyfB8uFQ= =ym+Y -----END PGP SIGNATURE----- --------------enig68A2ECC2294B67B4C7FF3644-- From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 13:04:01 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77327106564A for ; Tue, 1 Apr 2008 13:04:01 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: from web54307.mail.re2.yahoo.com (web54307.mail.re2.yahoo.com [206.190.49.117]) by mx1.freebsd.org (Postfix) with SMTP id 367CF8FC1D for ; Tue, 1 Apr 2008 13:04:01 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: (qmail 2774 invoked by uid 60001); 1 Apr 2008 13:04:00 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.hk; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=PV8lIqxXwnAumXNkhLZkNicwEuLbn86td6fsC2lKd0jleuogbTc52IMG47eXOSP3On6TqwCNVkEp++TRr2sPGwo1rJJobWFEAOXi8/AC1rJspNJl224A4AWoS/zKrcqRMqUnHVRrf4IiKP+IGEZxbIeXpBNPC8dUScQUlUg0upQ=; X-YMail-OSG: iCeIfJkVM1nbvD_rAwdYZvOqHQZaBjMhysqeEJnVqKLWtBNNZCXsxio4UGVpBUp8ETz.tdV8dstLZRvsp3MIXiUo3sK2ZwQ_y6OgnfXeczLblEDgjooO5pMfp6U__y4BOHyreb3QbA-- Received: from [61.15.61.52] by web54307.mail.re2.yahoo.com via HTTP; Tue, 01 Apr 2008 06:04:00 PDT Date: Tue, 1 Apr 2008 06:04:00 -0700 (PDT) From: Patrick Dung To: Mike Meyer In-Reply-To: <20080331172552.313e8d49@bhuda.mired.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <313741.2077.qm@web54307.mail.re2.yahoo.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Feature request 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 Apr 2008 13:04:01 -0000 --- Mike Meyer wrote: > On Mon, 31 Mar 2008 11:18:56 -0700 (PDT) > Patrick Dung wrote: > > > 3. Support LDAP SSO out of the box > > > > Linux/Solaris/AIX have native LDAP SSO support. > > I have asked about this feature before. > > > > The problem is whether it should integrate OpenLDAP to base system. > > Why OpenLDAP? Why not one of the other ldap implementations available > in the ports? In particular, do any of them already have plugins for > use with pam? > OpenLDAP, nss_ldap, pam_ldap should be the stable. It was around for years and most Linux distro come with it. For Solaris, it comes with Sun Microsystems implementation of LDAP library. > > BTW, I see ISC Bind, Sendmail and Amd automounter is in base. > > Yes, but you're asking to move a major chunk of functionality into > the > base from ports. That doesn't really happen very often, for lots of > good reasons. Those reasons are often used to suggest that the > packages you just named be moved *out* of the base system, but that's > not much easier than moving things into it. > > The other issue is - well, how much use is this for ports? After all, > most of the servers you're going to install come from ports, so if > they don't play here, then there's not much of a win. In the past, in my University. There are several computer labs. They run around 200 Solaris and Linux workstations. I guess the total number of students in the faculty is around a thousand. Of course LDAP SSO comes into play. > > > 4. LVM and file systems > > As of FreeBSD 7.0, ZFS is ported. > > This is great as FreeBSD do not have LVM in the past. > > True, there's no "volume manager" per se. On the other hand, most of > the functionality provided by a volume manager is available through > the geom system. Frankly, geom is a lot saner than the volume > managers > I've dealt with. > > > I am sure there is still room for improvement. > > For example: ZFS/UFS shrink support, native file system journaling. > > Um, is something wrong with gjournal? Or for that matter, soft > updates > (which solve the same problem that journaling does, only with lower > overhead)? > > FreeBSD is an open source, volunteer driven project. A list of "nice > to haves" is cool for your personal use, but if you want to actually > make any of them happen, then you're the best person to do > that. Either start coding yourself, or convince somebody else to do > it > (and you'll find cash offers work fairly well). Even then, it may not > make it into the base system. Being available as a port is often > considered sufficient, or it may be that your changes aren't > considered appropriate for some other reason, like duplicating > functionality that already exists. > > -- > Mike Meyer http://www.mired.org/consulting.html > Independent Network/Unix/Perforce consultant, email for more > information. > _______________________________________________ > 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" > ____________________________________________________________________________________ Special deal for Yahoo! users & friends - No Cost. Get a month of Blockbuster Total Access now http://tc.deals.yahoo.com/tc/blockbuster/text3.com From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 14:26:45 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CDC0106564A for ; Tue, 1 Apr 2008 14:26:45 +0000 (UTC) (envelope-from nikhil.rao@intel.com) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx1.freebsd.org (Postfix) with ESMTP id F1B268FC16 for ; Tue, 1 Apr 2008 14:26:44 +0000 (UTC) (envelope-from nikhil.rao@intel.com) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 01 Apr 2008 07:24:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.25,587,1199692800"; d="scan'208";a="543609932" Received: from orsmsx335.amr.corp.intel.com (HELO orsmsx335.jf.intel.com) ([10.22.226.40]) by fmsmga001.fm.intel.com with ESMTP; 01 Apr 2008 07:24:23 -0700 Received: from orsmsx419.amr.corp.intel.com ([10.22.226.88]) by orsmsx335.jf.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 1 Apr 2008 07:23:59 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Tue, 1 Apr 2008 07:23:58 -0700 Message-ID: <12A5C15467D5B94F8E0FF265D9498ADD02CBF949@orsmsx419.amr.corp.intel.com> In-reply-to: <20080401075623.GA19770@freebsd.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: pfind() and the proc structure Thread-Index: AciTzthz5+ThCcMkSz6VmsL6hivvFQANLPYw References: <20080329120018.0A8F5106567F@hub.freebsd.org> <12A5C15467D5B94F8E0FF265D9498ADD02CBF8FF@orsmsx419.amr.corp.intel.com> <20080401075623.GA19770@freebsd.org> From: "Rao, Nikhil" To: "Roman Divacky" X-OriginalArrivalTime: 01 Apr 2008 14:23:59.0421 (UTC) FILETIME=[06C1E6D0:01C89404] Cc: freebsd-hackers@freebsd.org Subject: RE: pfind() and the proc structure 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 Apr 2008 14:26:45 -0000 Ok, I should have caught that :-( Another question -=20 Now that the PROC_LOCK on p is obtained the all_proc lock is released and the function returns, at this point can't the proc get deallocated ? Nikhil 242 struct proc * 243 pfind(pid) 244 register pid_t pid; 245 { 246 register struct proc *p; 247=20 248 sx_slock(&allproc_lock); 249 LIST_FOREACH(p, PIDHASH(pid), p_hash) 250 if (p->p_pid =3D=3D pid) { 251 if (p->p_state =3D=3D PRS_NEW) { 252 p =3D NULL; 253 break; 254 } 255 PROC_LOCK(p); 256 break; 257 } 258 sx_sunlock(&allproc_lock); 259 return (p); 260 } -----Original Message----- From: Roman Divacky [mailto:rdivacky@freebsd.org]=20 Sent: Tuesday, April 01, 2008 12:56 AM To: Rao, Nikhil Cc: freebsd-hackers@freebsd.org Subject: Re: pfind() and the proc structure On Mon, Mar 31, 2008 at 11:03:31PM -0700, Rao, Nikhil wrote: > Hi List, >=20 > The pfind(..) (in kern_proc.c) function below returns the proc structure > for the PID passed in >=20 > Say the thread that calls pfind() gets blocked at PROC_LOCK(p) (line 255 > below), in the meantime what prevents the process from exiting and > deallocating the proc structure ? Maybe I am missing something simple or > the answer requires knowledge of the mutex implementation. thats what the allproc_lock is there for From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 14:33:07 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEE18106564A for ; Tue, 1 Apr 2008 14:33:07 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 82BE68FC32 for ; Tue, 1 Apr 2008 14:33:07 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id EFB3E67B40B; Tue, 1 Apr 2008 16:32:51 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id POwzlj6Z8uDa; Tue, 1 Apr 2008 16:32:36 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 5279E679387; Tue, 1 Apr 2008 16:32:36 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m31EWZId051811; Tue, 1 Apr 2008 16:32:35 +0200 (CEST) (envelope-from rdivacky) Date: Tue, 1 Apr 2008 16:32:35 +0200 From: Roman Divacky To: "Rao, Nikhil" Message-ID: <20080401143235.GA51785@freebsd.org> References: <20080329120018.0A8F5106567F@hub.freebsd.org> <12A5C15467D5B94F8E0FF265D9498ADD02CBF8FF@orsmsx419.amr.corp.intel.com> <20080401075623.GA19770@freebsd.org> <12A5C15467D5B94F8E0FF265D9498ADD02CBF949@orsmsx419.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12A5C15467D5B94F8E0FF265D9498ADD02CBF949@orsmsx419.amr.corp.intel.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: pfind() and the proc structure 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 Apr 2008 14:33:07 -0000 On Tue, Apr 01, 2008 at 07:23:58AM -0700, Rao, Nikhil wrote: > > Ok, I should have caught that :-( Another question - > Now that the PROC_LOCK on p is obtained the all_proc lock is released > and the function returns, at this point can't the proc get deallocated ? well.. thats why you hold the proc lock, isnt it? :) From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 15:08:04 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B32DD1065671 for ; Tue, 1 Apr 2008 15:08:04 +0000 (UTC) (envelope-from mwm@mired.org) Received: from mired.org (student.mired.org [66.92.153.77]) by mx1.freebsd.org (Postfix) with ESMTP id 4176C8FC22 for ; Tue, 1 Apr 2008 15:08:04 +0000 (UTC) (envelope-from mwm@mired.org) Received: (qmail 98389 invoked from network); 1 Apr 2008 11:07:17 -0400 Received: from unknown (HELO mbook-fbsd) (192.168.195.251) by 0 with SMTP; 1 Apr 2008 11:07:17 -0400 Date: Tue, 1 Apr 2008 11:07:59 -0400 From: Mike Meyer To: Ivan Voras Message-ID: <20080401110759.040dc4a9@mbook-fbsd> In-Reply-To: References: <763154.59087.qm@web54302.mail.re2.yahoo.com> <20080331172552.313e8d49@bhuda.mired.org> Organization: Meyer Consulting X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.5; amd64-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 01 Apr 2008 15:29:40 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: Feature request 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 Apr 2008 15:08:04 -0000 On Tue, 01 Apr 2008 15:00:05 +0200 Ivan Voras wrote: > > > Why OpenLDAP? Why not one of the other ldap implementations available > > in the ports? In particular, do any of them already have plugins for > > use with pam? > > What are the other LDAP implementations in ports? Especially the ones > that are actively maintained (which excludes tinyldap)? Any compliant > LDAP server with proper schemas will "support" PAM. Why does it need to be actively maintained? After all, if we're going to pull it into the base system, we'll have to find someone to actively maintain the code in the base system. If no one is maintaining the code externally, that in some ways makes their job easier. And I didn't say "support", I said "already have plugins". Sure, anything can be connected to PAM if you can get someone to write the plugins. Or are you saying there's already an ldap plugin that uses ldap schemas? http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 15:59:34 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 717491065675 for ; Tue, 1 Apr 2008 15:59:34 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.232]) by mx1.freebsd.org (Postfix) with ESMTP id 153A38FC13 for ; Tue, 1 Apr 2008 15:59:33 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by wr-out-0506.google.com with SMTP id 50so1296352wra.13 for ; Tue, 01 Apr 2008 08:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=PRPGmL3Z7XjjPfKhm76Zx/eWd5qKANatRxXLE4mTvsw=; b=RVr4yITNNbOioOJSJg5BOTC6/S4tsDYMf69f6x6sgQojXCMDKFfMAsxDiOVABeRaeDnPg0n5S3V+tmiKalSYH6QrlJphzY/f2KwOjuK/HTcsV6RilnGTLWqueTe4ESbBzkhj9/sOuvjQvyyCvCuuV8fhaErVBcLDCcoaCMpjyyw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=VpqB91V6WiIUTFx9HacVM31WXS88S0JYnYOhLoL1Ooifedq4WaYcnas34srDWnjJIhCILcSgEZxC3TI47MLAIEXRvnG75rV+MnOpIjqhni0YEmgh+wybwL8zFSvXB7T9ZxGnadejAn4f1DoSUGLUFndqZIc2+69uOp21yxvxR6g= Received: by 10.141.154.5 with SMTP id g5mr4384488rvo.290.1207065572074; Tue, 01 Apr 2008 08:59:32 -0700 (PDT) Received: by 10.141.212.1 with HTTP; Tue, 1 Apr 2008 08:59:32 -0700 (PDT) Message-ID: <9bbcef730804010859m57518fcdmf243306f64f0ee80@mail.gmail.com> Date: Tue, 1 Apr 2008 17:59:32 +0200 From: "Ivan Voras" Sender: ivoras@gmail.com To: "Mike Meyer" In-Reply-To: <20080401110759.040dc4a9@mbook-fbsd> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <763154.59087.qm@web54302.mail.re2.yahoo.com> <20080331172552.313e8d49@bhuda.mired.org> <20080401110759.040dc4a9@mbook-fbsd> X-Google-Sender-Auth: 24219a986d8ab238 Cc: freebsd-hackers@freebsd.org Subject: Re: Feature request 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 Apr 2008 15:59:34 -0000 On 01/04/2008, Mike Meyer wrote: > On Tue, 01 Apr 2008 15:00:05 +0200 Ivan Voras wrote: > > > > > > Why OpenLDAP? Why not one of the other ldap implementations available > > > in the ports? In particular, do any of them already have plugins for > > > use with pam? > > > > What are the other LDAP implementations in ports? Especially the ones > > that are actively maintained (which excludes tinyldap)? Any compliant > > LDAP server with proper schemas will "support" PAM. > > Why does it need to be actively maintained? After all, if we're going > to pull it into the base system, we'll have to find someone to > actively maintain the code in the base system. If no one is > maintaining the code externally, that in some ways makes their job > easier. Because history shows that even currently supported software (bind, sendmail, gcc) are hard to maintain :) It would take a person to pick up actively maintaining a software if its practically dead before even thinking of putting it in base. (Though those things could happen simultaneously - someone picking it up and putting it in base, the probability is very low). > And I didn't say "support", I said "already have plugins". Sure, > anything can be connected to PAM if you can get someone to write the > plugins. Or are you saying there's already an ldap plugin that uses > ldap schemas? Yes. I've been using pam_ldap and nss_ldap soon after they were available on FreeBSD (i.e. somewhere in the 5.x lifecycle). These support any LDAP server that has proper schemas (think of "LDAP schema" as a struct in C or a SQL table structure...). From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 16:30:23 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37FFE106564A for ; Tue, 1 Apr 2008 16:30:23 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id E05C48FC1F for ; Tue, 1 Apr 2008 16:30:22 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender:X-Spam-Status:Subject; b=XoaILv9eHJo81YtGRvtBOpY87Eg7kAGFzuERjP/IKhX88734c8Olsq92rZjBPhhsNwjP82VRr+lc1aeYuKGA3w373+JjCUctmVEd3MQoep93Y63N6hIeGI/njcW0PY/loPvU7ye03l7POSMC2rcvBqLIcLVgbJ3mA2ZBtLIscFQ=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1JgjC3-000FPN-6y; Tue, 01 Apr 2008 20:18:39 +0400 Date: Tue, 1 Apr 2008 20:18:38 +0400 From: Eygene Ryabinkin To: Patrick Dung Message-ID: References: <763154.59087.qm@web54302.mail.re2.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <763154.59087.qm@web54302.mail.re2.yahoo.com> Sender: rea-fbsd@codelabs.ru X-Spam-Status: No, score=-1.7 required=4.0 tests=ALL_TRUSTED,AWL,BAYES_50 Cc: freebsd-hackers@freebsd.org Subject: Re: Feature request 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 Apr 2008 16:30:23 -0000 Patrick, good day. Mon, Mar 31, 2008 at 11:18:56AM -0700, Patrick Dung wrote: > 4. LVM and file systems > > As of FreeBSD 7.0, ZFS is ported. > This is great as FreeBSD do not have LVM in the past. FreeBSD has gvinum since approximately 5.x and vinum since rather old days (3.0). Is something wrong with these LVMs? -- Eygene From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 17:24:46 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 398701065671 for ; Tue, 1 Apr 2008 17:24:46 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: from web54304.mail.re2.yahoo.com (web54304.mail.re2.yahoo.com [206.190.49.114]) by mx1.freebsd.org (Postfix) with SMTP id C02818FC21 for ; Tue, 1 Apr 2008 17:24:45 +0000 (UTC) (envelope-from patrick_dkt@yahoo.com.hk) Received: (qmail 79137 invoked by uid 60001); 1 Apr 2008 17:24:44 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.hk; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=mrpHPhbsqtiH1Hb3P4klfvhGSD5J4ywDon9Pk06eY+CilyVXKDFWwHr8fQhUHK5k7IO4ePYz6G28QlLyrB0cBNj0xjswievotZ2h2FduM7ENwPK4KuuZl4Ct2cr5dinHvqTFA6WDeqRmT9YNDCY2LIk+oBU+q9hfvyntbh6MRmQ=; X-YMail-OSG: ql9JjV8VM1m_plJWJQLy7grDngT6zBbskcQ1j6404EcVUvPHT3oLVEWzjQ8pWk3flv3Xq2isZ3bPkpJbg6aFNCP_iinoQ85kiKkB4kCP1DtNXB0h1QpQ4Fs7_JmuOWxEoge56.XUbyiVni2FfDAD4xAC3g-- Received: from [61.15.61.52] by web54304.mail.re2.yahoo.com via HTTP; Tue, 01 Apr 2008 10:24:44 PDT Date: Tue, 1 Apr 2008 10:24:44 -0700 (PDT) From: Patrick Dung To: Eygene Ryabinkin In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <702090.76426.qm@web54304.mail.re2.yahoo.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Feature request 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 Apr 2008 17:24:46 -0000 --- Eygene Ryabinkin wrote: > Patrick, good day. > > Mon, Mar 31, 2008 at 11:18:56AM -0700, Patrick Dung wrote: > > 4. LVM and file systems > > > > As of FreeBSD 7.0, ZFS is ported. > > This is great as FreeBSD do not have LVM in the past. > > FreeBSD has gvinum since approximately 5.x and vinum since rather > old days (3.0). Is something wrong with these LVMs? > -- > Eygene > _______________________________________________ > 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" > I think Gvinum more like software raid then LVM (allocate/resize Logical Volume on the fly). BTW, I found a project about LVM2 on FreeBSD: http://romain.blogreen.org/Projects/FreeBSD_LVM2 Regards Patrick ____________________________________________________________________________________ You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. http://tc.deals.yahoo.com/tc/blockbuster/text5.com From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 18:08:35 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 077AD106564A for ; Tue, 1 Apr 2008 18:08:35 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 5778F8FC2E for ; Tue, 1 Apr 2008 18:08:33 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=128) by igloo.linux.gr (8.14.2/8.14.2/Debian-3) with ESMTP id m31HwE78028446 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 1 Apr 2008 20:58:41 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m31Hw6WV003533; Tue, 1 Apr 2008 20:58:06 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m31Hw3Hm003532; Tue, 1 Apr 2008 20:58:03 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: "Rao\, Nikhil" References: <20080329120018.0A8F5106567F@hub.freebsd.org> <12A5C15467D5B94F8E0FF265D9498ADD02CBF8FF@orsmsx419.amr.corp.intel.com> <20080401075623.GA19770@freebsd.org> <12A5C15467D5B94F8E0FF265D9498ADD02CBF949@orsmsx419.amr.corp.intel.com> Date: Tue, 01 Apr 2008 20:58:03 +0300 In-Reply-To: <12A5C15467D5B94F8E0FF265D9498ADD02CBF949@orsmsx419.amr.corp.intel.com> (Nikhil Rao's message of "Tue, 1 Apr 2008 07:23:58 -0700") Message-ID: <878wzxa250.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: m31HwE78028446 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.971, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.43, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@freebsd.org, Roman Divacky Subject: Re: pfind() and the proc structure 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 Apr 2008 18:08:35 -0000 On Tue, 1 Apr 2008 07:23:58 -0700, "Rao, Nikhil" wrote: > Ok, I should have caught that :-( Another question - Now that the > PROC_LOCK on p is obtained the all_proc lock is released and the > function returns, at this point can't the proc get deallocated ? > > Nikhil > > 242 struct proc * > 243 pfind(pid) > 244 register pid_t pid; > 245 { > 246 register struct proc *p; > 247 > 248 sx_slock(&allproc_lock); > 249 LIST_FOREACH(p, PIDHASH(pid), p_hash) > 250 if (p->p_pid == pid) { > 251 if (p->p_state == PRS_NEW) { > 252 p = NULL; > 253 break; > 254 } > 255 PROC_LOCK(p); > 256 break; > 257 } > 258 sx_sunlock(&allproc_lock); > 259 return (p); > 260 } Not until you unlock the specific proc entry. You are holding a lock for the specific proc entry, so anyone trying to `reap' the process would have to wait until you are done with what you are doing. From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 18:48:25 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 910711065686 for ; Tue, 1 Apr 2008 18:48:25 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (keira.kiwi-computer.com [63.224.10.3]) by mx1.freebsd.org (Postfix) with SMTP id 1A2D58FC2E for ; Tue, 1 Apr 2008 18:48:24 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 59347 invoked by uid 2001); 1 Apr 2008 18:21:43 -0000 Date: Tue, 1 Apr 2008 12:21:43 -0600 From: "Rick C. Petty" To: Patrick Dung Message-ID: <20080401182143.GA59286@keira.kiwi-computer.com> References: <702090.76426.qm@web54304.mail.re2.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <702090.76426.qm@web54304.mail.re2.yahoo.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: Feature request X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd@kiwi-computer.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2008 18:48:25 -0000 On Tue, Apr 01, 2008 at 10:24:44AM -0700, Patrick Dung wrote: > > I think Gvinum more like software raid then LVM (allocate/resize > Logical Volume on the fly). vinum *is* a (logical) volume manager. You don't have to use RAID at all, but it's easy enough to do. Resize is currently broken, but lulf@ I think was working on that. There are many things I don't like about LVM at all, particularly in the naming and how impossible it is to setup a root mirror at install (or even mirror whole disks). -- Rick C. Petty From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 1 21:00:17 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96AF41065670 for ; Tue, 1 Apr 2008 21:00:17 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from snoogles.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 63E168FC13 for ; Tue, 1 Apr 2008 21:00:17 +0000 (UTC) (envelope-from fbsd.hackers@rachie.is-a-geek.net) Received: from localhost (localhost [127.0.0.1]) by snoogles.rachie.is-a-geek.net (Postfix) with ESMTP id 4BDCF1CC91; Tue, 1 Apr 2008 13:00:16 -0800 (AKDT) From: Mel To: Dag-Erling =?utf-8?q?Sm=C3=B8rgrav?= Date: Tue, 1 Apr 2008 23:00:10 +0200 User-Agent: KMail/1.9.7 References: <200803301220.39921.fbsd.hackers@rachie.is-a-geek.net> <200803312145.39372.fbsd.hackers@rachie.is-a-geek.net> <868wzx287j.fsf@ds4.des.no> In-Reply-To: <868wzx287j.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200804012300.13313.fbsd.hackers@rachie.is-a-geek.net> Cc: freebsd-hackers@freebsd.org Subject: Re: Popen and EVFILT_WRITE question 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 Apr 2008 21:00:17 -0000 On Tuesday 01 April 2008 12:14:08 Dag-Erling Sm=C3=B8rgrav wrote: > Mel writes: > > Dag-Erling Sm=C3=B8rgrav writes: > > > it will either read input or it won't, and what happens when it > > > reads depends entirely on what the fd it reads from is connected to, > > > whether it's a slow or fast device, blocking or non-blocking, etc. > > > > The kernel knows that the fd at the end of the pipe is blocked for > > reading. > > I'm not sure what you mean by that; do you mean that it's sleeping in > read() or similar? What if it uses select(), poll() or kqueue() > instead? I was hoping the fd had some property "I'm blocked for reading". > > Does it also know it's the end of a pipe and what's on the other end? > > Cause it would be a cool filter to have, if you could detect a blocked > > child as a parent. It sure is better then arbitrary timeouts (this code > > will run 'make install' as a daemon(3) and write 'yes' on those nasty > > post-install questions in ports). > > Many ports will simply use the default configuration instead of asking > if you build them with -DBATCH. Yeah, but that part is in the foreground, cause I don't want default values= , I=20 want to be able to configure the ports and it's dependencies and then build= =20 everything in the background (make config-recursive is flawed by design,=20 that's why I started building this). Looks like BATCH is a good idea though. Thanks for making me look at that=20 again! =2D-=20 Mel From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 2 11:05:18 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF236106566C for ; Wed, 2 Apr 2008 11:05:18 +0000 (UTC) (envelope-from sanjeevfiles@yahoo.com) Received: from web57709.mail.re3.yahoo.com (web57709.mail.re3.yahoo.com [68.142.236.72]) by mx1.freebsd.org (Postfix) with SMTP id 82BCB8FC1D for ; Wed, 2 Apr 2008 11:05:18 +0000 (UTC) (envelope-from sanjeevfiles@yahoo.com) Received: (qmail 3365 invoked by uid 60001); 2 Apr 2008 10:38:36 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=U0BUOhNYC0ue0lkT3evwQJw1+Zjry/bBKTIkRurtLOCydbAV7gfZxf+JQEsWTfqdDjXmAZEjhBf50GRD6Wz7lnKSf/cnUomQl5n9EBeu0B2oXq7UyTuRn+rNtmGPs8RWLUYnRbCl6MDRZVlc8IKvHaTUWxFeYYeJCOOCM+H0/oM=; X-YMail-OSG: 9U0M4pEVM1lNoG9Gsj0fSswzi65Hra5U6mAF5SOkQgAwIXVK7Yv6ETvy4ozrNeJuxhOcXlnrBlR1xes5.ld4sdfYH0Fsn4BCPU9omehJ5KriwNGoTJDWr0lVMMLusg-- Received: from [124.30.112.50] by web57709.mail.re3.yahoo.com via HTTP; Wed, 02 Apr 2008 03:38:36 PDT Date: Wed, 2 Apr 2008 03:38:36 -0700 (PDT) From: "Sanjeev Kumar.S" To: freebsd-hackers@freebsd.org In-Reply-To: MIME-Version: 1.0 Message-ID: <593054.3287.qm@web57709.mail.re3.yahoo.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: seemingly good gdbinit for freebsd kernel errors out 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 Apr 2008 11:05:19 -0000 Hi, Im trying to debug a gdb init script that errors out saying: too few arguments in function call Here is the script define kldload set $kld = linker_files.tqh_first set $done = 0 while ($kld != 0 && $done == 0) if ($kld->filename == $arg0) set $done = 1 else set $kld = $kld->link.tqe_next end end if ($done == 1) shell /usr/bin/objdump -h $arg0 | \ awk '/ .text/ { print "set \$offset = 0x" $6 }' > .kgdb.temp source .kgdb.temp add-symbol-file $arg0 $kld->address + $offset end end document kldload Loads a module. Arguments are module name and offset of text section. end Any thoughts ? Thanks, Sanjeev. --------------------------------- You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 2 12:12:59 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22F72106566C for ; Wed, 2 Apr 2008 12:12:59 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from mail5out.barnet.com.au (mail5.barnet.com.au [202.83.178.78]) by mx1.freebsd.org (Postfix) with ESMTP id D5CF08FC22 for ; Wed, 2 Apr 2008 12:12:58 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: by mail5out.barnet.com.au (Postfix, from userid 1001) id 74BEF22189E1; Wed, 2 Apr 2008 22:54:09 +1100 (EST) X-Viruscan-Id: <47F373E1000007C6355E93@BarNet> Received: from mail5auth.barnet.com.au (mail5.barnet.com.au [202.83.178.78]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail5auth.barnet.com.au", Issuer "*.barnet.com.au" (verified OK)) by mail5.barnet.com.au (Postfix) with ESMTP id 36EDE21B228E for ; Wed, 2 Apr 2008 22:54:09 +1100 (EST) Received: from k7.mavetju (k7.mavetju.org [10.251.1.18]) by mail5auth.barnet.com.au (Postfix) with ESMTP id E00612218827 for ; Wed, 2 Apr 2008 22:54:08 +1100 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id A4C023A3; Wed, 2 Apr 2008 22:54:08 +1100 (EST) Date: Wed, 2 Apr 2008 22:54:08 +1100 From: Edwin Groothuis To: freebsd-hackers@freebsd.org Message-ID: <20080402115408.GA66944@k7.mavetju> Mail-Followup-To: Edwin Groothuis , freebsd-hackers@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: Regression tests for usr.sbin/zic and lib/libc/stdtime 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 Apr 2008 12:12:59 -0000 Greetings, I have make an attempt to upgrade the code in usr.sbin/zic and lib/libc/stdtime from tzcode2004 to tzcode2008a. So far so good: I have been able to apply most of the patches, it compiles and when I rebooted the machine it came back and all applications started up... Note that this is a 32 bit machine and that the interesting stuff is happening on 64 bitters. I would like to know if somebody has ever thought about what kind of regression tests I can make to be sure that it all works as expected once (if ever) this patch-set gets applied. Edwin -- Edwin Groothuis edwin@freebsd.org http://www.mavetju.org From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 2 13:54:54 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B583A1065680 for ; Wed, 2 Apr 2008 13:54:54 +0000 (UTC) (envelope-from skreuzer@exit2shell.com) Received: from scruffy.exit2shell.com (64.147.114.188.static.nyinternet.net [64.147.114.188]) by mx1.freebsd.org (Postfix) with ESMTP id 86BE68FC46 for ; Wed, 2 Apr 2008 13:54:54 +0000 (UTC) (envelope-from skreuzer@exit2shell.com) Received: from scruffy.exit2shell.com (64.147.114.188.static.nyinternet.net [64.147.114.188]) by scruffy.exit2shell.com (8.14.1/8.14.1) with ESMTP id m32Dvlfk002676 for ; Wed, 2 Apr 2008 09:57:52 -0400 (EDT) (envelope-from skreuzer@scruffy.exit2shell.com) Received: (from skreuzer@localhost) by scruffy.exit2shell.com (8.14.1/8.14.1/Submit) id m32Dvkrw002675 for freebsd-hackers@freebsd.org; Wed, 2 Apr 2008 09:57:46 -0400 (EDT) (envelope-from skreuzer) Date: Wed, 2 Apr 2008 09:57:46 -0400 From: Steven Kreuzer To: freebsd-hackers@freebsd.org Message-ID: <20080402135746.GA2659@scruffy.exit2shell.com> References: <20080402115408.GA66944@k7.mavetju> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="7JfCtLOvnd9MIVvH" Content-Disposition: inline In-Reply-To: <20080402115408.GA66944@k7.mavetju> User-Agent: Mutt/1.4.2.3i Subject: Re: Regression tests for usr.sbin/zic and lib/libc/stdtime 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 Apr 2008 13:54:54 -0000 --7JfCtLOvnd9MIVvH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Apr 02, 2008 at 10:54:08PM +1100, Edwin Groothuis wrote: > Greetings, > > I have make an attempt to upgrade the code in usr.sbin/zic and > lib/libc/stdtime from tzcode2004 to tzcode2008a. So far so good: I > have been able to apply most of the patches, it compiles and when > I rebooted the machine it came back and all applications started > up... Note that this is a 32 bit machine and that the interesting > stuff is happening on 64 bitters. > > I would like to know if somebody has ever thought about what kind > of regression tests I can make to be sure that it all works as > expected once (if ever) this patch-set gets applied. > > Edwin Hey Edwin- If you would like some help with the testing, please let me know. I have actually been going through the codebase and started replace sprintf with snprintf. I have a patch for zic. Perhaps this can also be included in the modifications you are currently working on? -- Steven Kreuzer http://www.exit2shell.com/~skreuzer --7JfCtLOvnd9MIVvH Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="zic_c_snprintf.txt" Index: zic.c =================================================================== RCS file: /usr/share/cvs/freebsd/src/usr.sbin/zic/zic.c,v retrieving revision 1.18 diff -u -r1.18 zic.c --- zic.c 3 Dec 2007 10:45:44 -0000 1.18 +++ zic.c 25 Mar 2008 22:27:15 -0000 @@ -959,7 +959,7 @@ } if (strcmp(fields[ZF_NAME], TZDEFAULT) == 0 && lcltime != NULL) { buf = erealloc(buf, (int) (132 + strlen(TZDEFAULT))); - (void) sprintf(buf, + (void) snprintf(buf, sizeof(buf), _("\"Zone %s\" line and -l option are mutually exclusive"), TZDEFAULT); error(buf); @@ -967,7 +967,7 @@ } if (strcmp(fields[ZF_NAME], TZDEFRULES) == 0 && psxrules != NULL) { buf = erealloc(buf, (int) (132 + strlen(TZDEFRULES))); - (void) sprintf(buf, + (void) snprintf(buf, sizeof(buf), _("\"Zone %s\" line and -p option are mutually exclusive"), TZDEFRULES); error(buf); @@ -979,7 +979,7 @@ buf = erealloc(buf, (int) (132 + strlen(fields[ZF_NAME]) + strlen(zones[i].z_filename))); - (void) sprintf(buf, + (void) snprintf(buf, sizeof(buf), _("duplicate zone name %s (file \"%s\", line %d)"), fields[ZF_NAME], zones[i].z_filename, @@ -1451,7 +1451,7 @@ } fullname = erealloc(fullname, (int) (strlen(directory) + 1 + strlen(name) + 1)); - (void) sprintf(fullname, "%s/%s", directory, name); + (void) snprintf(fullname, sizeof(filename), "%s/%s", directory, name); /* * Remove old file, if any, to snap links. @@ -1546,7 +1546,7 @@ if (strchr(format, '/') == NULL) { if (letters == NULL) (void) strcpy(abbr, format); - else (void) sprintf(abbr, format, letters); + else (void) snprintf(abbr, sizeof(abbr), format, letters); } else if (isdst) (void) strcpy(abbr, strchr(format, '/') + 1); else { @@ -1887,7 +1887,7 @@ if (type == NULL || *type == '\0') return TRUE; buf = erealloc(buf, (int) (132 + strlen(yitcommand) + strlen(type))); - (void) sprintf(buf, "%s %d %s", yitcommand, year, type); + (void) snprintf(buf, sizeof(buf), "%s %d %s", yitcommand, year, type); result = system(buf); if (WIFEXITED(result)) switch (WEXITSTATUS(result)) { case 0: --7JfCtLOvnd9MIVvH-- From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 2 14:33:57 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4989106564A for ; Wed, 2 Apr 2008 14:33:57 +0000 (UTC) (envelope-from skreuzer@exit2shell.com) Received: from scruffy.exit2shell.com (64.147.114.188.static.nyinternet.net [64.147.114.188]) by mx1.freebsd.org (Postfix) with ESMTP id 5F4CA8FC14 for ; Wed, 2 Apr 2008 14:33:56 +0000 (UTC) (envelope-from skreuzer@exit2shell.com) Received: from scruffy.exit2shell.com (64.147.114.188.static.nyinternet.net [64.147.114.188]) by scruffy.exit2shell.com (8.14.1/8.14.1) with ESMTP id m32EapqK003989 for ; Wed, 2 Apr 2008 10:36:56 -0400 (EDT) (envelope-from skreuzer@scruffy.exit2shell.com) Received: (from skreuzer@localhost) by scruffy.exit2shell.com (8.14.1/8.14.1/Submit) id m32EapIU003988 for freebsd-hackers@FreeBSD.org; Wed, 2 Apr 2008 10:36:51 -0400 (EDT) (envelope-from skreuzer) Date: Wed, 2 Apr 2008 10:36:51 -0400 From: Steven Kreuzer To: freebsd-hackers@FreeBSD.org Message-ID: <20080402143651.GC2659@scruffy.exit2shell.com> References: <20080402115408.GA66944@k7.mavetju> <20080402135746.GA2659@scruffy.exit2shell.com> <20080402142723.GI4692@amilo.cenkes.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="QKdGvSO+nmPlgiQ/" Content-Disposition: inline In-Reply-To: <20080402142723.GI4692@amilo.cenkes.org> User-Agent: Mutt/1.4.2.3i Cc: Subject: Re: Regression tests for usr.sbin/zic and lib/libc/stdtime 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 Apr 2008 14:33:57 -0000 --QKdGvSO+nmPlgiQ/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Apr 02, 2008 at 06:27:25PM +0400, Andrew Pantyukhin wrote: > On Wed, Apr 02, 2008 at 09:57:46AM -0400, Steven Kreuzer wrote: > > - (void) sprintf(fullname, "%s/%s", directory, name); > > + (void) snprintf(fullname, sizeof(filename), "%s/%s", directory, name); > ^^^^^^^^ > Has a typo crawled in? Yes it did. Thanks for catching that. The attached patch corrects that typo. -- Steven Kreuzer http://www.exit2shell.com/~skreuzer --QKdGvSO+nmPlgiQ/ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="zic_c_snprintf-update.txt" Index: zic.c =================================================================== RCS file: /usr/share/cvs/freebsd/src/usr.sbin/zic/zic.c,v retrieving revision 1.18 diff -u -r1.18 zic.c --- zic.c 3 Dec 2007 10:45:44 -0000 1.18 +++ zic.c 26 Mar 2008 16:27:43 -0000 @@ -959,7 +959,7 @@ } if (strcmp(fields[ZF_NAME], TZDEFAULT) == 0 && lcltime != NULL) { buf = erealloc(buf, (int) (132 + strlen(TZDEFAULT))); - (void) sprintf(buf, + (void) snprintf(buf, sizeof(buf), _("\"Zone %s\" line and -l option are mutually exclusive"), TZDEFAULT); error(buf); @@ -967,7 +967,7 @@ } if (strcmp(fields[ZF_NAME], TZDEFRULES) == 0 && psxrules != NULL) { buf = erealloc(buf, (int) (132 + strlen(TZDEFRULES))); - (void) sprintf(buf, + (void) snprintf(buf, sizeof(buf), _("\"Zone %s\" line and -p option are mutually exclusive"), TZDEFRULES); error(buf); @@ -979,7 +979,7 @@ buf = erealloc(buf, (int) (132 + strlen(fields[ZF_NAME]) + strlen(zones[i].z_filename))); - (void) sprintf(buf, + (void) snprintf(buf, sizeof(buf), _("duplicate zone name %s (file \"%s\", line %d)"), fields[ZF_NAME], zones[i].z_filename, @@ -1451,7 +1451,7 @@ } fullname = erealloc(fullname, (int) (strlen(directory) + 1 + strlen(name) + 1)); - (void) sprintf(fullname, "%s/%s", directory, name); + (void) snprintf(fullname, sizeof(fullname), "%s/%s", directory, name); /* * Remove old file, if any, to snap links. @@ -1546,7 +1546,7 @@ if (strchr(format, '/') == NULL) { if (letters == NULL) (void) strcpy(abbr, format); - else (void) sprintf(abbr, format, letters); + else (void) snprintf(abbr, sizeof(abbr), format, letters); } else if (isdst) (void) strcpy(abbr, strchr(format, '/') + 1); else { @@ -1887,7 +1887,7 @@ if (type == NULL || *type == '\0') return TRUE; buf = erealloc(buf, (int) (132 + strlen(yitcommand) + strlen(type))); - (void) sprintf(buf, "%s %d %s", yitcommand, year, type); + (void) snprintf(buf, sizeof(buf), "%s %d %s", yitcommand, year, type); result = system(buf); if (WIFEXITED(result)) switch (WEXITSTATUS(result)) { case 0: --QKdGvSO+nmPlgiQ/-- From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 2 14:42:46 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D57FC106567A for ; Wed, 2 Apr 2008 14:42:46 +0000 (UTC) (envelope-from sat@cenkes.org) Received: from heka.cenkes.org (heka.cenkes.org [208.79.80.110]) by mx1.freebsd.org (Postfix) with ESMTP id AB4388FC2D for ; Wed, 2 Apr 2008 14:42:46 +0000 (UTC) (envelope-from sat@cenkes.org) Received: from amilo.cenkes.org (ppp85-140-148-5.pppoe.mtu-net.ru [85.140.148.5]) (Authenticated sender: sat) by heka.cenkes.org (Postfix) with ESMTPSA id ED22F242F8D1; Wed, 2 Apr 2008 18:27:28 +0400 (MSD) Date: Wed, 2 Apr 2008 18:27:25 +0400 From: Andrew Pantyukhin To: Steven Kreuzer Message-ID: <20080402142723.GI4692@amilo.cenkes.org> References: <20080402115408.GA66944@k7.mavetju> <20080402135746.GA2659@scruffy.exit2shell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080402135746.GA2659@scruffy.exit2shell.com> X-OS: FreeBSD 8.0-CURRENT amd64 User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-hackers@freebsd.org Subject: Re: Regression tests for usr.sbin/zic and lib/libc/stdtime X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: infofarmer@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2008 14:42:47 -0000 On Wed, Apr 02, 2008 at 09:57:46AM -0400, Steven Kreuzer wrote: > - (void) sprintf(fullname, "%s/%s", directory, name); > + (void) snprintf(fullname, sizeof(filename), "%s/%s", directory, name); ^^^^^^^^ Has a typo crawled in? From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 2 18:00:37 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AA17106566C; Wed, 2 Apr 2008 18:00:37 +0000 (UTC) (envelope-from nikhil.rao@intel.com) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mx1.freebsd.org (Postfix) with ESMTP id 4CAA18FC1F; Wed, 2 Apr 2008 18:00:37 +0000 (UTC) (envelope-from nikhil.rao@intel.com) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 02 Apr 2008 11:00:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.25,594,1199692800"; d="scan'208";a="364884878" Received: from orsmsx334.amr.corp.intel.com (HELO orsmsx334.jf.intel.com) ([10.22.226.45]) by orsmga001.jf.intel.com with ESMTP; 02 Apr 2008 10:59:32 -0700 Received: from orsmsx419.amr.corp.intel.com ([10.22.226.88]) by orsmsx334.jf.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 2 Apr 2008 10:59:32 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 2 Apr 2008 10:59:26 -0700 Message-ID: <12A5C15467D5B94F8E0FF265D9498ADD02CC01D8@orsmsx419.amr.corp.intel.com> In-reply-to: <878wzxa250.fsf@kobe.laptop> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: pfind() and the proc structure Thread-Index: AciUI2kqo0vIP2HnSSWZ4suTkjrUHwAxpkPw References: <20080329120018.0A8F5106567F@hub.freebsd.org><12A5C15467D5B94F8E0FF265D9498ADD02CBF8FF@orsmsx419.amr.corp.intel.com><20080401075623.GA19770@freebsd.org><12A5C15467D5B94F8E0FF265D9498ADD02CBF949@orsmsx419.amr.corp.intel.com> <878wzxa250.fsf@kobe.laptop> From: "Rao, Nikhil" To: "Giorgos Keramidas" X-OriginalArrivalTime: 02 Apr 2008 17:59:32.0220 (UTC) FILETIME=[4DB82BC0:01C894EB] Cc: freebsd-hackers@freebsd.org, Roman Divacky Subject: RE: pfind() and the proc structure 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 Apr 2008 18:00:37 -0000 Thanks for all your replies,=20 the all_proc lock is held in pfind(..) at the point PROC_LOCK(p) is obtained. In the kern_wait(..) code below, the allproc_lock is acquired before removing the proc from the list of all procs. The PROC_LOCK is then acquired before continuing. Since the thread that called pfind(..) has the PROC_LOCK, kern_wait(..) would need to wait for it to release the PROC_LOCK before continuing. I hope this understanding is correct. In http://fxr.watson.org/fxr/source/kern/kern_exit.c?v=3DRELENG62#L579 sx_xlock(&allproc_lock); 675 LIST_REMOVE(p, p_list); /* off zombproc */ 676 sx_xunlock(&allproc_lock); 677 LIST_REMOVE(p, p_sibling); 678 leavepgrp(p); 679 sx_xunlock(&proctree_lock); 680=20 681 /* 682 * As a side effect of this lock, we know that 683 * all other writes to this proc are visible now, so 684 * no more locking is needed for p. 685 */ 686 PROC_LOCK(p); -----Original Message----- From: Giorgos Keramidas [mailto:keramida@ceid.upatras.gr]=20 Sent: Tuesday, April 01, 2008 10:58 AM To: Rao, Nikhil Cc: Roman Divacky; freebsd-hackers@freebsd.org Subject: Re: pfind() and the proc structure On Tue, 1 Apr 2008 07:23:58 -0700, "Rao, Nikhil" wrote: > Ok, I should have caught that :-( Another question - Now that the > PROC_LOCK on p is obtained the all_proc lock is released and the > function returns, at this point can't the proc get deallocated ? > > Nikhil > > 242 struct proc * > 243 pfind(pid) > 244 register pid_t pid; > 245 { > 246 register struct proc *p; > 247 > 248 sx_slock(&allproc_lock); > 249 LIST_FOREACH(p, PIDHASH(pid), p_hash) > 250 if (p->p_pid =3D=3D pid) { > 251 if (p->p_state =3D=3D PRS_NEW) { > 252 p =3D NULL; > 253 break; > 254 } > 255 PROC_LOCK(p); > 256 break; > 257 } > 258 sx_sunlock(&allproc_lock); > 259 return (p); > 260 } Not until you unlock the specific proc entry. You are holding a lock for the specific proc entry, so anyone trying to `reap' the process would have to wait until you are done with what you are doing. From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 2 19:32:07 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EF2E106566B for ; Wed, 2 Apr 2008 19:32:07 +0000 (UTC) (envelope-from skreuzer@exit2shell.com) Received: from scruffy.exit2shell.com (64.147.114.188.static.nyinternet.net [64.147.114.188]) by mx1.freebsd.org (Postfix) with ESMTP id EBD368FC13 for ; Wed, 2 Apr 2008 19:32:06 +0000 (UTC) (envelope-from skreuzer@exit2shell.com) Received: from scruffy.exit2shell.com (64.147.114.188.static.nyinternet.net [64.147.114.188]) by scruffy.exit2shell.com (8.14.1/8.14.1) with ESMTP id m32JZ2R3016348 for ; Wed, 2 Apr 2008 15:35:08 -0400 (EDT) (envelope-from skreuzer@scruffy.exit2shell.com) Received: (from skreuzer@localhost) by scruffy.exit2shell.com (8.14.1/8.14.1/Submit) id m32JZ2Fq016347 for freebsd-hackers@freebsd.org; Wed, 2 Apr 2008 15:35:02 -0400 (EDT) (envelope-from skreuzer) Date: Wed, 2 Apr 2008 15:35:02 -0400 From: Steven Kreuzer To: freebsd-hackers@freebsd.org Message-ID: <20080402193502.GE2659@scruffy.exit2shell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: crontab Patches 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 Apr 2008 19:32:07 -0000 I wrote two patches for crontab.c that I was wondering if someone would take a look at. The first one zero out pw_passwd in crontab, just to be paranoid side. http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/122070 The second replaces sprintf with snprintf http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/122137 On an unrleated note, I submitted a small change for the freebsd-tips fortune datfile that removes references to two ports that no longer exist. http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/122296 Thanks -- Steven Kreuzer http://www.exit2shell.com/~skreuzer From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 3 00:39:31 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB662106566B; Thu, 3 Apr 2008 00:39:31 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 1D0ED8FC25; Thu, 3 Apr 2008 00:39:30 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl90-21.kln.forthnet.gr [77.49.57.21]) (authenticated bits=128) by igloo.linux.gr (8.14.2/8.14.2/Debian-3) with ESMTP id m330cxM2015621 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 3 Apr 2008 03:39:05 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m330cv0G003743; Thu, 3 Apr 2008 03:38:57 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m330cgfc003742; Thu, 3 Apr 2008 03:38:42 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: "Rao\, Nikhil" References: <20080329120018.0A8F5106567F@hub.freebsd.org> <12A5C15467D5B94F8E0FF265D9498ADD02CBF8FF@orsmsx419.amr.corp.intel.com> <20080401075623.GA19770@freebsd.org> <12A5C15467D5B94F8E0FF265D9498ADD02CBF949@orsmsx419.amr.corp.intel.com> <878wzxa250.fsf@kobe.laptop> <12A5C15467D5B94F8E0FF265D9498ADD02CC01D8@orsmsx419.amr.corp.intel.com> Date: Thu, 03 Apr 2008 03:38:42 +0300 In-Reply-To: <12A5C15467D5B94F8E0FF265D9498ADD02CC01D8@orsmsx419.amr.corp.intel.com> (Nikhil Rao's message of "Wed, 2 Apr 2008 10:59:26 -0700") Message-ID: <87tzijojql.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: m330cxM2015621 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.945, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.45, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@freebsd.org, Roman Divacky Subject: Re: pfind() and the proc structure 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 Apr 2008 00:39:31 -0000 On Wed, 2 Apr 2008 10:59:26 -0700, "Rao, Nikhil" wrote: > Thanks for all your replies, > > the all_proc lock is held in pfind(..) at the point PROC_LOCK(p) is > obtained. In the kern_wait(..) code below, the allproc_lock is acquired > before removing the proc from the list of all procs. The PROC_LOCK is > then acquired before continuing. Since the thread that called pfind(..) > has the PROC_LOCK, kern_wait(..) would need to wait for it to release > the PROC_LOCK before continuing. I hope this understanding is correct. > > In http://fxr.watson.org/fxr/source/kern/kern_exit.c?v=RELENG62#L579 > > sx_xlock(&allproc_lock); > 675 LIST_REMOVE(p, p_list); /* off zombproc */ > 676 sx_xunlock(&allproc_lock); > 677 LIST_REMOVE(p, p_sibling); > 678 leavepgrp(p); > 679 sx_xunlock(&proctree_lock); > 680 > 681 /* > 682 * As a side effect of this lock, we know > that > 683 * all other writes to this proc are visible > now, so > 684 * no more locking is needed for p. > 685 */ > 686 PROC_LOCK(p); Yes, line 686 above will have to wait for any holders of the proc lock on the specific proc entry. The allproc_lock is not needed anymore, because these last lines are inside: if (p->p_state == PRS_ZOMBIE) { ... After the zombie process has been removed from the zombie list, we will have to wait until the proc entry is unlocked. At that point, the proc entry is no longer on the zombie list, so it won't be locked by anyone else. We grab the lock, clean it up and it's gone for good. From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 3 00:45:31 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 814491065686; Thu, 3 Apr 2008 00:45:31 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id ECAFD8FC14; Thu, 3 Apr 2008 00:45:30 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl90-21.kln.forthnet.gr [77.49.57.21]) (authenticated bits=128) by igloo.linux.gr (8.14.2/8.14.2/Debian-3) with ESMTP id m330j7BQ016093 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 3 Apr 2008 03:45:19 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m330j6M4027036; Thu, 3 Apr 2008 03:45:06 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m330j5Ue027035; Thu, 3 Apr 2008 03:45:05 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Steven Kreuzer References: <20080402193502.GE2659@scruffy.exit2shell.com> Date: Thu, 03 Apr 2008 03:45:05 +0300 In-Reply-To: <20080402193502.GE2659@scruffy.exit2shell.com> (Steven Kreuzer's message of "Wed, 2 Apr 2008 15:35:02 -0400") Message-ID: <87prt7ojfy.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: m330j7BQ016093 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.945, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.45, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@freebsd.org, keramida@freebsd.org Subject: Re: crontab Patches 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 Apr 2008 00:45:31 -0000 On Wed, 2 Apr 2008 15:35:02 -0400, Steven Kreuzer wrote: > I wrote two patches for crontab.c that I was wondering if someone would > take a look at. > > The first one zero out pw_passwd in crontab, just to be paranoid side. > http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/122070 > > The second replaces sprintf with snprintf > http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/122137 Thanks, I'll have a look at these :-) > On an unrleated note, I submitted a small change for the freebsd-tips fortune > datfile that removes references to two ports that no longer exist. > http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/122296 misc/instant-server is still there. I think it's ok to remove the tip about instant-workstation, because the port has been removed by: # $FreeBSD: ports/misc/Makefile,v 1.831 2007/01/05 17:08:38 miwi Exp $ From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 3 15:59:34 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73A08106564A for ; Thu, 3 Apr 2008 15:59:34 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (unknown [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id D7FDE8FC0C for ; Thu, 3 Apr 2008 15:59:33 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.1/8.14.1) with ESMTP id m33FxVmg019154; Thu, 3 Apr 2008 17:59:31 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.1/8.14.1/Submit) id m33FxKDr019153; Thu, 3 Apr 2008 17:59:20 +0200 (CEST) (envelope-from olli) Date: Thu, 3 Apr 2008 17:59:20 +0200 (CEST) Message-Id: <200804031559.m33FxKDr019153@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, mwm-keyword-freebsdhackers2.e313df@mired.org In-Reply-To: <20080324011708.107ec3cb@bhuda.mired.org> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.2-STABLE-20070808 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Thu, 03 Apr 2008 17:59:32 +0200 (CEST) Cc: Subject: Re: Problem with find -prune... 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 Apr 2008 15:59:34 -0000 Mike Meyer <> wrote: > find -prune seems to not quite do what it says. At least, when delete > is used. Here's an example tree (on 7.0-RELEASE, amd64 build): It behaves exactly as documented. I'll try to explain. > bhuda% find /tmp/x -prune > /tmp/x > > Hmm, it prints the root of the tree. That might be a bug; > might not. It's not a bug: -prune prevents find(1) from descending *into* the directory, but the directory itself is still handled. > bhuda% find /tmp/x -prune -o -print > bhuda% > > Making the print conditional on not pruning, and we always prune. > Ok, now let's look at what looks to me like a bug: > > bhuda% find /tmp/x -prune -o -delete > find: /tmp/x/y: Permission denied > > Why on earth (or off it) is find trying to look at /tmp/x? Am I > correct in assuming that this is a bug? The -delete primary implicitly assumes depth-first traversal (i.e. the -d option), because that's the only way you can delete a whole directory tree. However, when depth-first traversal is in effect, the -prune primary doesn't have any effect (for obvious reasons). It's documented in the manpage. In other words, the primaries -prune and -delete are mutual exclusive. It could be argued whether find(1) should print a warning in that case. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "IRIX is about as stable as a one-legged drunk with hypothermia in a four-hundred mile per hour wind, balancing on a banana peel on a greased cookie sheet -- when someone throws him an elephant with bad breath and a worse temper." -- Ralf Hildebrandt From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 3 16:45:59 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EA1C106567A for ; Thu, 3 Apr 2008 16:45:59 +0000 (UTC) (envelope-from mwm@mired.org) Received: from mired.org (student.mired.org [66.92.153.77]) by mx1.freebsd.org (Postfix) with ESMTP id E68428FC1F for ; Thu, 3 Apr 2008 16:45:58 +0000 (UTC) (envelope-from mwm@mired.org) Received: (qmail 47596 invoked from network); 3 Apr 2008 12:45:17 -0400 Received: from unknown (HELO mbook-fbsd) (192.168.195.251) by 0 with SMTP; 3 Apr 2008 12:45:17 -0400 Date: Thu, 3 Apr 2008 12:45:56 -0400 From: Mike Meyer To: Oliver Fromme Message-ID: <20080403124556.7e44c970@mbook-fbsd> In-Reply-To: <200804031559.m33FxKDr019153@lurza.secnetix.de> References: <20080324011708.107ec3cb@bhuda.mired.org> <200804031559.m33FxKDr019153@lurza.secnetix.de> Organization: Meyer Consulting X-Mailer: Claws Mail 3.0.2 (GTK+ 2.12.5; amd64-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 03 Apr 2008 16:59:46 +0000 Cc: freebsd-hackers@FreeBSD.ORG, mwm-keyword-freebsdhackers2.e313df@mired.org Subject: Re: Problem with find -prune... 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 Apr 2008 16:45:59 -0000 On Thu, 3 Apr 2008 17:59:20 +0200 (CEST) Oliver Fromme wrote: > Mike Meyer <> wrote: > > find -prune seems to not quite do what it says. At least, when delete > > is used. Here's an example tree (on 7.0-RELEASE, amd64 build): > It behaves exactly as documented. I'll try to explain. I think you did an excellent job. Thank you. > > > > bhuda% find /tmp/x -prune -o -delete > > find: /tmp/x/y: Permission denied > > > > Why on earth (or off it) is find trying to look at /tmp/x? Am I > > correct in assuming that this is a bug? > > The -delete primary implicitly assumes depth-first > traversal (i.e. the -d option), because that's the > only way you can delete a whole directory tree. > > However, when depth-first traversal is in effect, > the -prune primary doesn't have any effect (for > obvious reasons). It's documented in the manpage. > > In other words, the primaries -prune and -delete > are mutual exclusive. It could be argued whether > find(1) should print a warning in that case. It might be better documented, also. So the bug that I'm *really* trying to scratch is in /etc/periodic/daily/100.clean-disks: rc=$(find / \( ! -fstype local -o -fstype rdonly \) -a -prune -o \ \( $args \) -atime +$daily_clean_disks_days -delete $print | tee /dev/stderr | wc -l) where it's using -prune and -delete in the same call to find. So I'll see if I can patch this, and file *that* bug report. Thanks again, http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 3 20:45:06 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA2A41065672 for ; Thu, 3 Apr 2008 20:45:06 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.freebsd.org (Postfix) with ESMTP id 79A4C8FC1C for ; Thu, 3 Apr 2008 20:45:06 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (localhost [127.0.0.1]) by bunrab.catwhisker.org (8.13.3/8.13.3) with ESMTP id m33KQK0Q053982 for ; Thu, 3 Apr 2008 13:26:20 -0700 (PDT) (envelope-from david@bunrab.catwhisker.org) Received: (from david@localhost) by bunrab.catwhisker.org (8.13.3/8.13.1/Submit) id m33KQKNw053981 for hackers@freebsd.org; Thu, 3 Apr 2008 13:26:20 -0700 (PDT) (envelope-from david) Date: Thu, 3 Apr 2008 13:26:20 -0700 From: David Wolfskill To: hackers@freebsd.org Message-ID: <20080403202620.GG48868@bunrab.catwhisker.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3oCie2+XPXTnK5a5" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: Subject: Is describing sysctl variables useful? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2008 20:45:06 -0000 --3oCie2+XPXTnK5a5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable At work, I'm trying to get some measurements for what is going on on various systems, especially when developers are trying to use them. (The goal is to improve the situation; measurement is a rather early step in that process.) To that end, I've cobbled up a Perl script that acts as a "wrapper" around time(1) and uses that command to obtain the "rusage" (ref. getrusage(2)) information about the command in question. I've started to expand this to try to obtain information about the machine as a whole, in order to allow a comparison of the results from one run of a command to another to have some plausible meaning. For this, I thought that certain values reported by sysctl(8) might be of use. In the process of starting to investigate this, I noted that while some of the variables have decscriptions (ref. "sysctl -d"), others lack them. Since I'm likely to be sniffing around to figure out what these things are, would it be a useful exercise for me to submit PRs (in appropriately-sized chunks) to provide such descriptions? I have no desire to submit PRs merely for the exercise; I've submitted PRs before, so I'm unlikely to do it merely for the sake of novelty. :-} But if it stands a reasonable chance of being a useful thing for the project, I'm happy to help. Thoughts? Peace, david --=20 David H. Wolfskill david@catwhisker.org I submit that "conspiracy" would be an appropriate collective noun for cats. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --3oCie2+XPXTnK5a5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iEYEARECAAYFAkf1PWsACgkQmprOCmdXAD0SiACgg0ZMukGGcRTnZWJs8Qn/QuoU fvoAnRMhQ9677AtTmWqaNfDj9MSO6rqH =Yv8W -----END PGP SIGNATURE----- --3oCie2+XPXTnK5a5-- From owner-freebsd-hackers@FreeBSD.ORG Thu Apr 3 21:46:27 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2B5F106566B for ; Thu, 3 Apr 2008 21:46:27 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.226]) by mx1.freebsd.org (Postfix) with ESMTP id 752B08FC20 for ; Thu, 3 Apr 2008 21:46:27 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: by wr-out-0506.google.com with SMTP id 50so2449579wra.13 for ; Thu, 03 Apr 2008 14:46:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=Bs6ovNeCYgXWpr8xU6BQNuzgu2Vktr38nf6f/zfyhR4=; b=gBXJ9RJgAa9ywpjnfOkJW+M280UHrARTVrPSACp+YrUyAAxGOjTUZGTZuyPf/dhUCV1laWoMoJfN8JhsActHiqqUqQ/8SZss3IxdPxVipm/iLHOE0IkCpTTOf19FtntvzluQ0vw8f9ZmO9dZ6hb5A85aTSHDvGbxcqsVBJOGUY0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=UBT3k3Goy/e4xfjCWGaVBqP27Y0QI8GhF31GH+2yoK2FCdVrPEwirUGuOtBtth3YbVNJUGwMGzLyIU4jj+GElupEmY/Gm45nzOZTNyHrX4I6Krk6HKXs0Wm2kthilTetMdLN0ydploh+O85W3tF3jBf4asX4xoyCZqhE0kgOy+E= Received: by 10.141.164.13 with SMTP id r13mr277106rvo.65.1207257502999; Thu, 03 Apr 2008 14:18:22 -0700 (PDT) Received: by 10.140.207.1 with HTTP; Thu, 3 Apr 2008 14:18:22 -0700 (PDT) Message-ID: <2e77fc10804031418t47181f0ekf4a93e134dacb7aa@mail.gmail.com> Date: Fri, 4 Apr 2008 00:18:22 +0300 From: "Niki Denev" Sender: ndenev@gmail.com To: hackers@freebsd.org In-Reply-To: <20080403202620.GG48868@bunrab.catwhisker.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080403202620.GG48868@bunrab.catwhisker.org> X-Google-Sender-Auth: 03377359ae753ef7 Cc: Subject: Re: Is describing sysctl variables useful? 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 Apr 2008 21:46:27 -0000 On Thu, Apr 3, 2008 at 11:26 PM, David Wolfskill wrote: > At work, I'm trying to get some measurements for what is going on on > various systems, especially when developers are trying to use them. > (The goal is to improve the situation; measurement is a rather early > step in that process.) > > To that end, I've cobbled up a Perl script that acts as a "wrapper" > around time(1) and uses that command to obtain the "rusage" (ref. > getrusage(2)) information about the command in question. > > I've started to expand this to try to obtain information about the > machine as a whole, in order to allow a comparison of the results > from one run of a command to another to have some plausible meaning. > > For this, I thought that certain values reported by sysctl(8) might > be of use. > > In the process of starting to investigate this, I noted that while > some of the variables have decscriptions (ref. "sysctl -d"), others lack > them. > > Since I'm likely to be sniffing around to figure out what these things > are, would it be a useful exercise for me to submit PRs (in > appropriately-sized chunks) to provide such descriptions? > > I have no desire to submit PRs merely for the exercise; I've submitted > PRs before, so I'm unlikely to do it merely for the sake of novelty. :-} > > But if it stands a reasonable chance of being a useful thing for the > project, I'm happy to help. > > Thoughts? > > Peace, > david > -- > David H. Wolfskill david@catwhisker.org > I submit that "conspiracy" would be an appropriate collective noun for cats. > > See http://www.catwhisker.org/~david/publickey.gpg for my public key. > Hi David, There is such project on the project ideas page : http://www.freebsd.org/projects/ideas/#p-docsysctl Maybe you can ping the listed technical contacts... Regards, Niki From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 4 00:01:44 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CCCF106566C for ; Fri, 4 Apr 2008 00:01:44 +0000 (UTC) (envelope-from elijah.buck@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by mx1.freebsd.org (Postfix) with ESMTP id D23C28FC1F for ; Fri, 4 Apr 2008 00:01:43 +0000 (UTC) (envelope-from elijah.buck@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so903005uge.37 for ; Thu, 03 Apr 2008 17:01:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=eokbc5vLobwDAPqZ01dzd3Se9ieM8oNJzLWbV8FFm0I=; b=XEA4nORVxWb/gGJs4CHXBQk29SmbtHSOdmSiTKlEEIaiHBTF/sGDT7M+yY+vGdM6b0gS9Ug7Zxjp+ErlkPxB2XhX9Ehm/HI4yJ3HAoPopHfquZ9CzQQrQ1jRFdvpL75H0JrxbVepL/Ra5F99MWf6VbaXA4fyR526zACqsPlaj6w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=gowABh+vTMt9FC3KqXdZUBI0otTYczMgxsYd2X+PdCRBLijA0zIgfZW+ZQVvVe5AyObKK02SJYOZ5HQ8BNybAZ2QOQefDTBhR6hk7SB0iPRypewv0pDgl2kiHvqc0GQFG5xKmZ5FktYqRtnN+CBJwTpGNqWiIziKaJDPuQ615j4= Received: by 10.66.238.16 with SMTP id l16mr249054ugh.86.1207265819663; Thu, 03 Apr 2008 16:36:59 -0700 (PDT) Received: by 10.67.86.15 with HTTP; Thu, 3 Apr 2008 16:36:59 -0700 (PDT) Message-ID: <303eddcb0804031636y5f101a0au75ce1149ec8dae77@mail.gmail.com> Date: Thu, 3 Apr 2008 18:36:59 -0500 From: "Elijah Buck" To: hackers@freebsd.org In-Reply-To: <20080403202620.GG48868@bunrab.catwhisker.org> MIME-Version: 1.0 References: <20080403202620.GG48868@bunrab.catwhisker.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Is describing sysctl variables useful? 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 Apr 2008 00:01:44 -0000 The project that Niki is referring to is something I've begun working on as part of a independent project for school. Sysctl documentation strings are definitely wanted. Mat (@freeebsd) has a partially complete sysctl documentation branch in perforce (//depot/user/mat/src/sysctl_cleanup/). You might want to look there first in case the work has already been done but not integrated. Elijah On Thu, Apr 3, 2008 at 3:26 PM, David Wolfskill wrote: > At work, I'm trying to get some measurements for what is going on on > various systems, especially when developers are trying to use them. > (The goal is to improve the situation; measurement is a rather early > step in that process.) > > To that end, I've cobbled up a Perl script that acts as a "wrapper" > around time(1) and uses that command to obtain the "rusage" (ref. > getrusage(2)) information about the command in question. > > I've started to expand this to try to obtain information about the > machine as a whole, in order to allow a comparison of the results > from one run of a command to another to have some plausible meaning. > > For this, I thought that certain values reported by sysctl(8) might > be of use. > > In the process of starting to investigate this, I noted that while > some of the variables have decscriptions (ref. "sysctl -d"), others lack > them. > > Since I'm likely to be sniffing around to figure out what these things > are, would it be a useful exercise for me to submit PRs (in > appropriately-sized chunks) to provide such descriptions? > > I have no desire to submit PRs merely for the exercise; I've submitted > PRs before, so I'm unlikely to do it merely for the sake of novelty. :-} > > But if it stands a reasonable chance of being a useful thing for the > project, I'm happy to help. > > Thoughts? > > Peace, > david > -- > David H. Wolfskill david@catwhisker.org > I submit that "conspiracy" would be an appropriate collective noun for > cats. > > See http://www.catwhisker.org/~david/publickey.gpgfor my public key. > From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 4 00:46:19 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C059106566B for ; Fri, 4 Apr 2008 00:46:19 +0000 (UTC) (envelope-from sam@sjkwi.com.au) Received: from icarus.bris.sjkwi.com.au (sjkwi.com.au [60.242.246.110]) by mx1.freebsd.org (Postfix) with ESMTP id EFDCA8FC1D for ; Fri, 4 Apr 2008 00:46:17 +0000 (UTC) (envelope-from sam@sjkwi.com.au) Received: from mia.dhcp.sjkwi.com.au (mia.dhcp.sjkwi.com.au [192.168.0.80]) by icarus.bris.sjkwi.com.au (Postfix) with ESMTP id C8C8022891; Fri, 4 Apr 2008 10:27:06 +1000 (EST) Message-ID: <47F575DA.60003@sjkwi.com.au> Date: Fri, 04 Apr 2008 10:27:06 +1000 From: Sam Kingston Organization: SJK Web Industries User-Agent: Thunderbird 2.0.0.12 (X11/20080302) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: sam@sjkwi.com.au Subject: 7.0-RELEASE Kernel Panic in _mtx_lock_sleep() on shutdown X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: sam@sjkwi.com.au List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2008 00:46:19 -0000 Hi all, I am getting panic()s upon each shutdown (visibly after disks have been synced). kgdb reveals the at /usr/src/sys/kern/kern_mutex.c:335 _mtx_lock_sleep() as the culprit. Running 7.0-RELEASE with root mounted from a ZFS file system. Seems to only have started since creating a second raidz data pool (mia-data), yet dismounting this before shutdown does not stop the panic(). uname: FreeBSD mia.dhcp.sjkwi.com.au 7.0-RELEASE FreeBSD 7.0-RELEASE #1: Sun Mar 2 07:26:17 EST 2008 root@mia.dhcp.sjkwi.com.au:/usr/obj/usr/src/sys/MIA amd64 zpool list: NAME SIZE USED AVAIL CAP HEALTH ALTROOT mia-data 2.03T 1.05T 1003G 51% ONLINE - mia-sys 288G 9.58G 278G 3% ONLINE - panic: Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x258 fault code = supervisor read data, page not present instruction pointer = 0x8:0xffffffff802c805a stack pointer = 0x10:0xffffffffb33eb840 frame pointer = 0x10:0xffffff00011109c0 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 1 (init) trap number = 12 panic: page fault cpuid = 0 kgdb output: #0 doadump () at pcpu.h:194 #1 0x0000000000000004 in ?? () #2 0xffffffff802d271f in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:409 #3 0xffffffff802d2b48 in panic (fmt=0x104
) at /usr/src/sys/kern/kern_shutdown.c:563 #4 0xffffffff804a510a in trap_fatal (frame=0xffffff00011109c0, eva=18446742974215805136) at /usr/src/sys/amd64/amd64/trap.c:724 #5 0xffffffff804a54b1 in trap_pfault (frame=0xffffffffb33eb790, usermode=0) at /usr/src/sys/amd64/amd64/trap.c:641 #6 0xffffffff804a5d6f in trap (frame=0xffffffffb33eb790) at /usr/src/sys/amd64/amd64/trap.c:410 #7 0xffffffff8048cbce in calltrap () at /usr/src/sys/amd64/amd64/exception.S:169 #8 0xffffffff802c805a in _mtx_lock_sleep (m=0xffffff00068772d8, tid=18446742974215817664, opts=Variable "opts" is not available. ) at /usr/src/sys/kern/kern_mutex.c:335 #9 0xffffffff803445b3 in vrele (vp=0xffffff00068771f0) at /usr/src/sys/kern/vfs_subr.c:2128 #10 0xffffffff80344b46 in vflush (mp=Variable "mp" is not available. ) at /usr/src/sys/kern/vfs_subr.c:2441 #11 0xffffffff8082e0ac in ?? () #12 0xffffff000636a000 in ?? () #13 0xffffff000636a054 in ?? () #14 0x0000000000005000 in ?? () #15 0x0000000000080000 in ?? () #16 0xffffffffb33eba60 in ?? () #17 0x0000000000000000 in ?? () #18 0xffffff00011109c0 in ?? () #19 0x0000000000080000 in ?? () #20 0x0000000000005000 in ?? () #21 0x0000000000080000 in ?? () #22 0x0000000000000000 in ?? () #23 0xffffffff8033d874 in dounmount (mp=0xffffff0006348ca0, flags=17893824, td=0x80000) at /usr/src/sys/kern/vfs_mount.c:1286 #24 0xffffffff80343129 in vfs_unmountall () at /usr/src/sys/kern/vfs_subr.c:2936 #25 0xffffffff802d297f in boot (howto=8) at /usr/src/sys/kern/kern_shutdown.c:391 #26 0xffffffff802d2c9d in reboot (td=Variable "td" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:169 #27 0xffffffff804a571c in syscall (frame=0xffffffffb33ebc70) at /usr/src/sys/amd64/amd64/trap.c:852 #28 0xffffffff8048cddb in Xfast_syscall () at /usr/src/sys/amd64/amd64/exception.S:290 #29 0x000000000040854c in ?? () instruction pointer: #8 0xffffffff802c805a in _mtx_lock_sleep (m=0xffffff00068772d8, tid=18446742974215817664, opts=Variable "opts" is not available. ) at /usr/src/sys/kern/kern_mutex.c:335 dmesg (cut due to long length: http://users.sjkwi.com.au/sam/fbsd/dmesg.txt kernel config (cut due to long length): http://users.sjkwi.com.au/sam/fbsd/MIA Any ideas? -- Kind regards, Sam Kingston SJK Web Industries Email sam@sjkwi.com.au Web http://www.sjkwi.com.au From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 4 03:34:44 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8886106564A for ; Fri, 4 Apr 2008 03:34:44 +0000 (UTC) (envelope-from kubatyszko@gmail.com) Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.190]) by mx1.freebsd.org (Postfix) with ESMTP id B5C6B8FC12 for ; Fri, 4 Apr 2008 03:34:44 +0000 (UTC) (envelope-from kubatyszko@gmail.com) Received: by rv-out-0910.google.com with SMTP id g13so2237718rvb.43 for ; Thu, 03 Apr 2008 20:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=aUYYJnltGmyUdYaP0cwFw+4jPgtOI367YkQCCRHLfJY=; b=hwqfiknFplkfANFeU+e1VTGJLIuamYK7gqD801BhC5dIeMq3nY9t8uJCUdHOdSFme/3NetH2lV3vBsgms3E3ASLUzbBFpSR8pLaIOUJbIYThYjySDychVqt0h8qn1Dwf/YEsfe8MvLavwOJqMrCDQbYhOQVKlfrVpTOpgq3vhTM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:mime-version:content-type; b=TXbWq0GfbH+UXQvfmKypBur5elo2qpQbaLxlWqwupj9ayMjiJWrJg0NG9MdHqfBjkRHFdAuIdD5mLDtCi9kdUCBQmoW9ePhynuulhqF/fjEeJN0fE/pvVKpA6Sdhw3Z97BU1pTSbUort/Yw1zkUcSNRI5WAgcurwsN+rOwjvPXY= Received: by 10.141.23.7 with SMTP id a7mr330134rvj.5.1207278367645; Thu, 03 Apr 2008 20:06:07 -0700 (PDT) Received: by 10.140.200.20 with HTTP; Thu, 3 Apr 2008 20:06:07 -0700 (PDT) Message-ID: Date: Fri, 4 Apr 2008 12:06:07 +0900 From: "Kuba Tyszko" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: force kernel dump - problems 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 Apr 2008 03:34:45 -0000 Hi, I am trying to force kernel dump, and observing weird behavior: I have created kernel module that registers sysctl for me, after touching that sysctl it calls dumpsys() function which is supposed to dump kernel to disk. This is what i get in dmesg and on console --------------- Physical memory: 243 MB Dumping 35 MB:Attempt to write outside dump device boundaries. Offset: 14008330027167693824 mediaoffset: 3221225472 mediasize: 14008330023983906816 , length: 512 ** DUMP FAILED (ERROR 6) ** --------------- (The Offset.* line was added by me to the kernel source for debugging, but anyway it shows weird values - the same regardless of swap device i choose via dumpon ( i have 2 swap partitions for this) ). Can anyone help me with this ?, I would like to know first how to obtain kernel dump, then how to check why it doesn't work my way. Thanks From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 4 03:40:52 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2BB4106566B for ; Fri, 4 Apr 2008 03:40:52 +0000 (UTC) (envelope-from sbrabez@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.242]) by mx1.freebsd.org (Postfix) with ESMTP id 81D048FC15 for ; Fri, 4 Apr 2008 03:40:52 +0000 (UTC) (envelope-from sbrabez@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so948987anc.13 for ; Thu, 03 Apr 2008 20:40:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=aZNqV3rKEUgXU/zk9Sg0hfLHIK3e3np0UXCLZet9Mjs=; b=YO9xQr50MwuMJU+8mRs5lFcHpVr/cWO717tYwg/c3E6Zg7dAvCz3CVieg8Hm1WxbKyoSfQ6VGy+QubHztJwUsRjhT/KfBECa9PWkJoIGvRvkBV5dNJBuGMmb57doDe+J++GRoGgU1NsbX9CRAa6haTaprvHNSx7+SKIWd+RPfS4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CWISJTUdnpF6nvr0vLoAz3Id7tr1I7+rmHTfKqFF2UwDMXJwrkuUGBv6tN8YutTzJ//Xq4kYuPzs+VyfchyQusd5aedx1jLG5u+7aHftiK8iCwhxuSJ8FQUN7SSdIQ51UhOywnVr2acMjqcfgGxH7GWWv3J0nB+Szf3d7vBGZlk= Received: by 10.100.255.17 with SMTP id c17mr1549047ani.37.1207278702019; Thu, 03 Apr 2008 20:11:42 -0700 (PDT) Received: by 10.100.31.2 with HTTP; Thu, 3 Apr 2008 20:11:41 -0700 (PDT) Message-ID: <3456f9ca0804032011i7db909d4qc34ff53bd6f7aa28@mail.gmail.com> Date: Fri, 4 Apr 2008 05:11:41 +0200 From: "Sofian Brabez" To: hackers@freebsd.org In-Reply-To: <20080403202620.GG48868@bunrab.catwhisker.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080403202620.GG48868@bunrab.catwhisker.org> Cc: Subject: Re: Is describing sysctl variables useful? 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 Apr 2008 03:40:52 -0000 About syscl(3) OID description lack, i send my Google Summer Code application to complete it this summer ;). I identify alls lacks in sysctl at http://6dev.net/~sbz/sysctl.txt and i want to correct them during Google Summer Code. My application was sent since 30 March 2008 via Google student Web application. Best Regards -- sbz On Thu, Apr 3, 2008 at 10:26 PM, David Wolfskill wrote: > At work, I'm trying to get some measurements for what is going on on > various systems, especially when developers are trying to use them. > (The goal is to improve the situation; measurement is a rather early > step in that process.) > > To that end, I've cobbled up a Perl script that acts as a "wrapper" > around time(1) and uses that command to obtain the "rusage" (ref. > getrusage(2)) information about the command in question. > > I've started to expand this to try to obtain information about the > machine as a whole, in order to allow a comparison of the results > from one run of a command to another to have some plausible meaning. > > For this, I thought that certain values reported by sysctl(8) might > be of use. > > In the process of starting to investigate this, I noted that while > some of the variables have decscriptions (ref. "sysctl -d"), others lack > them. > > Since I'm likely to be sniffing around to figure out what these things > are, would it be a useful exercise for me to submit PRs (in > appropriately-sized chunks) to provide such descriptions? > > I have no desire to submit PRs merely for the exercise; I've submitted > PRs before, so I'm unlikely to do it merely for the sake of novelty. :-} > > But if it stands a reasonable chance of being a useful thing for the > project, I'm happy to help. > > Thoughts? > > Peace, > david > -- > David H. Wolfskill david@catwhisker.org > I submit that "conspiracy" would be an appropriate collective noun for cats. > > See http://www.catwhisker.org/~david/publickey.gpg for my public key. > -- sbz From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 4 08:32:49 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD6F0106566B for ; Fri, 4 Apr 2008 08:32:49 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id 37AB48FC12 for ; Fri, 4 Apr 2008 08:32:49 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m348Wklo025481 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 4 Apr 2008 19:32:47 +1100 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m348WkrV046573 for ; Fri, 4 Apr 2008 19:32:46 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m348WkoG046572 for hackers@freebsd.org; Fri, 4 Apr 2008 19:32:46 +1100 (EST) (envelope-from peter) Date: Fri, 4 Apr 2008 19:32:46 +1100 From: Peter Jeremy To: hackers@freebsd.org Message-ID: <20080404083246.GV49813@server.vk2pj.dyndns.org> References: <20080403202620.GG48868@bunrab.catwhisker.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HeFlAV5LIbMFYYuh" Content-Disposition: inline In-Reply-To: <20080403202620.GG48868@bunrab.catwhisker.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Subject: Re: Is describing sysctl variables useful? 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 Apr 2008 08:32:49 -0000 --HeFlAV5LIbMFYYuh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 03, 2008 at 01:26:20PM -0700, David Wolfskill wrote: >To that end, I've cobbled up a Perl script that acts as a "wrapper" >around time(1) and uses that command to obtain the "rusage" (ref. >getrusage(2)) information about the command in question. Whilst not addressing your issues with sysctl, have you considered using process accounting (acct(5) and sa(8))? --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --HeFlAV5LIbMFYYuh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkf1564ACgkQ/opHv/APuIcecACgt9qP8oV3wBBr/Hxrm7BJJmgD 8BUAn20D2aiGfC5uqODFO+AYhWCofOnf =/Q9e -----END PGP SIGNATURE----- --HeFlAV5LIbMFYYuh-- From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 4 08:56:08 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87DF91065678 for ; Fri, 4 Apr 2008 08:56:08 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 36EE38FC13 for ; Fri, 4 Apr 2008 08:56:08 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A56318.dip.t-dialin.net [84.165.99.24]) by redbull.bpaserver.net (Postfix) with ESMTP id 7FEB62E0FE; Fri, 4 Apr 2008 10:36:40 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id E1B83A0878; Fri, 4 Apr 2008 10:36:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1207298198; bh=2kkFvmfkMSvYh83ViCiX0C2DQv+D0dT3x G9jOD4uHmw=; h=Message-ID:Date:From:To:Cc:Subject:References: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=u7t2jXQ5dtMRt1sfiLm7nksLgCPhadvLJuPOg5QeQSbhZj58D7zMRkvR3YV/GTlDn RnO2mTuMqMDScU4ujz2F5pUDg0LRIipqc3hTmwr5nFHJW6VDB5YTbvHvnehtvOsdC6/ UC8rW92zxtY+KyrFxCQMCUbx0D7i/JyJuq2k4G0eZzNJmwFy9fvGwLSbSvcMUFwCvgw AgT+Bk5aP9xoLb/PvvB1NFHGNCDo/P8qQXEBE4ebsSUHn2z1GmkRaOM7xvkpVzOZ8ST gdJPOnDQcLAwQYv15TmGmA4pdUMRBnyByrghVZ7teuNZOfzgKzeuUOyoGlL8kNcNrXJ Un/2mnXQw== Received: (from www@localhost) by webmail.leidinger.net (8.14.2/8.13.8/Submit) id m348abWm022284; Fri, 4 Apr 2008 10:36:37 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 04 Apr 2008 10:36:37 +0200 Message-ID: <20080404103637.21420xu11y89zdms@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Fri, 04 Apr 2008 10:36:37 +0200 From: Alexander Leidinger To: Sofian Brabez References: <20080403202620.GG48868@bunrab.catwhisker.org> <3456f9ca0804032011i7db909d4qc34ff53bd6f7aa28@mail.gmail.com> In-Reply-To: <3456f9ca0804032011i7db909d4qc34ff53bd6f7aa28@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.2-RC2) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-15.4, required 6, autolearn=not spam, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, RDNS_DYNAMIC 0.10, SMILEY -0.50) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Fri, 04 Apr 2008 11:21:13 +0000 Cc: hackers@freebsd.org Subject: Re: Is describing sysctl variables useful? 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 Apr 2008 08:56:08 -0000 Quoting Sofian Brabez (from Fri, 4 Apr 2008 05:11:41 +0200): > About syscl(3) OID description lack, i send my Google Summer Code > application to complete it this summer ;). Unfortunately this is not suitable for the SoC. Google wants code contributions, not pure documentation work. Maybe you can find something else you would be willing to do during the SoC. In case you haven't send multiple applications, feel free to send more than one. Bye, Alexander. -- Goldfish... what stupid animals. Even Wayne Cody stops eating before he bursts. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 4 13:04:52 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A86B1065672 for ; Fri, 4 Apr 2008 13:04:52 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 9D72F8FC19 for ; Fri, 4 Apr 2008 13:04:51 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Jhlb2-0002UZ-Je for freebsd-hackers@freebsd.org; Fri, 04 Apr 2008 13:04:44 +0000 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Apr 2008 13:04:44 +0000 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Apr 2008 13:04:44 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Fri, 04 Apr 2008 15:04:22 +0200 Lines: 46 Message-ID: References: <20080403202620.GG48868@bunrab.catwhisker.org> <3456f9ca0804032011i7db909d4qc34ff53bd6f7aa28@mail.gmail.com> <20080404103637.21420xu11y89zdms@webmail.leidinger.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4D5EC62B7D7A0FD03CF0BD38" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.6 (X11/20071022) In-Reply-To: <20080404103637.21420xu11y89zdms@webmail.leidinger.net> X-Enigmail-Version: 0.95.0 Sender: news Subject: Re: Is describing sysctl variables useful? 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 Apr 2008 13:04:52 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4D5EC62B7D7A0FD03CF0BD38 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Alexander Leidinger wrote: > Quoting Sofian Brabez (from Fri, 4 Apr 2008 05:11:4= 1 > +0200): >=20 >> About syscl(3) OID description lack, i send my Google Summer Code >> application to complete it this summer ;). >=20 > Unfortunately this is not suitable for the SoC. Google wants code > contributions, not pure documentation work. Maybe you can find somethin= g > else you would be willing to do during the SoC. In case you haven't sen= d > multiple applications, feel free to send more than one. I feel that in this case it's only the case of proper wording. Strictly speaking, adding descriptions to sysctls is a matter of coding kernel code in C. Though it may not be 100% within the spirit of the rules, it's certainly within the legalese. In any case it's not exactly trivial since some semantics used by sysctls are convoluted and require either understanding the code or nagging the author of the code. I also feel that it's a practically very useful project (augmented with writing "real" documentation as an integral, but officially out of focus, part of the project). --------------enig4D5EC62B7D7A0FD03CF0BD38 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.6 (GNU/Linux) iD8DBQFH9idfldnAQVacBcgRAop9AJ9IV9NvPsbhypKb6TKAZQnZk8waMgCfR+5Q mexfJL7/t6ufdv6SZMRa2y0= =nziV -----END PGP SIGNATURE----- --------------enig4D5EC62B7D7A0FD03CF0BD38-- From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 4 16:52:56 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4767106564A for ; Fri, 4 Apr 2008 16:52:56 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.freebsd.org (Postfix) with ESMTP id 9BE768FC1C for ; Fri, 4 Apr 2008 16:52:56 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (localhost [127.0.0.1]) by bunrab.catwhisker.org (8.13.3/8.13.3) with ESMTP id m34GqtXr059178; Fri, 4 Apr 2008 09:52:55 -0700 (PDT) (envelope-from david@bunrab.catwhisker.org) Received: (from david@localhost) by bunrab.catwhisker.org (8.13.3/8.13.1/Submit) id m34Gqt87059177; Fri, 4 Apr 2008 09:52:55 -0700 (PDT) (envelope-from david) Date: Fri, 4 Apr 2008 09:52:55 -0700 From: David Wolfskill To: Peter Jeremy Message-ID: <20080404165255.GT48868@bunrab.catwhisker.org> References: <20080403202620.GG48868@bunrab.catwhisker.org> <20080404083246.GV49813@server.vk2pj.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JMCz+drDJ1SjddZX" Content-Disposition: inline In-Reply-To: <20080404083246.GV49813@server.vk2pj.dyndns.org> User-Agent: Mutt/1.4.2.1i Cc: hackers@freebsd.org Subject: Re: Is describing sysctl variables useful? 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 Apr 2008 16:52:56 -0000 --JMCz+drDJ1SjddZX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 04, 2008 at 07:32:46PM +1100, Peter Jeremy wrote: > ... > Whilst not addressing your issues with sysctl, have you considered > using process accounting (acct(5) and sa(8))? Yes, but I have the impression (of which I wouldn't mind being disabused) that that approach would perturb the systems being measured somewhat more than using time(1) for the selected processes and sysctl(8) to get information on the overall system status. Note that I'm interested in measuring rather specific instantiations of certain commands/processes -- not the bulk of them. I believe that makes a salient difference. Peace, david --=20 David H. Wolfskill david@catwhisker.org I submit that "conspiracy" would be an appropriate collective noun for cats. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --JMCz+drDJ1SjddZX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iEYEARECAAYFAkf2XOYACgkQmprOCmdXAD3mMwCghJ37Om8AdGqLHBRL0Xs/jBmt hsQAnjINzOCjEedZkhR8SVOAYcA8VZ+Y =vYnf -----END PGP SIGNATURE----- --JMCz+drDJ1SjddZX-- From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 5 14:50:07 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2FCE106566C for ; Sat, 5 Apr 2008 14:50:07 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 4BC058FC20 for ; Sat, 5 Apr 2008 14:50:07 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id E9ED81CC40; Sat, 5 Apr 2008 16:50:38 +0200 (CEST) Date: Sat, 5 Apr 2008 16:50:38 +0200 From: Ed Schouten To: FreeBSD Hackers Message-ID: <20080405145038.GE5934@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lQSB8Tqijvu1+4Ba" Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Perforce and `p4 diff2' against the origin 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 Apr 2008 14:50:07 -0000 --lQSB8Tqijvu1+4Ba Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello everyone, Because my mpsafetty project in Perforce is going quite well, I'm considering running some kind of cron job to generate nightly diffs, so other people (interested friends, colleagues and others) to test my work. I've read `p4 help diff2' and it seems you can run the following command: p4 diff2 -b mpsafetty Unfortunately this command just does a braindead diff against the latest FreeBSD vendor source, which is not useful in my case. I just want it to generate a diff against the version I integrated. Is it possible to do this with Perforce? Thanks! --=20 Ed Schouten WWW: http://g-rave.nl/ --lQSB8Tqijvu1+4Ba Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkf3kb4ACgkQ52SDGA2eCwVWSACfX3YYprTx6+W0mGJD6iNtkzJN erUAmwWzu9sgTETXDy33SfQRalJhuX8c =UKtB -----END PGP SIGNATURE----- --lQSB8Tqijvu1+4Ba-- From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 5 16:03:45 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04B951065670 for ; Sat, 5 Apr 2008 16:03:45 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 8D9DB8FC16 for ; Sat, 5 Apr 2008 16:03:44 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id C1F9267BF3F; Sat, 5 Apr 2008 18:03:26 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y6XJaXG7ezeu; Sat, 5 Apr 2008 18:03:13 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 252ED673BAE; Sat, 5 Apr 2008 18:03:13 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id m35G3COc066158; Sat, 5 Apr 2008 18:03:12 +0200 (CEST) (envelope-from rdivacky) Date: Sat, 5 Apr 2008 18:03:12 +0200 From: Roman Divacky To: Ed Schouten Message-ID: <20080405160312.GA66126@freebsd.org> References: <20080405145038.GE5934@hoeg.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080405145038.GE5934@hoeg.nl> User-Agent: Mutt/1.4.2.3i Cc: FreeBSD Hackers Subject: Re: Perforce and `p4 diff2' against the origin 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 Apr 2008 16:03:45 -0000 On Sat, Apr 05, 2008 at 04:50:38PM +0200, Ed Schouten wrote: > Hello everyone, > > Because my mpsafetty project in Perforce is going quite well, I'm > considering running some kind of cron job to generate nightly diffs, so > other people (interested friends, colleagues and others) to test my > work. > > I've read `p4 help diff2' and it seems you can run the following > command: > > p4 diff2 -b mpsafetty > > Unfortunately this command just does a braindead diff against the latest > FreeBSD vendor source, which is not useful in my case. I just want it to > generate a diff against the version I integrated. > > Is it possible to do this with Perforce? this is what I use p4 diff2 -du //depot/vendor/freebsd/src/sys/...@131880 //depot/projects/soc2007/rdivacky/linux_at/sys/... | ~/awkdiff you can adjust that to your needs From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 5 16:15:29 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B30CE106567A for ; Sat, 5 Apr 2008 16:15:29 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.freebsd.org (Postfix) with ESMTP id 28E218FC21 for ; Sat, 5 Apr 2008 16:15:28 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-064-181-110.pools.arcor-ip.net [88.64.181.110]) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis) id 0ML31I-1JiB392bze-0003rz; Sat, 05 Apr 2008 18:15:27 +0200 Received: (qmail 84898 invoked from network); 5 Apr 2008 16:14:27 -0000 Received: from myhost.laiers.local (192.168.4.151) by ns1.laiers.local with SMTP; 5 Apr 2008 16:14:27 -0000 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Sat, 5 Apr 2008 18:13:03 +0200 User-Agent: KMail/1.9.9 References: <20080405145038.GE5934@hoeg.nl> <20080405160312.GA66126@freebsd.org> In-Reply-To: <20080405160312.GA66126@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804051813.03312.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1/M1KTmTb03+tkyxntX3N0h8T2utEpips+6Ujz p9aqnll44igRdRxBGonQeXSccXPhnDWNYn8zcTqinyZql6/IvZ D7/xkIK8qzVelufGnRuew== Cc: Ed Schouten , Roman Divacky Subject: Re: Perforce and `p4 diff2' against the origin 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 Apr 2008 16:15:29 -0000 On Saturday 05 April 2008 18:03:12 Roman Divacky wrote: > On Sat, Apr 05, 2008 at 04:50:38PM +0200, Ed Schouten wrote: > > Hello everyone, > > > > Because my mpsafetty project in Perforce is going quite well, I'm > > considering running some kind of cron job to generate nightly diffs, > > so other people (interested friends, colleagues and others) to test > > my work. > > > > I've read `p4 help diff2' and it seems you can run the following > > command: > > > > p4 diff2 -b mpsafetty > > > > Unfortunately this command just does a braindead diff against the > > latest FreeBSD vendor source, which is not useful in my case. I just > > want it to generate a diff against the version I integrated. > > > > Is it possible to do this with Perforce? > > this is what I use > > p4 diff2 -du //depot/vendor/freebsd/src/sys/...@131880 > //depot/projects/soc2007/rdivacky/linux_at/sys/... | ~/awkdiff > > you can adjust that to your needs The @rev to use can be obtained with: p4 changes -m 1 -i -u importer ... while inside your branched directory. Yes, this is an expensive command. You should rather check out the latest rev on the vendor tree before doing an IFC and record that rev into the IFC commit message. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News