Re: TCP/IP kernel mode locking

From: dodger0401 (dodger0401_at_gmail.com)
Date: 07/15/05


Date: 15 Jul 2005 10:02:58 -0700

Kamal,

Thanks for the direction. I've already looked into the documentation
on the IBM site but was unable to find any information that went into
detail.

I did find that some of the structures contain both locks and reference
counts, but was unable to find how and when they should be used.

For instance, when I decrement the socket structure's reference count
to zero with the lock held how can I be sure that no other thread is
attempting to increment it?

The locking and reference counting I'm interested in revolves around
the structure's lifecycle.

Thanks,
Stan

Kamal R. Prasad wrote:
> dodger0401 wrote:
> > I'm implementing a kernel module that layers over tcp and can't seem to
> > find any documentation on this topic.
> >
> If you want to know how to write a kernel extension in AIX, there is
> documentation on IBM's website.
>
> > Does anyone know where I can get documentation about the locking and
> > reference strategies for the socket, inpcb and tcpcb kernel structures?
> > I'm primarily concerened with race conditions on SMP machines.
> >
> You would have to look at the internal data structures of the stack and
> then lock accordingly. There is documentation on the types of locks
> available for use (simple & complex) and how to handle
> thread-interupt/thread-thread race conditions.
>
> regards
> -kamal
>
> > Thanks,
> >
> > Stan



Relevant Pages