Re: [PATCH] hwpmc(4) syscall arguments fix

2010-11-01 Thread John Baldwin
Then it's arguments would be included in sysproto.h directly. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: Fileops in file.h

2010-11-08 Thread John Baldwin
ctor. I > was thinking in mmap, fsync or sendfile. > > Can anyone tell me the reason? Mostly that it hasn't been done yet. If there was a clean way to do an f_mmap() and get some of the type-specific knowledge out of vm_mmap.c I'd really like it. -- John Baldwin ___

Re: [PATCH] mptutil(8) - capture errors and percolate up to caller

2010-11-08 Thread John Baldwin
in mpt_volstate() and mpt_pdstate(). IOC_STATUS_SUCCESS() returns a boolean, it is appropriate to test it with ! rather than == 0. It is also easier for a person to read the code that way. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing

Re: libkvm: consumers of kvm_getprocs for non-live kernels?

2010-11-11 Thread John Baldwin
vfs (it doesn't have a good way to map the device entries from the crashed kernel to the entries in wtmp IIRC). kvm_getprocs() is certainly actively used by various programs on crashdumps and works. -- John Baldwin ___ freebsd-hackers@freebsd.o

Re: Managing userland data pointers in kqueue/kevent

2010-11-15 Thread John Baldwin
nt as a member of an eventable object rather than a separate object that has a reference to the eventable object. When the eventable object's reference count drops to zero in userland, then the kevent should be deleted, either via EV_DELETE, or implicitly (e.g. by cl

Re: Phantom sysctl

2010-11-15 Thread John Baldwin
nvoked on kldload and kldunload to manage these sysctls. You will probably want to start your debugging in the unload hook as it sounds like the node is not being fully deregistered. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list

Re: Managing userland data pointers in kqueue/kevent

2010-11-15 Thread John Baldwin
On Monday, November 15, 2010 1:12:11 pm Paul LeoNerd Evans wrote: > On Mon, Nov 15, 2010 at 11:25:42AM -0500, John Baldwin wrote: > > I think the assumption is that userland actually maintains a reference on > > the > > specified object (e.g. a file descriptor) and

Re: breaking the crunchgen logic into a share/mk file

2010-11-16 Thread John Baldwin
nks to all of the frontends for a given crunch? If so, that is a problem as it will make rescue much harder to use. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: Software interrupts; where to start

2010-11-16 Thread John Baldwin
he pipe to sleep until memcached does an update. That requires modify memcached though. I'm not familiar enough with memcached to know if it already has some sort of signalling facility already that you could use directly. -- John Baldwin __

Re: breaking the crunchgen logic into a share/mk file

2010-11-20 Thread John Baldwin
On Tuesday, November 16, 2010 8:45:08 am Andrey V. Elsukov wrote: > On 16.11.2010 16:29, John Baldwin wrote: > > Err, are there no longer hard links to all of the frontends for a given > > crunch? If so, that is a problem as it will make rescue much harder to use. > > Yes

Re: new cpuid bits

2010-11-22 Thread John Baldwin
set. > ECX[0]: > Intel: Hardware Coordination Feedback Capability (Presence of Bits MCNT and > ACNT > MSRs). > AMD: EffFreq: effective frequency interface. > > How does the following look to you? > I will appreciate suggestions/comments. Looks fine to me. -- John Baldw

Re: Quick i386 question...

2010-11-22 Thread John Baldwin
pt/exception chapter in the corresponding > Intel manual but can't find the answer. Maybe I overlooked. Yes. A linear address is the flat virtual address after segments are taken into account. It is the address used as an input to the paging support in the MM

Re: Best way to determine if an IRQ is present

2010-11-22 Thread John Baldwin
e.g. the interrupt_sources[] array on x86) and move bound interrupts to other CPUs. However, I think all the interrupt bits will be MD, not MI. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd

Re: Building my own release ISOs

2010-11-22 Thread John Baldwin
ORLD_FLAGS=-j32 KERNEL_FLAGS=-j32 > BUILDNAME=sbruno CHROOTDIR=/new_release Sure. Note, though, that you don't have to create a branch just to build a release with a patch. You can always use LOCAL_PATCHES to apply patches to the source tree you build a release aga

Re: Best way to determine if an IRQ is present

2010-11-25 Thread John Baldwin
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 offline when they are "halted". Taking a CPU offline should trigger an EVENTHANDLER th

Re: How to debug BTX loader?

2010-11-30 Thread John Baldwin
code in src/sys/boot. The BTX kernel is in src/sys/boot/i386/btx/btx/. However, to debug this further we would need more info such as what exactly you are seeing (a hang, a BTX fault with a register dump, etc.). -- John Baldwin ___ freebsd-hack

Re: 8.1-RELEASE hangs on reboot

2010-12-01 Thread John Baldwin
set_driver+0x7c > device_attach() at device_attach+0x19b > bus_generic_attach() at bus_generic_attach+0x1a > pci_attach() at pci_attach+0xf1 The free() should be the free to free the softc but that implies it had a previous driver and softc. Maybe add some debug info to d

Re: How to debug BTX loader?

2010-12-02 Thread John Baldwin
On Wednesday, December 01, 2010 4:09:42 pm Darmawan Salihun wrote: > Hi John, > > --- On Tue, 11/30/10, John Baldwin wrote: > > > From: John Baldwin > > Subject: Re: How to debug BTX loader? > > To: freebsd-hackers@freebsd.org > > Cc: "Darmawan Salih

Re: How to debug BTX loader?

2010-12-02 Thread John Baldwin
On Thursday, December 02, 2010 2:12:04 pm Darmawan Salihun wrote: > Hi John, > > --- On Thu, 12/2/10, John Baldwin wrote: > > > From: John Baldwin > > Subject: Re: How to debug BTX loader? > > To: freebsd-hackers@freebsd.org > > Cc: "Darmawan Salihun&

Re: coretemp(4)/amdtemp(4) and sysctl nodes

2010-12-06 Thread John Baldwin
ell, you would want 'kldunload coretemp.ko' to remove the sysctl node even though the parent device is still around. I suspect the same case is true for amdtemp. Probably these drivers should use a separate sysctl context. I'm not sure how the sysctl code handl

Re: small dtrace patch for review

2010-12-06 Thread John Baldwin
ke sure that "host"/base CPU > stays > the same for all calls to smp_rendezvous_cpus(). > The pc_cpumask should just be a cosmetic change. Looks good to me. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists

Re: atomic_set_xxx(&x, 0)

2010-12-07 Thread John Baldwin
ic ops at all, but it should be using atomic_fetchadd() and atomic_readandclear() instead of some of the current atomic ops. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: getting rid of some -mno-* flags under sys/boot

2010-12-20 Thread John Baldwin
probably apply to gptzfsboot. BTW, the code in common/ is not built into a library, but specific boot programs (typically /boot/loader on different platforms) include specific objects. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: PCI IDE Controller Base Address Register setting

2010-12-28 Thread John Baldwin
rl, type, rid, 0x170, 0x177, 8); r = resource_list_reserve(rl, bus, dev, type, &rid, 0x170, 0x177, 8, 0); rid = PCIR_BAR(3); resource_list_add(rl, type, rid, 0x376, 0x376, 1); r = resource_list_reserve(rl, bus, dev, ty

Re: PCI IDE Controller Base Address Register setting

2010-12-28 Thread John Baldwin
On Tuesday, December 28, 2010 1:38:05 pm Darmawan Salihun wrote: > Hi, > > --- On Tue, 12/28/10, John Baldwin wrote: > > > From: John Baldwin > > Subject: Re: PCI IDE Controller Base Address Register setting > > To: freebsd-hackers@freebsd.org > > Cc: &

Re: PCI IDE Controller Base Address Register setting

2010-12-28 Thread John Baldwin
On Tuesday, December 28, 2010 2:10:59 pm Darmawan Salihun wrote: > Hi, > > --- On Tue, 12/28/10, John Baldwin wrote: > > > From: John Baldwin > > Subject: Re: PCI IDE Controller Base Address Register setting > > To: "Darmawan Salihun" > > Cc:

Re: PCI IDE Controller Base Address Register setting

2011-01-03 Thread John Baldwin
On Saturday, January 01, 2011 2:58:12 pm Darmawan Salihun wrote: > > --- On Thu, 12/30/10, Darmawan Salihun wrote: > > > From: Darmawan Salihun > > Subject: Re: PCI IDE Controller Base Address Register setting > > To: "John Baldwin" > > Cc: fre

Re: PANIC: thread_exit: Last thread exiting on its own.

2011-01-03 Thread John Baldwin
:( > > > Which revision of -STABLE are you running(or when last src update)? > uname shows: > > FreeBSD 8.2-PRERELEASE #2: Tue Dec 21 01:17:16 MSK 2010 > > I've rebuilt kernel RIGHT after `csup', so difference is no more > than several hours. Looks

Re: [patch] have rtprio check that arguments are numeric; change atoi to strtol

2011-01-04 Thread John Baldwin
shall be a number", errname); Small nit, maybe use 'must' instead of 'shall'. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: Building "third-party" modules for kernel with debug options?

2011-01-07 Thread John Baldwin
using kernel routines to allocate bio structures rather than malloc'ing one directly. Perhaps phk@ would ok moving bio_pblockno up above the optional diagnostic fields. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://list

Re: [rfc] allow to boot with >= 256GB physmem

2011-01-21 Thread John Baldwin
imple anti-shoot constraint to its sysctl handler. > I'm not sure though if it's worth to commit the second part. > > As this patch may cause some bikeshedding, > I'd like to hear your comments before I will commit it. > > http://plukky.net/~plu

Re: pci_suspend/pci_resume of custom pcie board

2011-01-25 Thread John Baldwin
ci_save_state() and pci_restore_state() would be fine) that hide the 'dinfo' detail as that isn't something device drivers should have to know. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: rtld optimizations

2011-01-26 Thread John Baldwin
it obviously can improve performance in > certain use cases, why not merge it and make FreeBSD even better? Many things that seem obvious aren't actually true, hence the need for actual testing and benchmarks. -- John Baldwin ___ freebsd

Re: Namecache lock contention?

2011-01-28 Thread John Baldwin
nning with "Name" that would > be connected to a lock. In vfs_cache.c: static struct rwlock cache_lock; RW_SYSINIT(vfscache, &cache_lock, "Name Cache"); What are the php scripts doing? Do they all try to create and delete files at the same time (or do renames)? --

Re: Divide-by-zero in loader

2011-01-28 Thread John Baldwin
ces where an incorrect geometry can > be seen? That's probably fine. A sector count of zero is invalid for CHS. However, probably we should not even be using C/H/S at all if the device claims to support EDD. We already use raw LBAs if it supports EDD, and we sho

Re: Divide-by-zero in loader

2011-01-28 Thread John Baldwin
On Friday, January 28, 2011 2:14:45 pm Matthew Fleming wrote: > On Fri, Jan 28, 2011 at 11:00 AM, John Baldwin wrote: > > On Friday, January 28, 2011 12:41:08 pm Matthew Fleming wrote: > >> I spent a few days chasing down a bug and I'm wondering if a loader > >

Re: NVIDIA (port) driver fails to create /dev/nvidactl; 8.2Prerelease

2011-01-31 Thread John Baldwin
have a usable configuration. > > Fatal server error: > no screens found You don't have an nvidia0 device attached to vgapci0. I would suggest adding printfs to the nvidia driver's probe routine to find out why it failed to probe. -- John Baldwin ___

Re: weird characters in top(1) output

2011-02-01 Thread John Baldwin
13 @@ /* show tag and bump lastline */ if (num_cpus == 1) printf("\nCPU: "); -else - printf("\nCPU %d: ", cpu); +else { + value = printf("\nCPU %d: ", cpu); + while (value++ <= cpustates_column) + printf(" "); +} lastline++; -Move_to(cpustates_column, y_cpustates + cpu); while ((thisname = *names++) != NULL) { if (*thisname != '\0') -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: Strange problems in the old libc malloc routines

2011-02-02 Thread John Baldwin
n so, if that is true free() should just ignore that pointer and not corrupt its internal state. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: Analyzing wired memory?

2011-02-08 Thread John Baldwin
kmem_alloc_nofault() (kstack/mapdev) ff807aa0e000 - 8000 8000 - 808164e8 text/data/bss 808164e8 - 81822000 bootstrap data (The various objects inserted directly into the kernel_map are likely from the nvidia driver.) The 'kvm' com

Re: CFR: FEATURE macros for AUDIT/CAM/IPC/KTR/MAC/NFS/NTP/PMC/SYSV/...

2011-02-11 Thread John Baldwin
y be inferred (e.g. if KTR is compiled in, then the debug.ktr.mask sysctl will exist). Also, in the case of KTR, I'm not sure that any userland programs need to alter their behavior based on whether or not that feature was present. -- John Baldwin ___

Re: problem with build mcelog

2011-02-11 Thread John Baldwin
//ftp2.pl.freebsd.org/pub/FreeBSD/distfiles/mcelog-1.0pre2.tar.gz > # tar -xf mcelog-1.0pre2.tar.gz > # cd mcelog-1.0pre2 > # fetch http://people.freebsd.org/~jhb/mcelog/mcelog.patch > # fetch http://people.freebsd.org/~jhb/mcelog/memstream.c Oops, I just updated mcelog.patch a

Re: map share memory to kernel space

2011-02-14 Thread John Baldwin
kva = trunc_page(kva); size = round_page(size + ofs); vm_map_remove(kernel_map, kva, kva + size); -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: map share memory to kernel space

2011-02-15 Thread John Baldwin
On Monday, February 14, 2011 10:12:59 pm beezarliu wrote: > On 2011-02-14 22:56:28, John Baldwin wrote: > >On Monday, February 14, 2011 4:18:50 am beezarliu wrote: > >> Hackers, > >> > >> I want to access a userland share memory in a kernel thread. > >&

Re: [PATCH] fix impossible case with waitpid(2) in truss

2011-02-15 Thread John Baldwin
meone could commit this patch it would be appreciated. > Thanks, > -Garrett I went with '< 0' to match the style used for ptrace() invocations in other parts of truss. All four calls to waitpid() in truss were broken in this fashion. -- John Baldwin __

Re: ichsmb - correct locking strategy?

2011-02-22 Thread John Baldwin
sters. That is the purpose of the mutex at least. There is a separate locking layer in smbus itself in (see smbus_request_bus(), etc.). -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: problem with build mcelog

2011-02-22 Thread John Baldwin
On Friday, February 18, 2011 7:11:07 am Sergey Kandaurov wrote: > On 18 February 2011 14:13, venom wrote: > > On 02/11/2011 11:31 PM, John Baldwin wrote: > >> > >> On Friday, February 11, 2011 7:48:39 am venom wrote: > >>> > >&

Re: seeking into /dev/{null,zero}

2011-02-22 Thread John Baldwin
ta in the gap return bytes of zeros (until data is actually written into the gap). -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: Super pages

2011-02-23 Thread John Baldwin
ages stats I > never see the wired pages nor free pages change: Err, it's freed when you call contigfree(). If you leak the memory when you do a kldunload, it is just lost until you reboot. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing

Re: mtx_init/lock_init and uninitialized struct mtx

2011-02-24 Thread John Baldwin
! > > -- > Sincerely yours, Dmitry V. Krivenok > e-mail: krivenok.dmi...@gmail.com > skype: krivenok_dmitry > jabber: krivenok_dmi...@jabber.ru > icq: 242-526-443 > ___ > freebsd-hackers@freebsd.org mailing list > http://lists

Re: listing all modules compiled into a kernel instance

2011-03-01 Thread John Baldwin
esn't have a DRIVER_MODULE() > declaration (because it isn't a driver). Yes, that would explain it. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: listing all modules compiled into a kernel instance

2011-03-02 Thread John Baldwin
mprove on the situation at all because components like > ucom were not cited in the configuration file. IMHO, there needs to be a > reliable way to query an existing kernel that yields a _complete_ list > of which components are actually included. > > On 2011-03-01 5:00 AM, John

Re: listing all modules compiled into a kernel instance

2011-03-03 Thread John Baldwin
On Thursday, March 03, 2011 3:03:02 am Carl wrote: > On 2011-03-01 2:13 PM, John Baldwin wrote: > >> On 2011-03-01 5:00 AM, John Baldwin wrote: > >>>> Maybe ucom doesn't appear because it doesn't have a DRIVER_MODULE() > >>>> declaration (bec

Re: hw.physmem (loader.conf and sysctl)

2011-03-04 Thread John Baldwin
20 - 507445248) / 2**20 == 16.0625 Mb. > > How does the system use this "hidden" memory? > > Some memory is taken by structures that describe usable pages. > There is one vm_page_t structure per each 4KB page. > I believe that that memory is excluded from physmem. Als

Re: UMA zone alloc on large UMA zone causing Page fault in kernel mode

2011-03-08 Thread John Baldwin
object and starting offset. Then you can use gdb to examine the pages assigned to that VM object at that offset and ensure they are valid, etc. You might also try examining the PTE's directly as well. -- John Baldwin ___ freebsd-hackers@freebsd.

Re: [GSoc] Timeconter Performance Improvements

2011-03-25 Thread John Baldwin
give a very fast and very cheap timecounter. I believe we already have a shared page (it holds the signal trampoline now) for at least the x86 platform (probably some others as well). -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http

Re: [GSoc] Timeconter Performance Improvements

2011-03-26 Thread John Baldwin
On Saturday, March 26, 2011 08:16:46 am Peter Jeremy wrote: > On 2011-Mar-25 08:18:38 -0400, John Baldwin wrote: > >For modern Intel CPUs you can just assume that the TSCs are in sync across > >packages. They also have invariant TSC's meaning that the frequen

Re: New Boot-Loader

2011-03-28 Thread John Baldwin
s is good. I think DFly already does this and I had a low priority item on my todo list to eventually implement this in the current menu myself. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: Include file search path

2011-03-30 Thread John Baldwin
ary by hand you do want to use the includes from /usr/include. I am not sure how we accomplish during buildworld (but we do). I think we actually build the compiler in the cross-tools stage such that it uses the /usr/include directory under {WORLDTMP} in place of /u

Re: Add SUM sysctl

2011-04-18 Thread John Baldwin
case is to restore /boot/kernel.old, > or one is doomed. This seems broken to me. An 8.3 kernel+modules should be able to handle GELI devices with an 8.2 world. If they can't, it means someone broke the ABI. Even a 9.0 kernel should work fine

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

2011-04-18 Thread John Baldwin
can make that code handle that race is by holding MNT_ILOCK() around the entire function, but that approach is often only suitable for a simple routine. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/m

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

2011-04-18 Thread John Baldwin
egular NFS client. Why is the assignment mutex locked? (I had assumed > it was related to the above memory caching issue, but now I'm not so sure.) In general I think writes to data that are protected by locks should always be protected by locks. In some cases you may be able to read data

Re: Is there some implicit locking of device methods?

2011-04-26 Thread John Baldwin
instances with separate softc's, so current attach/detach should not matter except that they may both try to talk to the same hardware perhaps? In that case that is something the USB bus driver should fix by prevent a device from attaching at an existing

Re: Is there some implicit locking of device methods?

2011-04-26 Thread John Baldwin
On Tuesday, April 26, 2011 10:27:14 am Warner Losh wrote: > > On Apr 26, 2011, at 7:42 AM, John Baldwin wrote: > > - The Giant protection for new-bus should prevent attach/detach from running > > concurrently I believe (either that or the USB bus itself should ensure

Re: problem with build mcelog

2011-04-26 Thread John Baldwin
ing: integer constant is too large for 'long' type > gmake: *** [mcelog.o] Error 1 Oops, please try this additional patch: --- //depot/projects/mcelog/mcelog.c2010-08-25 11:41:19.0 +++ /home/jhb/work/p4/mcelog/mcelog.c 2010-08-25 11:41:19.0 @@ -29,6 +29,10 @@

Re: Is there some implicit locking of device methods?

2011-04-26 Thread John Baldwin
On Tuesday, April 26, 2011 10:42:17 am Hans Petter Selasky wrote: > On Tuesday 26 April 2011 16:37:17 John Baldwin wrote: > > On Tuesday, April 26, 2011 10:27:14 am Warner Losh wrote: > > > On Apr 26, 2011, at 7:42 AM, John Baldwin wrote: > > > > - The Giant protect

Re: Is there some implicit locking of device methods?

2011-04-27 Thread John Baldwin
all to my .d_close method. Err, if you use cdevpriv you shouldn't even have a d_close method. All your d_close logic should be in the cdevpriv destructor, and the kernel will call your destructor when all references to an open file descriptor go

Re: problem with build mcelog

2011-04-27 Thread John Baldwin
On Wednesday, April 27, 2011 3:41:07 am Vladimir Laskov wrote: > On 04/26/2011 07:43 PM, John Baldwin wrote: > > --- //depot/projects/mcelog/mcelog.c2010-08-25 11:41:19.0 > > > > +++ /home/jhb/work/p4/mcelog/mcelog.c 2010-08-25 11:41:19.0

Re: Is there some implicit locking of device methods?

2011-04-27 Thread John Baldwin
ved on last close, you may still want to use a d_close() method, but there are actually edge cases where that can still not be called. So, for that sort of data I would still depend on the cdevpriv destructor and use a reference count between open() and the

Re: Look of boot2, on HDD

2011-05-02 Thread John Baldwin
sd were renamed to 'ad' and 'da'. At this point however, it is mostly archaic. boot2 still passes info in bootdev that the loader uses, but all the loader cares about is the BIOS device number partition/slice information on that device. I would be happy for boot2 to be changed to use the same naming scheme that /boot/loader uses (diskX), but it's fairly low priority. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: [UPDATE] New Boot-Loader Menu -- version 1.1

2011-05-03 Thread John Baldwin
hat the acpienabled stuff is all different in HEAD than in 7/8 since acpi.ko no longer exists. You should use the scheme from HEAD for handling ACPI present vs ACPI enabled/disabled. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list ht

Re: Runtime check for PAE option on BSD 6+ i386

2011-05-03 Thread John Baldwin
't really accurate as some folks may choose to enable PAE even with < 4GB to get PG_NX functionality. > afaik there's a sysctl method of checking this per BSD7 (or is it 8?), > but what about BSD6? Any hints on how I can runtime detect the above? Definitely a kern.featur

Re: [UPDATE] New Boot-Loader Menu -- version 1.1

2011-05-03 Thread John Baldwin
On Tuesday, May 03, 2011 12:31:14 pm Devin Teske wrote: > > On May 3, 2011, at 4:45 AM, John Baldwin wrote: > > > On Monday, May 02, 2011 8:48:31 pm Devin Teske wrote: > >> This version (1.1) works nearly identically to the standard menu that > >> ships wit

Re: Runtime check for PAE option on BSD 6+ i386

2011-05-03 Thread John Baldwin
On Tuesday, May 03, 2011 1:43:39 pm Kostik Belousov wrote: > On Tue, May 03, 2011 at 11:44:32AM -0400, John Baldwin wrote: > > On Tuesday, May 03, 2011 9:10:26 am Philip Soeberg wrote: > > > Hi fellow FreeBSD hackers, > > > > > > I've been using the follow

Re: [UPDATE] New Boot-Loader Menu -- version 1.1

2011-05-03 Thread John Baldwin
On Tuesday, May 03, 2011 2:57:34 pm Devin Teske wrote: > > From: John Baldwin [mailto:j...@freebsd.org] > > Sent: Tuesday, May 03, 2011 10:33 AM > > To: Devin Teske > > Cc: freebsd-hackers@freebsd.org; Olivier SMEDTS > > Subject: Re: [UPDATE] New Boot-Loader Menu --

Re: [UPDATE] New Boot-Loader Menu -- version 1.1

2011-05-03 Thread John Baldwin
On Tuesday, May 03, 2011 4:17:23 pm Devin Teske wrote: > > -Original Message- > > From: John Baldwin [mailto:j...@freebsd.org] > > Sent: Tuesday, May 03, 2011 12:20 PM > > To: Devin Teske > > Cc: freebsd-hackers@freebsd.org > > Subject: Re: [UPDATE]

Re: [UPDATE] New Boot-Loader Menu -- version 1.1

2011-05-03 Thread John Baldwin
On Tuesday, May 03, 2011 4:47:26 pm Devin Teske wrote: > > -Original Message- > > From: John Baldwin [mailto:j...@freebsd.org] > > Sent: Tuesday, May 03, 2011 1:36 PM > > To: Devin Teske > > Cc: freebsd-hackers@freebsd.org > > Subject: Re: [UPDATE]

Re: [UPDATE] New Boot-Loader Menu -- version 1.1

2011-05-03 Thread John Baldwin
On Tuesday, May 03, 2011 5:22:20 pm Devin Teske wrote: > > -Original Message- > > From: John Baldwin [mailto:j...@freebsd.org] > > Sent: Tuesday, May 03, 2011 2:01 PM > > To: Devin Teske > > Cc: freebsd-hackers@freebsd.org > > Subject: Re: [UPDATE]

Re: thread_lock vs panic/trap

2011-05-06 Thread John Baldwin
nywhere and another thread is changing its cpuset for example, then you could run into this. > And a related question, can there be a reason for a thread in panic or kdb > context to try to get the thread_lock? I think it isn't safe to try to grab one's own thread lock in panic or kdb

Re: Fwd: [PATCH v2 3/4] x86, head_32/64.S: Enable SMEP

2011-05-18 Thread John Baldwin
A-32 Architectures Software Developer’s Manual >Volume 3 (3A & 3B): > System Programming Guide Which revision? It is not documented in revision 38 from April 2011. I just downloaded that link, and it is still revision 38 and has no mention 'SMEP'. Also, bit 20 of CR4 is still marked as Reserved in that manual (section 2.5). -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: device_detach() on a device used by ixgbe driver (FreeBSD 7-STABLE through to 9-CURRENT)

2011-05-23 Thread John Baldwin
driver, can any one of you help me with a way around this problem? I > can't use the hints, and I can't detach() the device.. how can I get my > kernel module to attach the device? I think ixgbe has to be fixed to use BUS_PROBE_DEFAULT. Very few drivers should use '0'

Re: device_detach() on a device used by ixgbe driver ( FreeBSD 7-STABLE through to 9-CURRENT)

2011-05-24 Thread John Baldwin
On Monday, May 23, 2011 1:22:50 pm Philip Soeberg wrote: > On 23-05-2011 16:32, John Baldwin wrote: > >> I assume this (transcanding from FreeBSD 7.0-STABLE through to FreeBSD > >> 9-CURRENT) is in error? I would expect sys/dev/ixgbe/ixgbe.c's probe() > >> f

Re: device_detach() on a device used by ixgbe driver (FreeBSD 7-STABLE through to 9-CURRENT)

2011-05-24 Thread John Baldwin
On Monday, May 23, 2011 3:08:05 pm Andrew Boyer wrote: > > On May 23, 2011, at 10:32 AM, John Baldwin wrote: > > > On Monday, May 23, 2011 10:13:41 am Philip Soeberg wrote: > >> I would also expect the ixgbe.c driver to do a quick resource_disabled() > >> in i

Re: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread)

2011-05-26 Thread John Baldwin
myself, I can't run any binary (PR ports/152896, > which has been unanswered despite my efforts): > > Reading symbols from /usr/local/bin/gdb72...I'm sorry, Dave, I can't > do that. Symbol format `elf64-x86-64-freebsd' unknown. You need to unininstall libreadl

Re: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread)

2011-05-26 Thread John Baldwin
installed from ports and binutils installed from ports. I'd like to just remove the hack to use libreadline from ports if possible. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo

Re: Problem with running simple pthreads program under gdb-7.2 (Invalid selected thread)

2011-05-27 Thread John Baldwin
On Thursday, May 26, 2011 8:03:19 pm Raphael Kubo da Costa wrote: > Andriy Gapon writes: > > > on 26/05/2011 16:33 John Baldwin said the following: > >> On Thursday, May 26, 2011 3:37:13 am Andriy Gapon wrote: > >>> on 26/05/2011 03:35 Raphael Kubo da Cost

Re: ndis driver presents the valid WiFi network as having the name 0x000000

2011-05-31 Thread John Baldwin
pa_cli to 'select' my network at work that has this issue and then using 'ap_scan 2' to force wpa_supplicant to associate with it. You also will want ndis_events running if you need to do WPA authentication. -- John Baldwin ___ fr

Re: Active slice, only for a next boot

2011-05-31 Thread John Baldwin
) and you'd need to have some sanity checks to make sure one doesn't treat garbage input as valid. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: ndis driver presents the valid WiFi network as having the name 0x000000

2011-05-31 Thread John Baldwin
On Tuesday, May 31, 2011 12:36:43 pm Bernhard Schmidt wrote: > On Tuesday 31 May 2011 16:29:15 John Baldwin wrote: > > On Friday, May 27, 2011 5:14:09 pm Yuri wrote: > > > Underlying card is Broadcom BCM94312MCGSG (mini-card for laptop) with > > > Windows driver. >

Re: ndis driver presents the valid WiFi network as having the name 0x000000

2011-05-31 Thread John Baldwin
On Tuesday, May 31, 2011 12:36:43 pm Bernhard Schmidt wrote: > On Tuesday 31 May 2011 16:29:15 John Baldwin wrote: > > On Friday, May 27, 2011 5:14:09 pm Yuri wrote: > > > Underlying card is Broadcom BCM94312MCGSG (mini-card for laptop) with > > > Windows driver. >

Re: Bug in ksched_setscheduler?

2011-06-02 Thread John Baldwin
> Is it a real bug or just my misunderstanding of something? I think it is a real bug. Can you come up with a test case to show it? -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-

Re: [RFC] Enabling invariant TSC timecounter on SMP

2011-06-03 Thread John Baldwin
gt; I am still not sure which case this code should solve. > > Thread T1: x1 = rdtsc() on CPU1; > Thread T1: x2 = rdtsc() on CPU2; > x2 < x1 ? > Or? Yes, that can happen. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list

Re: some strange constructs (bugs?) in if_tun.c

2011-06-03 Thread John Baldwin
*m; - int error = 0; uint32_tfamily; int isr; @@ -877,7 +874,7 @@ tunwrite(struct cdev *dev, struct uio *uio, int fl if ((m = m_uiotombuf(uio, M_DONTWAIT, 0, 0, M_PKTHDR)) == NULL) { ifp->if_ierrors++; - return (error);

Re: Why user time of the process depends on machine load?

2011-06-16 Thread John Baldwin
uot;user" may actually be "system" time, in which case you may > be seeing the effect of contention in the kernel as more processes are > run. This is very true. You can only really trust the sum of system + user time and compare that across runs. -- John Baldwin ___

Re: Fwd: Shooting trouble on a PCI bus hang

2011-06-20 Thread John Baldwin
as it probes each device perhaps. -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: Shooting trouble on a PCI bus hang

2011-06-20 Thread John Baldwin
nd of BAR it is, or perhaps the raw value of the BAR that we first read that was setup by the firmware? -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail

Re: IPI and I/O interrupts

2011-06-22 Thread John Baldwin
o use an NMI IPI when entering the debugger (and possibly during panics), but general IPIs like TLB shootdowns, etc. are all maskable interrupts. Also, all of the IPI handlers (and the lapic timer interrupt) operate like normal device interrupt handlers using interrupt gates (which block interrupts

Re: Unit Tests for FreeBSD Kernel APIs?

2011-06-24 Thread John Baldwin
RT()s which caught a few edge cases I had missed initially). -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Re: pri_to_rtp returns invalid initial priority

2011-07-07 Thread John Baldwin
On Thursday, July 07, 2011 6:37:02 am Dmitry Krivenok wrote: > Hi Hackers, > I've developed a simple kld which demonstrates a problem I found on my > FreeBSD-8.2. Maybe revision 222802? -- John Baldwin ___ freebsd-hackers@freebsd.org mai

Re: System Fails to Boot (Deadlock?)

2011-07-13 Thread John Baldwin
ll screen? Also, is this host on the network and able to PXE? It's a lot easier to test custom kernels if needed using PXE than CDs (no need to burn a new CD each time, etc.). -- John Baldwin ___ freebsd-hackers@freebsd.org mailing list http://lis

  1   2   3   4   5   6   7   8   9   10   >