Messages in this thread | ![/](/images/icornerl.gif) | | Date | Mon, 19 Dec 2011 11:58:10 -0800 | From | Arun Sharma <> | Subject | Re: [PATCH 2/2] Add a thread cpu time implementation to vDSO |
| |
On 12/19/11 11:51 AM, Arun Sharma wrote:
> +/* Should be optimized away at compile time */ > +static noinline int check_vvar_overflow(void) > +{ > + long vcpu_data_offset = (long) vvaraddr_vcpu_data - VVAR_ADDRESS; > + size_t size = (vcpu_data_offset + sizeof(vcpu_data) > + + sizeof(struct vpercpu_data) * CONFIG_NR_CPUS); > + return (size> VVAR_NUM_PAGES * PAGE_SIZE); > +}
Forgot to drop the "noinline" part (which I had added for debug purposes, so I could inspect the generated code). Fixed in my repo.
-Arun
| ![\](/images/icornerr.gif) |