Re: Alternative compiler toolchain ?

2006-07-01 Thread Attilio Rao
2006/7/1, Divacky Roman [EMAIL PROTECTED]: afaik tendra doesnt support gnu C extensions and our srcs are full of it so the only possible compilers ATM are gcc and icc That's not completely true. A lot of GCC stubs are masked through macros, so, with a little work on it, you can successful

Re: Alternative compiler toolchain ?

2006-07-01 Thread Attilio Rao
2006/7/2, Steve Kargl [EMAIL PROTECTED]: It depends. If nwcc has no knowledge of floating point registers, then the optimized npx bzero and copyin/copyout operations aren't available. Nothing like a slow kernel. Thanks for the trust... http://www.freebsd.org/projects/ideas/#p-memcpy

Re: assyms.s

2006-07-04 Thread Attilio Rao
2006/7/4, Aditya Godbole [EMAIL PROTECTED]: Hi, I was going through the machine dependant code and found that assembler symbols are created using a script that parses symbol names taken from an object file. Why is it done this way? Are there any advantages of doing this? assym.s just keeps

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-11 Thread Attilio Rao
2006/7/11, [EMAIL PROTECTED] [EMAIL PROTECTED]: Why do you all consider importing C++ code to FreeBSD kernel to be so complicated at the beginning? Matthias Andree wrote: (please don't Cc me on list replies; chopping down the Cc list) On Tue, 11 Jul 2006, [EMAIL PROTECTED] wrote: Just as

Re: kern/99979: Get Ready for Kernel Module in C++

2006-07-12 Thread Attilio Rao
2006/7/12, Joerg Sonnenberger [EMAIL PROTECTED]: On Tue, Jul 11, 2006 at 11:37:52PM +0200, Attilio Rao wrote: Even if I have no proof-of-concepts (so maybe somebody can show that this is not fair), if we have setjmp/longjmp in the kernel we can have a correct exception handling mechanism

Re: i386 registers during a syscall

2006-07-23 Thread Attilio Rao
2006/7/23, Divacky Roman [EMAIL PROTECTED]: hi, I need to get content of %esi register as it was during a syscall. Should I get this info from td-td_pcb-pcb_esi or td-td_frame-tf_esi? Is it so that trapframe is content of registers when entering a kernel and pcb is when leaving a kernel ?

Re: VM question related to faults

2006-07-31 Thread Attilio Rao
2006/7/30, Divacky Roman [EMAIL PROTECTED]: On Sun, Jul 30, 2006 at 12:57:32PM +0200, Divacky Roman wrote: hi, while working on SoC linuxolator project I am in a need of this: I need to do some operation on memory like mem1 = mem1 + mem2 etc. where the mem1/mem2 access can trigger fault.

Re: exception handling in kernel code

2006-08-22 Thread Attilio Rao
2006/8/14, Stanislav Sedov [EMAIL PROTECTED]: On Mon, 14 Aug 2006 09:32:57 -0400 John Baldwin [EMAIL PROTECTED] mentioned: You can make use of pcb_onfault to recover from a page fault, but that's about it. Kernel code is expected to not generate exceptions. :) Thanks a lot! I'll try it.

Re: New wpi driver

2006-11-10 Thread Attilio Rao
2006/11/10, Max Laier [EMAIL PROTECTED]: On Friday 10 November 2006 10:37, Massimo Lusetti wrote: On Thu, 2006-11-09 at 22:39 +0100, Gábor Kövesdán wrote: Unfortunately, it seems that this is still that unfinished driver from Damien, that circulates on the net everywhere, but it only works

Re: New wpi driver

2006-11-10 Thread Attilio Rao
2006/11/10, Attilio Rao [EMAIL PROTECTED]: 2006/11/10, Max Laier [EMAIL PROTECTED]: On Friday 10 November 2006 10:37, Massimo Lusetti wrote: On Thu, 2006-11-09 at 22:39 +0100, Gábor Kövesdán wrote: Unfortunately, it seems that this is still that unfinished driver from Damien

Re: New wpi driver

2006-11-10 Thread Attilio Rao
2006/11/10, Attilio Rao [EMAIL PROTECTED]: 2006/11/10, Attilio Rao [EMAIL PROTECTED]: 2006/11/10, Max Laier [EMAIL PROTECTED]: On Friday 10 November 2006 10:37, Massimo Lusetti wrote: On Thu, 2006-11-09 at 22:39 +0100, Gábor Kövesdán wrote: Unfortunately, it seems that this is still

Re: New wpi driver

2006-11-10 Thread Attilio Rao
First of all, WPI_PCI_BAR0 might not be defined in this way, but it should really use PCIR_BAR() macro. Then, probabilly, gabor's device I/O space is relative to another BAR, so simply try all 6 using PCIR_BAR(n) where n range is 0-6 until it does allocate. Sorry, n ranges 0-5... (as I said

Re: Locking fundamentals

2006-12-20 Thread Attilio Rao
2006/12/20, Duane Whitty [EMAIL PROTECTED]: Hello again, It seems to me that understanding locking holds the key to understanding fbsd internals. Could someone review my understanding of fbsd locking fundamentals. (No assertions here, just questions) lock_mgr

Re: Locking fundamentals

2006-12-21 Thread Attilio Rao
2006/12/21, Suleiman Souhlal [EMAIL PROTECTED]: Attilio Rao wrote: 2006/12/20, Duane Whitty [EMAIL PROTECTED]: Hello again, It seems to me that understanding locking holds the key to understanding fbsd internals. Could someone review my understanding of fbsd locking fundamentals

Re: Locking fundamentals

2006-12-22 Thread Attilio Rao
2006/12/22, Robert Watson [EMAIL PROTECTED]: On Thu, 21 Dec 2006, Attilio Rao wrote: I disagree. There are many uses of atomic operations in the kernel that are not for locks or refcounts. It's a bad idea to use locks if you can achieve the same thing locklessly, with atomic operations. I

Re: Locking fundamentals

2006-12-28 Thread Attilio Rao
2006/12/24, Duane Whitty [EMAIL PROTECTED]: On Sat, Dec 23, 2006 at 02:24:10PM +0100, Alexander Leidinger wrote: Quoting Attilio Rao [EMAIL PROTECTED] (Fri, 22 Dec 2006 23:25:53 +0100): 2006/12/22, Robert Watson [EMAIL PROTECTED]: On Thu, 21 Dec 2006, Attilio Rao wrote: [explanation

Re: Locking etc. (Long, boring, redundant, newbie questions)

2007-03-29 Thread Attilio Rao
2007/3/29, Yar Tikhiy [EMAIL PROTECTED]: On Wed, Mar 28, 2007 at 10:40:58AM +0100, Robert Watson wrote: Spin locks are, FYI, slower than default mutexes. The reason is that they have to do more work: they not only perform an atomic operation/memory barrier to set the cross-CPU lock state,

Re: Locking etc. (Long, boring, redundant, newbie questions)

2007-03-29 Thread Attilio Rao
2007/3/28, Robert Watson [EMAIL PROTECTED]: Pretty much. We disable interrupts for the following reason: as spin mutexes may be acquired in fast interrupt handlers, they may be running on the stack of an existing thread, which may also hold locks. As such, we can't allow the fast handler to

Re: msleep() on recursivly locked mutexes

2007-04-26 Thread Attilio Rao
2007/4/26, Hans Petter Selasky [EMAIL PROTECTED]: Hi, In the new USB stack I have defined the following: u_int32_t mtx_drop_recurse(struct mtx *mtx) { u_int32_t recurse_level = mtx-mtx_recurse; u_int32_t recurse_curr = recurse_level; mtx_assert(mtx, MA_OWNED);

Re: msleep() on recursivly locked mutexes

2007-04-26 Thread Attilio Rao
2007/4/26, Julian Elischer [EMAIL PROTECTED]: The reason that mutexes ever recurse in the first place is usually because one piece of code calls itself (or a related piece of code) in a blind manner.. in other words, it doesn't know it is doing so. The whole concept of recursing mutexes is a

Re: msleep() on recursivly locked mutexes

2007-04-27 Thread Attilio Rao
Hans Petter Selasky wrote: On Thursday 26 April 2007 23:50, Attilio Rao wrote: 2007/4/26, Julian Elischer [EMAIL PROTECTED]: The reason that mutexes ever recurse in the first place is usually because one piece of code calls itself (or a related piece of code) in a blind manner.. in other words

Re: msleep() on recursivly locked mutexes

2007-05-02 Thread Attilio Rao
Matthew Dillon wrote: The real culprit here is passing held mutexes to unrelated procedures in the first place because those procedures might have to block, in order so those procedures can release and reacquire the mutex. That's just bad coding in my view. The unrelated

Re: msleep() on recursivly locked mutexes

2007-05-02 Thread Attilio Rao
Julian Elischer wrote: Hans Petter Selasky wrote: First of all: Where is FreeBSD's locking strategy document? It is just started.. man 9 locking. it needs a lot of work still. I'm working with rwatson@ about a document that can nicely fit in locking(9), but we are a little bit stuck in

Re: msleep() on recursivly locked mutexes

2007-05-02 Thread Attilio Rao
Sergey Babkin wrote: From: Julian Elischer [EMAIL PROTECTED] Basically you shouldn't have a recursed mutex FULL STOP. We have a couple of instances in the kernel where we allow a mutex to recurse, but they had to be hard fought, and the general rule is Don't. If you are recursing on a mutex

Re: Critical Sections for userland.

2007-10-04 Thread Attilio Rao
2007/10/3, Alfred Perlstein [EMAIL PROTECTED]: * Daniel Eischen [EMAIL PROTECTED] [071002 19:46] wrote: On Tue, 2 Oct 2007, Alfred Perlstein wrote: Hi guys, we need critical sections for userland here. This is basically to avoid a process being switched out while holding a user level

Re: Inner workings of turnstiles and sleepqueues

2007-10-19 Thread Attilio Rao
2007/10/19, John Baldwin [EMAIL PROTECTED]: On Friday 19 October 2007 12:56:54 am Ed Schouten wrote: * John Baldwin [EMAIL PROTECTED] wrote: The best option right now is to read the code. There are some comments in both the headers and implementation. Would it be useful to write

Re: a strange/stupid question

2007-11-23 Thread Attilio Rao
2007/11/24, Aryeh Friedman [EMAIL PROTECTED]: On 11/24/07, Attilio Rao [EMAIL PROTECTED] wrote: 2007/11/24, Aryeh Friedman [EMAIL PROTECTED]: Where do I find the main() [and/or other entery point] for the kernel I tend to understand stuff better if I follow the flow of exec from

Re: a strange/stupid question

2007-11-23 Thread Attilio Rao
2007/11/24, Aryeh Friedman [EMAIL PROTECTED]: Where do I find the main() [and/or other entery point] for the kernel I tend to understand stuff better if I follow the flow of exec from the start It is highly MD. For IA32 it is in i386/i386/locore.s::btext Attilio -- Peace can only be

[patch] Adding optimized kernel copying support to FreeBSD-i386 - Part I

2006-02-24 Thread Attilio Rao
Hi, As suggested in the list for volounteers, I'm currently working on optimizing kernel copying functions. As first step, I ported DragonFlyBSD's FPU handling design, which includes: - modifies to MD part of struct thread - modifies to npx device driver - a lot of modifies about kernel copying

Re: [patch] Adding optimized kernel copying support to FreeBSD-i386 - Part I

2006-02-24 Thread Attilio Rao
2006/2/24, Attilio Rao [EMAIL PROTECTED]: Hi, As suggested in the list for volounteers, I'm currently working on optimizing kernel copying functions. As first step, I ported DragonFlyBSD's FPU handling design, which includes: [snip] Attachment seems to be removed. You can get the patch here

[patch] Adding optimized kernel copying support to FreeBSD-i386 - Part II

2006-03-06 Thread Attilio Rao
Hi, I did not received too much feedbacks about Part I stability, but I went on, so Part II is available for tests. It presents an mmx copy which doesn't give much performance increases but what I need now is testing for correctness. In particular I would see feedbacks about races inside

Re: Adding optimized kernel copying support to FreeBSD-i386 - Part II

2006-03-06 Thread Attilio Rao
2006/3/6, Divacky Roman [EMAIL PROTECTED]: On Mon, Mar 06, 2006 at 11:20:10AM +0100, Attilio Rao wrote: Hi, I did not received too much feedbacks about Part I stability, but I went on, so Part II is available for tests. It presents an mmx copy which doesn't give much performance

Re: Re[2]: wakeup idea...

2006-03-07 Thread Attilio Rao
to implement it as an array in my effort. As Attilio Rao mentioned, this allows only fixed amount of concurrent readers at the time (which is not quite right, but can be implemented as a per-lock sysctl tuneable). I chose an array to prevent introducing one more mutex to the SX lock on the short

Re: syscall calling question

2006-05-06 Thread Attilio Rao
The only functions can be called at userspace are syscalls through software interrupt. Attilio 2006/5/6, Gergely CZUCZY [EMAIL PROTECTED]: hello, There's an issue on jails i've decided to look into (jails keep on stucking into the system). Yet, i examining the 6-STABLE tree, and there is a

Re: syscall calling question

2006-05-06 Thread Attilio Rao
developers handbook (read assembly section) explain exactly how the syscall handling happens on i386 architecture. Attilio 2006/5/6, Gergely CZUCZY [EMAIL PROTECTED]: On Sat, May 06, 2006 at 06:35:47PM +0200, Attilio Rao wrote: The only functions can be called at userspace are syscalls

Re: Kernel call stack for dummies.

2006-05-24 Thread Attilio Rao
2006/5/24, R. Tyler Ballance [EMAIL PROTECTED]: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I've started the uphill battle to port FreeBSD's kernel to run paravirtualized (--note the smart sounding vocabulary) on top of the L4/Iguana OS (Iguana is a very barebones OS developed by NICTA:

[patch] Adding optimized kernel copying support - Part III

2006-05-31 Thread Attilio Rao
Hi, this is the last release which is rather finished and complete for the project. I tested for consistency for a long time and the FPU handling mechanism seems very robust so as copyin/copyout do. What I'm looking for, at this point, are testers for peroformances. What is proposed in the

Re: [patch] Adding optimized kernel copying support - Part III

2006-05-31 Thread Attilio Rao
Sorry, but I unforgot one thing so, please, redownload the patch now. Attilio 2006/5/31, Attilio Rao [EMAIL PROTECTED]: Hi, this is the last release which is rather finished and complete for the project. I tested for consistency for a long time and the FPU handling mechanism seems very robust

Re: [patch] Adding optimized kernel copying support - Part III

2006-05-31 Thread Attilio Rao
2006/5/31, Suleiman Souhlal [EMAIL PROTECTED]: Hello Attilio, Hello Suleiman, Nice work. Any chance you could also port it to amd64? :-) Not in the near future, I think. :P Does that mean it won't work with SMP and PREEMPTION? Yes it will work (even if I think it needs more testing)

Re: [patch] Adding optimized kernel copying support - Part III

2006-05-31 Thread Attilio Rao
2006/6/1, Bruce Evans [EMAIL PROTECTED]: Does that mean it won't work with SMP and PREEMPTION? Yes it will work (even if I think it needs more testing) but maybe would give lesser performances on SMP|PREEMPTION due to too much traffic on memory/cache. For this I was planing to use

Re: [patch] Adding optimized kernel copying support - Part III

2006-06-01 Thread Attilio Rao
2006/6/1, Alexander Leidinger [EMAIL PROTECTED]: AFAIR the DFly FPU rework allows to use FPU/XMM instructions in their kernel without the need to do some manual state preserving (it's done automatically on demand). So one could use XMM instructions in RAID 5 or crypto parts of the code to test

Re: [patch] Adding optimized kernel copying support - Part III

2006-06-06 Thread Attilio Rao
2006/6/6, Matthew Dillon [EMAIL PROTECTED]: :AFAIR the DFly FPU rework allows to use FPU/XMM instructions in their :kernel without the need to do some manual state preserving (it's done :... : :Bye, :Alexander. That actually isn't quite how it works. If the userland had active FP state

Re: Help:why bus resource shortage?

2006-06-15 Thread Attilio Rao
2006/6/15, [EMAIL PROTECTED] [EMAIL PROTECTED]: Hi guys: I failed to get the pci bus resource after the driver is loaded (sc-r_mem is NULL after bus_alloc_resource_any is called). Is it because bus resources have been consumed by other drivers? Or other something happened? Please help me on

Re: interfacing uhid devs from kernel module

2006-06-15 Thread Attilio Rao
2006/6/15, Marcin Cylke [EMAIL PROTECTED]: On 6/15/06, Hans Petter Selasky [EMAIL PROTECTED] wrote: What functions do you need? Have you looked at uhid.c under /sys/dev/usb ? I would like to use the whole infrastructure: struct hid_item hid_usage_page() hid_usage_in_page() hid_init()

Re: pfind() in ithread handler

2008-02-28 Thread Attilio Rao
2008/2/28, Yuri Pankov [EMAIL PROTECTED]: Hi, I'm trying to understand the cause of following panic. panic: Trying sleep, but thread marked as sleeping prohibited cpuid = 0 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2a panic() at panic+0x17d

Re: Do you really sleep when blocked on a mutex?

2008-04-21 Thread Attilio Rao
2008/4/21, Murty, Ravi [EMAIL PROTECTED]: Hello, When a thread cannot get a mutex (default mutex) and needs to be blocked, is it really put to sleep? From looking at the code it appears that it is inhibited (TD_SET_LOCK) but isn't really put to sleep. From a scheduler perspective,

Re: Do you really sleep when blocked on a mutex?

2008-04-21 Thread Attilio Rao
2008/4/21, Murty, Ravi [EMAIL PROTECTED]: Hello, When a thread cannot get a mutex (default mutex) and needs to be blocked, is it really put to sleep? From looking at the code it appears that it is inhibited (TD_SET_LOCK) but isn't really put to sleep. 1. Why isn't it put to

Re: Building custom kernel with new files

2008-08-16 Thread Attilio Rao
2008/8/16, Ryan French [EMAIL PROTECTED]: Hi All, I am currently trying to build a custom kernel for my Google Summer of Code, and am running into a bit of a problem. I have all of my code compiling, but when I get to the linking stage as soon as it comes to the new files I have installed it

Re: Building custom kernel with new files

2008-08-16 Thread Attilio Rao
2008/8/16, Ryan French [EMAIL PROTECTED]: On Sat, 16 Aug 2008 10:38:24 pm you wrote: 2008/8/16, Ryan French [EMAIL PROTECTED]: Hi All, I am currently trying to build a custom kernel for my Google Summer of Code, and am running into a bit of a problem. I have all of my code

Re: smbfs hang

2008-10-16 Thread Attilio Rao
2008/10/16, Chris Coleman [EMAIL PROTECTED]: I'm doing a large transfer from an SMB mounted drive, about 2TB of files. After about 250G, it hanging. Of course any process that tries to access that drive hangs as well. Is there anyway to get those processes killed off and remount the

Re: [problem] aac0 does not respond

2009-03-24 Thread Attilio Rao
2009/3/24 Vladimir Ermakov samflan...@gmail.com: Hello, All Describe my problem: have volume RAID-10 (SAS-HDD x 6) on Adaptec RAID 5805 2 HHD of 6  have errors in smart data (damaged) i am try read file /var/db/mysql/ibdata1 from this volume system does not respond ( lost access to ssh )

Re: vfs_cache panic, 7.2-prerelease (stable)

2009-05-01 Thread Attilio Rao
2009/5/1 xorquew...@googlemail.com: Filed under: http://www.freebsd.org/cgi/query-pr.cgi?pr=134142 Would be incredibly grateful if somebody in the know could take a look at this. But, what's the panic message? Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein

Re: valgrind on FreeBSD 7

2009-06-18 Thread Attilio Rao
2008/10/2 Yuri y...@rawbw.com: Xin LI wrote: Simon Barner wrote: Mike Silbersack wrote: On Mon, 17 Mar 2008, Heiko Wundram wrote: Here's a tarball of what's in perforce right now. I tried it a little bit, and it seemed to work for me. Make sure to install the kernel module!

Re: Where have all the vnodes gone?

2009-08-01 Thread Attilio Rao
2009/8/1 Linda Messerschmidt linda.messerschm...@gmail.com: (Reposted from freebsd-questions due to no replies.) With the last few releases, I've noticed a distinct trend toward disappearing vnodes on one of the machines I look after. This machine isn't doing a whole lot. It runs a couple

Re: Where have all the vnodes gone?

2009-08-01 Thread Attilio Rao
2009/8/1 Linda Messerschmidt linda.messerschm...@gmail.com: (Reposted from freebsd-questions due to no replies.) With the last few releases, I've noticed a distinct trend toward disappearing vnodes on one of the machines I look after. This machine isn't doing a whole lot. It runs a couple

Re: sx locks and memory barriers

2009-09-29 Thread Attilio Rao
2009/9/25 Fabio Checconi fa...@freebsd.org: Hi all, looking at sys/sx.h I have some troubles understanding this comment: * A note about memory barriers. Exclusive locks need to use the same * memory barriers as mutexes: _acq when acquiring an exclusive lock * and _rel when releasing an

Re: sx locks and memory barriers

2009-09-29 Thread Attilio Rao
2009/9/29 John Baldwin j...@freebsd.org: On Tuesday 29 September 2009 11:39:37 am Attilio Rao wrote: 2009/9/25 Fabio Checconi fa...@freebsd.org: Hi all, looking at sys/sx.h I have some troubles understanding this comment: * A note about memory barriers. Exclusive locks need to use

Re: sx locks and memory barriers

2009-09-29 Thread Attilio Rao
2009/9/29 John Baldwin j...@freebsd.org: On Tuesday 29 September 2009 3:15:40 pm Attilio Rao wrote: 2009/9/29 John Baldwin j...@freebsd.org: On Tuesday 29 September 2009 11:39:37 am Attilio Rao wrote: 2009/9/25 Fabio Checconi fa...@freebsd.org: Hi all, looking at sys/sx.h I have some

Re: sx locks and memory barriers

2009-09-29 Thread Attilio Rao
2009/9/29 Max Laier m...@love2party.net: On Tuesday 29 September 2009 17:39:37 Attilio Rao wrote: 2009/9/25 Fabio Checconi fa...@freebsd.org: Hi all, looking at sys/sx.h I have some troubles understanding this comment: * A note about memory barriers. Exclusive locks need to use

Re: sx locks and memory barriers

2009-09-29 Thread Attilio Rao
2009/9/29 Marius Nünnerich mar...@nuenneri.ch: On Tue, Sep 29, 2009 at 21:15, Attilio Rao atti...@freebsd.org wrote: 2009/9/29 John Baldwin j...@freebsd.org: On Tuesday 29 September 2009 11:39:37 am Attilio Rao wrote: 2009/9/25 Fabio Checconi fa...@freebsd.org: Hi all, looking at sys/sx.h

Re: sx locks and memory barriers

2009-09-29 Thread Attilio Rao
2009/9/29 John Baldwin j...@freebsd.org: On Tuesday 29 September 2009 4:42:13 pm Attilio Rao wrote: 2009/9/29 Max Laier m...@love2party.net: On Tuesday 29 September 2009 17:39:37 Attilio Rao wrote: 2009/9/25 Fabio Checconi fa...@freebsd.org: Hi all, looking at sys/sx.h I have some

Re: NMI with 7.2-stable

2009-10-01 Thread Attilio Rao
Can you send a full dmesg? 2009/10/1 ivan anyukov ivan.anyu...@googlemail.com: Hi guys, I'm running 7.2-STABLE on a Thinkpad T60. When connecting a second monitor to my docking station sometimes my FreeBSD freezes. kgdb on the vmcore-file says non-maskable interrupt trap Some details:

Re: NMI with 7.2-stable

2009-10-01 Thread Attilio Rao
2009/10/1 ivan anyukov ivan.anyu...@googlemail.com: dmesg goes here: Yes, I think it is an hw failure. Attilio -- Peace can only be achieved by understanding - A. Einstein ___ freebsd-hackers@freebsd.org mailing list

Re: sx locks and memory barriers

2009-10-03 Thread Attilio Rao
2009/9/29 John Baldwin j...@freebsd.org: On Tuesday 29 September 2009 4:42:13 pm Attilio Rao wrote: 2009/9/29 Max Laier m...@love2party.net: On Tuesday 29 September 2009 17:39:37 Attilio Rao wrote: 2009/9/25 Fabio Checconi fa...@freebsd.org: Hi all, looking at sys/sx.h I have some

Re: resource leak in fifo_vnops.c: 6.x/7.x/8.x

2009-11-06 Thread Attilio Rao
2009/11/6 Dorr H. Clark dcl...@engr.scu.edu: We believe we have identified a significant resource leak present in 6.x, 7.x, and 8.x. We believe this is a regression versus FreeBSD 4.x which appears to do the Right Thing (tm). We have a test program (see below) which will run the system

Re: Panic in vm_map_stack

2010-03-26 Thread Attilio Rao
2010/3/26 pluknet pluk...@gmail.com: On 26 March 2010 23:10, Tom Judge t...@tomjudge.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 This is the function, I am guessing that I need to unlock the proc before calling vmspace_free ? As far as I know you cannot lock a process around

Re: idle threads

2010-04-23 Thread Attilio Rao
2010/4/24 Matthew Fleming matthew.flem...@isilon.com: I'm looking at kern_idle.c in stable/7 and I don't quite follow how idle threads work.  The kthread_create(9) call does not pass in a function pointer, so what code does a processor run when there is no other runnable thread? In STABLE_7:

Re: sysbench / fileio - Linux vs. FreeBSD

2010-06-05 Thread Attilio Rao
2010/6/5 Matthew Jacob m...@feral.com All of these tests have been apples vs. oranges for years. The following seems to be true, though: a) FreeBSD sequential write performance in UFS has always been less than optimal. b) Linux sequential write performance in just about any filesystem

Re: sysbench / fileio - Linux vs. FreeBSD

2010-06-05 Thread Attilio Rao
2010/6/5 Kostik Belousov kostik...@gmail.com On Sat, Jun 05, 2010 at 07:41:23PM +0200, Attilio Rao wrote: 2010/6/5 Matthew Jacob m...@feral.com All of these tests have been apples vs. oranges for years. The following seems to be true, though: a) FreeBSD sequential write

Re: disk I/O, VFS hirunningspace

2010-07-15 Thread Attilio Rao
2010/7/15 Alan Cox alan.l@gmail.com: On Thu, Jul 15, 2010 at 8:01 AM, Ivan Voras ivo...@freebsd.org wrote: On 07/14/10 18:27, Jerry Toung wrote: On Wed, Jul 14, 2010 at 12:04 AM, Gary Jennejohn gljennj...@googlemail.comwrote: Rather than commenting out the code try setting the

Re: sched_pin() versus PCPU_GET

2010-08-06 Thread Attilio Rao
2010/8/5 John Baldwin j...@freebsd.org: On Thursday, August 05, 2010 11:59:37 am m...@freebsd.org wrote: On Wed, Aug 4, 2010 at 11:55 AM, John Baldwin j...@freebsd.org wrote: On Wednesday, August 04, 2010 12:20:31 pm m...@freebsd.org wrote: On Wed, Aug 4, 2010 at 2:26 PM, John Baldwin

Re: sched_pin() versus PCPU_GET

2010-08-08 Thread Attilio Rao
2010/8/4 m...@freebsd.org: On Fri, Jul 30, 2010 at 2:31 PM, John Baldwin j...@freebsd.org wrote: On Friday, July 30, 2010 10:08:22 am John Baldwin wrote: On Thursday, July 29, 2010 7:39:02 pm m...@freebsd.org wrote: We've seen a few instances at work where witness_warn() in ast() indicates

Re: kld modules remain loaded if MOD_LOAD handler returns an error

2010-08-23 Thread Attilio Rao
2010/8/23 Andriy Gapon a...@icyb.net.ua: on 23/08/2010 15:10 John Baldwin said the following: On Friday, August 20, 2010 1:13:53 pm Ryan Stone wrote: Consider the following modules: /* first.c */ static int *test; int test_function(void) {     return *test; } static int

Re: KDB_TRACE and no backend

2010-09-18 Thread Attilio Rao
2010/9/18 Andriy Gapon a...@icyb.net.ua: Here's a small patch that adds support for printing stack trace in form of frame addresses when KDB_TRACE is enabled, but there is no debugger backend configured. The patch is styled after cheap variant of stack_ktr. What do you think

Re: KDB_TRACE and no backend

2010-09-18 Thread Attilio Rao
2010/9/18 Andriy Gapon a...@freebsd.org: on 18/09/2010 22:00 Andriy Gapon said the following: Oh, wow, and I totally overlooked stack_print(). Should have read stack(9) from the start. New patch.  Hope this is better. I don't like that the printf is duplicated, but couldn't figure out a way

Re: KDB_TRACE and no backend

2010-09-18 Thread Attilio Rao
2010/9/18 Andriy Gapon a...@freebsd.org: on 18/09/2010 23:35 Attilio Rao said the following: It is still missing checking on opt_stack.h Yes, thanks, fixed it in my tree. Besides, I'd reconsider having KDB_TRACE explanation in ddb(4) manpage (right now it is rightly there because it is DDB

Re: Best way to determine if an IRQ is present

2010-11-25 Thread Attilio Rao
2010/11/25 Andriy Gapon a...@freebsd.org: on 25/11/2010 17:28 John Baldwin said the following: Andriy Gapon wrote: on 22/11/2010 16:24 John Baldwin said the following: Well, the real solution is actually larger than described in the PR.  What you really want to do is take the logical CPUs

Re: atomic_set_xxx(x, 0)

2010-12-07 Thread Attilio Rao
2010/12/7 Andriy Gapon a...@freebsd.org: $ glimpse atomic_set_ | fgrep -w 0 /usr/src/sys/dev/arcmsr/arcmsr.c:       atomic_set_int(acb-srboutstandingcount, 0); /usr/src/sys/dev/arcmsr/arcmsr.c:       atomic_set_int(acb-srboutstandingcount, 0); /usr/src/sys/dev/jme/if_jme.c:  

Re: SMP question w.r.t. reading kernel variables

2011-04-17 Thread Attilio Rao
2011/4/17 Rick Macklem rmack...@uoguelph.ca: Hi, I should know the answer to this, but... When reading a global kernel variable, where its modifications are protected by a mutex, is it necessary to get the mutex lock to just read its value? For example: A    if ((mp-mnt_kern_flag

Re: debugging frequent kernel panics on 8.2-RELEASE

2011-08-18 Thread Attilio Rao
2011/8/18 Andriy Gapon a...@freebsd.org: on 17/08/2011 23:21 Andriy Gapon said the following: It seems like everything starts with some kind of a race between terminating processes in a jail and termination of the jail itself.  This is where the details are very thin so far.  What we see is

Re: Large machine test ideas

2011-09-01 Thread Attilio Rao
2011/8/31 Sean Bruno sean...@yahoo-inc.com: On Tue, 2011-08-30 at 17:11 -0700, Ivan Voras wrote: On 29.8.2011. 20:15, John Baldwin wrote: However, the SRAT code just ignores the table when it encounters an issue like this, it doesn't hang.  Something else later in the boot must have

Re: Large machine test ideas

2011-09-01 Thread Attilio Rao
2011/9/1 Ivan Voras ivo...@freebsd.org: On 1 September 2011 16:11, Attilio Rao atti...@freebsd.org wrote: I mean, if we have 2 cpus in a machine, but MAXCPU is set to 256, there is a bunch of lost memory and higher levels of lock contention? I thought that attilio was taking a stab

Re: Re: Kernel timers infrastructure

2011-09-12 Thread Attilio Rao
Besides I'd also suggest to have the callout rearming as the very last step of you callback in order to avoid buffering interleaving issues. Attilio 2011/9/12 Kostik Belousov kostik...@gmail.com: On Mon, Sep 12, 2011 at 11:48:42AM +0200, Marc L?rner wrote: Hello, what about changing order of

Re: question about the exchanges of td-td_lock and mtx in sched_switch() of sched_ule

2011-10-24 Thread Attilio Rao
2011/10/13 Haozhong Zhang snowzh8...@gmail.com: Hi, I'm recently reading the code of sched_ule in freebsd 8.2.0 and have two questions. 1. sched_switch() (in sched_ule.c) invokes cpu_switch() (at line 1852) and thread_unblock_switch() (at line 1867). These two functions exchange td-td_lock

Re: Per-mount syncer threads and fanout for pagedaemon cleaning

2011-12-27 Thread Attilio Rao
2011/12/27 Giovanni Trematerra giovanni.tremate...@gmail.com: On Mon, Dec 26, 2011 at 9:24 PM, Venkatesh Srinivas vsrini...@dragonflybsd.org wrote: Hi! I've been playing with two things in DragonFly that might be of interest here. Thing #1 := First, per-mountpoint syncer threads.

Re: Per-mount syncer threads and fanout for pagedaemon cleaning

2011-12-27 Thread Attilio Rao
2011/12/27 m...@freebsd.org: On Tue, Dec 27, 2011 at 8:05 AM, Attilio Rao atti...@freebsd.org wrote: 2011/12/27 Giovanni Trematerra giovanni.tremate...@gmail.com: On Mon, Dec 26, 2011 at 9:24 PM, Venkatesh Srinivas vsrini...@dragonflybsd.org wrote: Hi! I've been playing with two things

Re: 2 years student project

2012-01-14 Thread Attilio Rao
2012/1/14 Kip Macy kip.m...@gmail.com: Many of the ideas on that page are stale. I believe that the most promising approach would be to figure out what area of the system you're most interested in, e.g. networking, file systems, virtual memory, scheduling etc., make an honest appraisal of your

Re: Kernel threads inherit CPU affinity from random sibling

2012-01-27 Thread Attilio Rao
2012/1/28 Ryan Stone ryst...@gmail.com: Right now, whenever a thread is spawned, it inherits CPU affinity from its parent thread.  I put parent in scare quotes because as far as I can tell, for a kernel thread the parent is essentially chosen arbitrarily (it looks like it is the most recent

Re: Kernel threads inherit CPU affinity from random sibling

2012-01-28 Thread Attilio Rao
2012/1/28 Ryan Stone ryst...@gmail.com: On Fri, Jan 27, 2012 at 10:41 PM, Attilio Rao atti...@freebsd.org wrote: I think what you found out is very sensitive. However, the patch is not correct as you cannot call cpuset_setthread() with thread_lock held. Whoops!  I actually discovered

Re: Kernel threads inherit CPU affinity from random sibling

2012-01-28 Thread Attilio Rao
2012/1/28 Attilio Rao atti...@freebsd.org: 2012/1/28 Ryan Stone ryst...@gmail.com: On Fri, Jan 27, 2012 at 10:41 PM, Attilio Rao atti...@freebsd.org wrote: I think what you found out is very sensitive. However, the patch is not correct as you cannot call cpuset_setthread() with thread_lock

Re: sem(4) lockup in python?

2012-02-05 Thread Attilio Rao
2012/2/5 Ivan Voras ivo...@freebsd.org: On 5 February 2012 11:44, Garrett Cooper yaneg...@gmail.com wrote:    'make MAKE_JOBS_NUMBER=1' is the workground used right now.. David Xu suggested that it is a bug in Python - it doesn't set process-shared attribute when it calls sem_init(), but

Re: Kernel threads inherit CPU affinity from random sibling

2012-02-24 Thread Attilio Rao
2012/2/24, Eugene Grosbein egrosb...@rdtc.ru: 28.01.2012 20:22, Attilio Rao пишет: 2012/1/28 Ryan Stone ryst...@gmail.com: On Fri, Jan 27, 2012 at 10:41 PM, Attilio Rao atti...@freebsd.org wrote: I think what you found out is very sensitive. However, the patch is not correct as you cannot

Re: Kernel threads inherit CPU affinity from random sibling

2012-02-24 Thread Attilio Rao
2012/2/24, Eugene Grosbein eu...@grosbein.pp.ru: 24.02.2012 18:45, Attilio Rao пишет: I have the pathological test-case for it: http://www.freebsd.org/cgi/query-pr.cgi?pr=165444 A fix has been committed as r230984, it should apply to STABLE_9/8 too, can you try it? Attilio I will try

Re: NTFS GSoC Project Idea

2012-03-28 Thread Attilio Rao
2012/3/27, Efstratios Karatzas gpf.k...@gmail.com: On Tue, Mar 27, 2012 at 11:06 PM, Gleb Kurtsou gleb.kurt...@gmail.comwrote: On (26/03/2012 21:13), Efstratios Karatzas wrote: Greetings, I am a FreeBSD GSoC 2010 student, looking to participate in this years GSoC. The project that I

Re: [RFT][patch] Scheduling for HTT and not only

2012-04-06 Thread Attilio Rao
Il 05 aprile 2012 19:12, Arnaud Lacombe lacom...@gmail.com ha scritto: Hi, [Sorry for the delay, I got a bit sidetrack'ed...] 2012/2/17 Alexander Motin m...@freebsd.org: On 17.02.2012 18:53, Arnaud Lacombe wrote: On Fri, Feb 17, 2012 at 11:29 AM, Alexander Motinm...@freebsd.org  wrote:

Re: [RFT][patch] Scheduling for HTT and not only

2012-04-06 Thread Attilio Rao
Il 06 aprile 2012 15:27, Alexander Motin m...@freebsd.org ha scritto: On 04/06/12 17:13, Attilio Rao wrote: Il 05 aprile 2012 19:12, Arnaud Lacombelacom...@gmail.com  ha scritto: Hi, [Sorry for the delay, I got a bit sidetrack'ed...] 2012/2/17 Alexander Motinm...@freebsd.org

Re: Regarding core disable in FreeBSD 9

2012-04-14 Thread Attilio Rao
Il 13 aprile 2012 17:18, Mahesh Babu maheshbab...@yahoo.co.in ha scritto: How to disable a particular core in FreeBSD 9? How to enable it again? You can disable specific core at boot time by using the tunable: hint.lapic.X.disabled=1 where X is the APIC ID of the CPU you want to turn off.

Re: Disabling an arbitrary device

2012-04-20 Thread Attilio Rao
Il 20 aprile 2012 19:18, Arnaud Lacombe lacom...@gmail.com ha scritto: Hi, On Fri, Apr 20, 2012 at 2:16 PM, Arnaud Lacombe lacom...@gmail.com wrote: Hi, I will be bringing up an old thread there, but it would seem the situation did not evolve in the past 9 years. I have a machine running

Re: new panic in cpu_reset() with WITNESS

2012-05-17 Thread Attilio Rao
2012/5/17, Andriy Gapon a...@freebsd.org: on 25/01/2012 23:52 Andriy Gapon said the following: on 24/01/2012 14:32 Gleb Smirnoff said the following: Yes, now: Rebooting... lock order reversal: 1st 0x80937140 smp rendezvous (smp rendezvous) @

Re: ULE/sched issues on stable/9 - why isn't preemption occuring?

2012-05-29 Thread Attilio Rao
2012/5/29 Adrian Chadd adr...@freebsd.org: Hi Alexander and others, I've been tinkering with ath(4) IO scheduling and taskqueues. In order to get proper in order TX IO occuring, I've placed ath_start() into a taskqueue so now whenever ath_start() is called, it just schedules a taskqueue

  1   2   >