| Date | Tue, 2 Apr 2013 12:27:38 -0400 | From | Theodore Ts'o <> | Subject | Re: [PATCH 23/33] generic dynamic per cpu refcounting |
| |
Reviewed-by: "Theodore Ts'o" <tytso@mit.edu>
> + v = atomic64_add_return(1 + (1ULL << PCPU_COUNT_BITS), > + &ref->count); > + > + if (!(v >> PCPU_COUNT_BITS) && > + REF_STATUS(pcpu_count) == PCPU_REF_NONE && alloc) > + percpu_ref_alloc(ref, pcpu_count);
This assumes that the kernel is compiled with -fno-strict-overflow. Which we do, and this is not the only place int the kernel where we depend on this, so while I was nervous before, I'm okay with it now. Could we at least have a comment saying that we're depending on -fno-strict-overflow, though?
|