lkml.org 
[lkml]   [2011]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2011-12-19 21:01    [W:0.230 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site