Re: [PATCH 2/2] Add a thread cpu time implementation to vDSO

From: Arun Sharma
Date: Mon Dec 19 2011 - 14:58:33 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/