diff options
author | Jack Steiner <steiner@sgi.com> | 2009-12-15 19:48:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 10:20:16 -0500 |
commit | c550222f64265c9384c45d7f691445386025a82b (patch) | |
tree | 562d45bf656c8bafc9c0dd5b3897dba5da6ae9a3 /drivers/misc/sgi-gru/grumain.c | |
parent | 57ebb0342c12f00e7a6d15ba59bb6c3ee501c3af (diff) |
gru: preload tlb for bcopy instructions
Add anticipatory TLB dropins for GRU TLB misses that occur on BCOPY
instructions that copy large amounts of data.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/sgi-gru/grumain.c')
-rw-r--r-- | drivers/misc/sgi-gru/grumain.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/misc/sgi-gru/grumain.c b/drivers/misc/sgi-gru/grumain.c index ebabbdcbb97..ade0925eab0 100644 --- a/drivers/misc/sgi-gru/grumain.c +++ b/drivers/misc/sgi-gru/grumain.c | |||
@@ -316,7 +316,8 @@ static struct gru_thread_state *gru_find_current_gts_nolock(struct gru_vma_data | |||
316 | * Allocate a thread state structure. | 316 | * Allocate a thread state structure. |
317 | */ | 317 | */ |
318 | struct gru_thread_state *gru_alloc_gts(struct vm_area_struct *vma, | 318 | struct gru_thread_state *gru_alloc_gts(struct vm_area_struct *vma, |
319 | int cbr_au_count, int dsr_au_count, int options, int tsid) | 319 | int cbr_au_count, int dsr_au_count, |
320 | unsigned char tlb_preload_count, int options, int tsid) | ||
320 | { | 321 | { |
321 | struct gru_thread_state *gts; | 322 | struct gru_thread_state *gts; |
322 | struct gru_mm_struct *gms; | 323 | struct gru_mm_struct *gms; |
@@ -334,6 +335,7 @@ struct gru_thread_state *gru_alloc_gts(struct vm_area_struct *vma, | |||
334 | mutex_init(>s->ts_ctxlock); | 335 | mutex_init(>s->ts_ctxlock); |
335 | gts->ts_cbr_au_count = cbr_au_count; | 336 | gts->ts_cbr_au_count = cbr_au_count; |
336 | gts->ts_dsr_au_count = dsr_au_count; | 337 | gts->ts_dsr_au_count = dsr_au_count; |
338 | gts->ts_tlb_preload_count = tlb_preload_count; | ||
337 | gts->ts_user_options = options; | 339 | gts->ts_user_options = options; |
338 | gts->ts_user_blade_id = -1; | 340 | gts->ts_user_blade_id = -1; |
339 | gts->ts_user_chiplet_id = -1; | 341 | gts->ts_user_chiplet_id = -1; |
@@ -403,7 +405,9 @@ struct gru_thread_state *gru_alloc_thread_state(struct vm_area_struct *vma, | |||
403 | struct gru_vma_data *vdata = vma->vm_private_data; | 405 | struct gru_vma_data *vdata = vma->vm_private_data; |
404 | struct gru_thread_state *gts, *ngts; | 406 | struct gru_thread_state *gts, *ngts; |
405 | 407 | ||
406 | gts = gru_alloc_gts(vma, vdata->vd_cbr_au_count, vdata->vd_dsr_au_count, | 408 | gts = gru_alloc_gts(vma, vdata->vd_cbr_au_count, |
409 | vdata->vd_dsr_au_count, | ||
410 | vdata->vd_tlb_preload_count, | ||
407 | vdata->vd_user_options, tsid); | 411 | vdata->vd_user_options, tsid); |
408 | if (IS_ERR(gts)) | 412 | if (IS_ERR(gts)) |
409 | return gts; | 413 | return gts; |