lkml.org 
[lkml]   [2007]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 5/9] Add all the necessary structures to the vsyscall page
Date
On Thursday 01 February 2007 10:59, jbohac@suse.cz wrote:
> struct vxtime_data {
> + union {
> + struct {
> + u64 tsc_slope; /* TSC to MT coefficient */
> + u64 tsc_slope_avg; /* average tsc_slope */
> + u64 mt_base; /* approximated MT at the last LAPIC tick */
> + u64 mt_last; /* MT at the last LAPIC tick */
> + u64 tsc_last; /* TSC at the last LAPIC tick */
> + u64 last_mt_guess; /* ensures monotonicity in temporary MT mode */
> + char tsc_invalid; /* don't trust the TSC now (frequency changing) */
> + };
> + char pad[64]; /* cacheline alignment */

Use some variant of __cacheline_aligned_in_smp

There are far better ways than to hardcode

> + } cpu[NR_CPUS];

This can become very large with default NR_CPUS==128. I would prefer
a way that waste less space on smaller machines by only sizing the array
num_possible_cpus()

> long hpet_address; /* HPET base address */
> - int last;
> - unsigned long last_tsc;
> - long quot;
> - long tsc_quot;
> + u64 mt_q; /* master timer to nsec quotient */
> + u64 mt_wall; /* MT ticks already covered by the jiffies */
> + s64 ns_drift; /* MT - xtime drift in the last tick in ns */

Might make sense to duplicate those to all per cpu datas, then they
only need to acce

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

\
 
 \ /
  Last update: 2007-02-01 12:41    [W:0.239 / U:2.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site