Peter Teoh wrote: > You're looking at mdb. That's a red herring. That's a user-space > debugger, so there's no actual locking at all going on -- the user space > program just reads out batches of kernel memory, and then tries to > interpret it. > > > Erh!!! My error.....toally right, userspace can never touch kernel's > locks, but at the same time I learnt something from your statement - I > always thought that mdb -K running in console mode, is processing the > "::dcmds" commands in kernel mode. Perhaps I am wrong....from your > statements "::netstat" must be running in kernel mode. But sometimes > command like single stepping, are running in the kernel mode, but not > the command processing itself....:-). Thank you for the lesson learnt.
Even when you do mdb -K from the console, there's no real locking going on. In that case, at least, I think the other threads are stopped, but there's no real guarantee that all of the data structures are consistent at the point when kmdb itself is running. (Of course, there might be a guarantee depending on the context. If the debugger is entered when a lock guaranteeing consistency is held, then kmdb itself gets those guarantees when examining the data. But there's nothing in kmdb or mdb that will reach out and acquire locks that it doesn't have.) -- James Carlson 42.703N 71.076W <carls...@workingcode.com> _______________________________________________ networking-discuss mailing list networking-discuss@opensolaris.org