From owner-freebsd-hackers Mon Apr 16 2:48:59 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 8A10337B42C for ; Mon, 16 Apr 2001 02:48:53 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f3G9mok27600; Mon, 16 Apr 2001 02:48:50 -0700 (PDT) Date: Mon, 16 Apr 2001 02:48:50 -0700 From: Alfred Perlstein To: Oscar-Ivan Lepe-Aldama Cc: hackers@FreeBSD.ORG Subject: Re: Sysctl question (again) Message-ID: <20010416024850.I976@fw.wintelcom.net> References: <3ADABC98.B26D6C78@ac.upc.es> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3ADABC98.B26D6C78@ac.upc.es>; from oscar@ac.upc.es on Mon, Apr 16, 2001 at 11:34:16AM +0200 X-all-your-base: are belong to us. Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Oscar-Ivan Lepe-Aldama [010416 02:34] wrote: > Hi! > the technical question follows the next commentary. This is the second > (third) time I post this question. I'm wondering why I haven't got any > answers. Is it because this isn't the right forum? Is it because I > haven't been clear enough? Is it because my bad english? Any clue on why > the people in this forum can not give me any kind of answer for the > following question will be aprreciated. Now, the technical question > follows. > > Is there a maximum for the size of an object that sysctl can handle? > > I'm asking this because I have inserted in a 4.1.1 kernel an array > defined as > > > struct buf_entry { > unsgined int id; > u_int64_t tsc; > u_int64_t pmec1; > u_int64_t pmec2; > } mybuffer[NUMENTRIES]; > > SYSCTL_NODE(, CTL_NAVI, experiments, CTLFLAG_RW, 0,"Experiments"); > SYSCTL_OPAQUE(_experiments, OID_AUTO, buffer, CTLFLAG_RD, &mybuffer, > sizeof(mybuffer), "", ""); > > > When NUMENTRIES equals 100000 (100 thousand) everything works well; that > is, I can read the content of the array using > > sysctl -b experiments.mybuffer > somefile.raw > > But when NUMENTRIES equals 1000000 (1 million) and I use the above > command to read the content of the array, the system stops working > properly; that is, all virtual terminals freezed so I can't sent any > command to the system, although the kernel seams to be alive as it > responds to ICMP echo packets. > > I do want to have a large array within the kernel's memory space as I'm > measuring the performance of some kernel's routines using the Pentium's > Performance Monitoring Event Counters, and the more performance data I > could get in one experiment the best. > > By the way, the system under test has 64 MB of RAM and 20 GB of free > space on disk. > > Any explanation on the possibility or the impossibility of having such > large array within the kernel memory-space and having it exported > through sysctlt will be verry much appreciated. > uh: struct buf_entry { 4 unsgined int id; 8 u_int64_t tsc; 8 u_int64_t pmec1; 8 u_int64_t pmec2; } mybuffer[NUMENTRIES]; 28 * 1,000,000 = 28Megs That's quite a bit of space to wire down in your kernel, especially for a 64meg box. I would get more ram. You can also read on how to enable a kernel debugger and get us a meaningful traceback in order to possibly fix the problem. -Alfred > Thanks, > > -- > ======================================================================== > 0 0 0 Oscar-Ivan Lepe-Aldama | UPC-Campus Nord, DAC > 0 0 0 e-mail: oscar@ac.upc.es | Modul D6, despatx 116 > 0 0 0 phone: +34 93 401 7187 | Jordi Girona, 1-3 > U P C fax: +34 93 401 7055 | 08034 Barcelona - SPAIN > WWW: http://www.ac.upc.es/homes/oscar/ > ======================================================================== > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message