lkml.org 
[lkml]   [2006]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PREEMPT_RT : 2.6.16-rt12 and boot : BUG ?

* Steven Rostedt <rostedt@goodmis.org> wrote:

> > Why do we need such a size ?
>
> It seems that the -rt kernel has increased the size of structures that
> are used in modules and are defined per cpu.

i'm still wondering what that could be. The most drastic increase is the
size of locks (spinlocks, mutexes, etc.), especially with debugging
enabled - maybe one of the drivers uses a big per-CPU array of locks?

ah. One thing that takes up _alot_ of per-CPU space is the
latency-histogram stuff. I made the latency tracer itself use
non-per-cpu constructs to avoid overflowing the per-cpu-area, but the
latency-histogram code still uses PER_CPU:

#ifdef CONFIG_INTERRUPT_OFF_HIST
static DEFINE_PER_CPU(hist_data_t, interrupt_off_hist);
static char * interrupt_off_hist_proc_dir = "interrupt_off_latency";
#endif

#ifdef CONFIG_PREEMPT_OFF_HIST
static DEFINE_PER_CPU(hist_data_t, preempt_off_hist);
static char * preempt_off_hist_proc_dir = "preempt_off_latency";
#endif

#ifdef CONFIG_WAKEUP_LATENCY_HIST
static DEFINE_PER_CPU(hist_data_t, wakeup_latency_hist);
static char * wakeup_latency_hist_proc_dir = "wakeup_latency";
#endif

of a quite large array:

typedef struct hist_data_struct {
atomic_t hist_mode; /* 0 log, 1 don't log */
unsigned long min_lat;
unsigned long avg_lat;
unsigned long max_lat;
unsigned long long beyond_hist_bound_samples;
unsigned long long accumulate_lat;
unsigned long long total_samples;
unsigned long long hist_array[MAX_ENTRY_NUM];
} hist_data_t;

where MAX_ENTRY_NUM is 10240 right now. So the space used up is
10240*3*8 - roughly +256K per-cpu space!

I think that explains it. So the rule for -rt is, +256K more per-cpu
area is needed if the latency histograms are turned on.

Ingo
-
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: 2006-04-12 08:30    [W:0.086 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site