[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-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to