Perfmon device
Hi, I sent this question to freebsd-questions but haven't got any answer, yet. That is why I'm now trying here. Here is my question. I have noticed that every time the perfmon device is closed it shuts down the PMECs. While I can see this is appropriate for some applications, it is not for mine. I'm using the PMECs for measuring the performance of some in-kernel networking routines. It would be very useful for me to be able to use the perfmon device just for configuring the PMECs. But as it is distributed this is not possible. I see two solutions to this. One is to extend the device's implementation for supporting a close without stopping ioctl command. Because this implies knowing the details of the device's driver, and because right now I need a fast solution, I cannot do this. The other is a brute force (and naive, if you will) solution; that is, eliminate the code in perfmon_close() that shuts down the PMECs. This code seams to be at perfmon_fini(), where perfmon_stop() is called and perfmon_inuse is updated. However, I do not want to do this until I'm sure such a change is safe. So my question is, can I do such a change an still get a working device? If no, is there some other way to accomplish this? Other derived questions. Is there some other way for on-line configuring the PMECs? Any comment on the proposed extension for the device? TIA, -- 0 0 0 Oscar-Ivan Lepe-Aldama | UPC-Campus Nord, DAC 0 0 0 e-mail: [EMAIL PROTECTED]| 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://people.ac.upc.es/homes/oscar/ To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Sysctl question (again)
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 intid; 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 10 (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 100 (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. Thanks, -- ======== 0 0 0 Oscar-Ivan Lepe-Aldama | UPC-Campus Nord, DAC 0 0 0 e-mail: [EMAIL PROTECTED]| 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 [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Sysctl question
Hi! 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 intid; u_int64_t tsc; u_int64_t pmec1; u_int64_t pcem2; } 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 10 (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 100 (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. Thanks, -- ======== 0 0 0 Oscar-Ivan Lepe-Aldama | UPC-Campus Nord, DAC 0 0 0 e-mail: [EMAIL PROTECTED]| 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 [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
How to define a large data heap inside the kernel?
Hi! I previously sent this message to the questions list but I didn't receive an answer. That is why I'm now trying this list. I'm gathering some performance data of some 4.1.1 kernel routines by means of rtsc() calls. For storing the performance data, I have defined an array of u_int64_t. For reading its content, I have exported this array to user space as a sysctl(8) OPAQUE object. The machine I'm using has 128MB. However, when the defined array has more than 2.8MB (more or less) the kernel panics. The array is define statically in some .c file as u_int64_t myarray[MYARRAYSIZE]; SYSCTL_NODE(, CTL_MYCTL, myoid, CTLFLAG_RW, 0,""); SYSCTL_OPAQUE(_myoid, OID_AUTO, myarray, CTLFLAG_RD, myarray, sizeof(myarray), "", ""); Is there a way to circunvent this problem? What system parameter is limiting the size of this array? Thanks, -- ======== 0 0 0 Oscar-Ivan Lepe-Aldama | UPC-Campus Nord, DAC 0 0 0 e-mail: [EMAIL PROTECTED]| 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 [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message