duplicate read/write locks in net/pfil.c and netinet/ip_fw2.c
From: Luigi Rizzo (rizzo_at_icir.org)
Date: 08/17/05
- Previous message: Luigi Rizzo: "Re: Special schedulers, one CPU only kernel, one only userland"
- Next in thread: Max Laier: "Re: duplicate read/write locks in net/pfil.c and netinet/ip_fw2.c"
- Reply: Max Laier: "Re: duplicate read/write locks in net/pfil.c and netinet/ip_fw2.c"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 16 Aug 2005 17:05:19 -0700 To: arch@freebsd.org, net@freebsd.org
[apologies for the cross post but it belongs both to arch and net.]
I notice that net/pfil.c and netinet/ip_fw2.c have two copies of
aisimilar but slightly different implementation of
multiple-reader/single-writer locks, which brings up the question(s):
1. should we rather put this code in the generic kernel code so that other
subsystems could make use of it ? E.g. the routing table is certainly
a candidate,
and especially
2. should we implement it right ?
Both implementations are subject to starvation for the writers
(which is indeed a problem here, because we might want to modify
a ruleset and be prevented from doing it because of incoming traffic
that keeps readers active).
Also the PFIL_TRY_WLOCK will in fact be blocking if a writer
is already in - i have no idea how problematic is this in the
way it is actually used.
cheers
luigi
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Luigi Rizzo: "Re: Special schedulers, one CPU only kernel, one only userland"
- Next in thread: Max Laier: "Re: duplicate read/write locks in net/pfil.c and netinet/ip_fw2.c"
- Reply: Max Laier: "Re: duplicate read/write locks in net/pfil.c and netinet/ip_fw2.c"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]