DragonFly kernel List (threaded) for 2008-01
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
should we use atomic instructions to manipulate vmstats.v_wire_count?
> I noticed that vmstats.v_wire_count is incremented and decremented w/o
> protection. In contrast, atomic instructions (from <atomic.h>) are
> used in freebsd.
>
> Is it a bug in dfly or is it intentional?
If it is just stats and not used for anything else (I have no idea if this
is the case, just going by the name), why bother. Without SMP protection
there is a miniscule likelyhood the value will be out by one, but if that
doesn't break any code, is it worth the overhead of SMP locking just to
ensure that?
In my NFS code, I've used a macro so the adopters can decide if the
overhead is worth it. (Personally, I don't think so, but??)
rick
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]