use of rwlocks safe in network stack?

2010-08-20 Thread John Giacomoni
quot; via mi_switch in the turnstile code. Is this a locking order type rule? and if so, is the rule being ignored because network stack is guaranteed to return in a finite amount of time? Or is the bce interrupt a different type of interrupt than referred to in locking (9)

Re: Shared VM address range across processes

2008-03-13 Thread John Giacomoni
user space virtual addresses ? Nikhil -Original Message- From: John Giacomoni [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2008 9:13 AM To: freebsd-hackers@freebsd.org Cc: Rao, Nikhil Subject: Re: Shared VM address range across processes Nihkil, I'm working on something sim

Re: Shared VM address range across processes

2008-03-13 Thread John Giacomoni
Nihkil, I'm working on something similar for a research project and the answer is that it is possible but ugly. First, are you sure you need to do this? Ensuring safety by checking pointers before dereferencing can be painful :) FreeBSD seems to have checks scattered throughout the kernel tryi

how to map a vm_object the same vm address in user and kernel space?

2008-01-25 Thread John Giacomoni
ap, (vm_offset_t) *addr); How do I set this cleanly for all the pages used to back the object? Thanks John Giacomoni -- [EMAIL PROTECTED] University of Colorado at Boulder Department of Computer Science Engineering Center, ECCR 1B50 430 UCB Boulder, CO 80303-0430 USA

Running without clock interrupts?

2008-01-10 Thread John Giacomoni
to disable/mask acpi timer interrupts for the processor but trying to read the 0xfee00320 register (lvt_timer) causes a panic. Alternatively, I could hook in the timer handler to return immediately when a flag is set, though this still might introduce more jitter than I'd like. Thanks,

Re: pin/bind a pthread to a processor? (take 2)

2007-02-16 Thread John Giacomoni
e periodic scheduler and any callout code. Do either of you have any thoughts or ideas? I'm attaching the test code I used to generate these numbers. Thanks in advance for any help! John Giacomoni pintest.tgz Description: Binary data On Feb 9, 2007, at 9:53 PM, Daniel Eischen wrot

pin/bind a pthread to a processor? (take 2)

2007-01-30 Thread John Giacomoni
ation and papers are available at http://www.cs.colorado.edu/~jgiacomo thanks for any help! John G On Sep 8, 2006, at 6:33 PM, David Xu wrote: On Saturday 09 September 2006 04:18, John Giacomoni wrote: Is it possible to bind a pthread to a processor in 5.5 or 6.1? I currently have a code

Detect Bus Speed?

2006-09-12 Thread John Giacomoni
Is there a way to determine the current bus speed a PCI-X slot is running at? -- [EMAIL PROTECTED] University of Colorado at Boulder Department of Computer Science Engineering Center, ECCR 1B50 430 UCB Boulder, CO 80303-0430 USA ___ freebsd-hack

pin/bind a pthread to a processor?

2006-09-08 Thread John Giacomoni
Is it possible to bind a pthread to a processor in 5.5 or 6.1? I currently have a code base that uses libpthread with multiple threads, mutexes and condition variables. The problem I'm having is that I seem to be suffering wall-clock timing aberrations that I believe are introduced by the sch

Re: Sharing the same VM address space between Kernel and UserSpace

2005-11-14 Thread John Giacomoni
On Nov 14, 2005, at 1:57 PM, Scott Long wrote: John Giacomoni wrote: I am in need of a way to share memory between kernel space and possibly multiple different user-space processes for an extended period of time. This memory would need to be a single unpageable region. I am using the vm

Sharing the same VM address space between Kernel and UserSpace

2005-11-14 Thread John Giacomoni
I am in need of a way to share memory between kernel space and possibly multiple different user-space processes for an extended period of time. This memory would need to be a single unpageable region. I am using the vm routines as cribbed from mmap, however I'd like the address spaces to be viewe

what goes wrong with barrier free atomic_load/store?

2005-04-20 Thread John Giacomoni
in reading /src/sys/i386/include/atomic.h I found this comment and I'm having trouble understanding what the problem being referred to below is. /* * We assume that a = b will do atomic loads and stores. However, on a * PentiumPro or higher, reads may pass writes, so for that case we have * t

locking ifpromisc (struct ifnet)

2003-11-06 Thread John Giacomoni
Currently how should one lock a struct ifnet* so one can safely use ifpromisc on it? I'm writting a module similar to the bpf, however I am failing to follow the correct way to safely establish locking. Grabbing [Giant does not seem correct as Giant is being removed] my understanding is that one u

Which mutex to lock when accessing a "struct ifnet*" ?

2003-10-29 Thread John Giacomoni
I'm writing some code which examines the the state of a "struct ifnet*" as returned by "ifunit". In what situations is it possible for the "struct _softc" to be deleted taking it's "struct ifnet" with it? Does it never go away? I assume it is possible for the structure to go away given support for

Basic C++ fBSD 5.x kernel module

2003-09-09 Thread John Giacomoni
I have succeeded in getting a basic C++ module to function inside the FreeBSD 5.1 kernel. I figured I'd show the small example I have cooked up which uses basic C++ constructs such a new/delete and virtual inheritance. As suggested I have turned off exceptions have been turned off along with RTTI.

Re: C++ code in a kernel module?

2003-09-09 Thread John Giacomoni
On Tuesday, Sep 9, 2003, at 00:29 America/Denver, Peter Jeremy wrote: On Mon, Sep 08, 2003 at 11:12:59PM -0400, Alexander Kabaev wrote: On Mon, 8 Sep 2003 23:02:33 -0400 "Matthew Emmerton" <[EMAIL PROTECTED]> wrote: I've been silently following this thread, and unless I missed something, has anyon

C++ code in a kernel module?

2003-09-08 Thread John Giacomoni
How would one go about creating a kernel module which utilizes C++ code? I was planning on using the macro __cplusplus to toggle using extern "C" { }, however the bsd.kmod.mk style Makefiles seem to force the language to -std=c99 even when compiling with c++ . my initial steps have been as follows