Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18003
b: refs/heads/master
c: 5fd63b3
h: refs/heads/master
i:
  18001: ab91885
  17999: fcdbada
v: v3
  • Loading branch information
Ravikiran G Thirumalai authored and Linus Torvalds committed Jan 12, 2006
1 parent 07d3d50 commit 719decb
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 99f7b77d3c62045bb47dfc4228a2341ba71bff1d
refs/heads/master: 5fd63b308569060ffa40af52ed122d9734111bff
12 changes: 12 additions & 0 deletions trunk/include/asm-x86_64/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,16 @@
#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)

#ifdef CONFIG_X86_VSMP

/* vSMP Internode cacheline shift */
#define INTERNODE_CACHE_SHIFT (12)
#ifdef CONFIG_SMP
#define __cacheline_aligned_in_smp \
__attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) \
__attribute__((__section__(".data.page_aligned")))
#endif

#endif

#endif
6 changes: 6 additions & 0 deletions trunk/include/asm-x86_64/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,13 @@ struct tss_struct {
extern struct cpuinfo_x86 boot_cpu_data;
DECLARE_PER_CPU(struct tss_struct,init_tss);

#ifdef CONFIG_X86_VSMP
#define ARCH_MIN_TASKALIGN (1 << INTERNODE_CACHE_SHIFT)
#define ARCH_MIN_MMSTRUCT_ALIGN (1 << INTERNODE_CACHE_SHIFT)
#else
#define ARCH_MIN_TASKALIGN 16
#define ARCH_MIN_MMSTRUCT_ALIGN 0
#endif

struct thread_struct {
unsigned long rsp0;
Expand Down
6 changes: 5 additions & 1 deletion trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,10 @@ long do_fork(unsigned long clone_flags,
return pid;
}

#ifndef ARCH_MIN_MMSTRUCT_ALIGN
#define ARCH_MIN_MMSTRUCT_ALIGN 0
#endif

void __init proc_caches_init(void)
{
sighand_cachep = kmem_cache_create("sighand_cache",
Expand All @@ -1316,6 +1320,6 @@ void __init proc_caches_init(void)
sizeof(struct vm_area_struct), 0,
SLAB_PANIC, NULL, NULL);
mm_cachep = kmem_cache_create("mm_struct",
sizeof(struct mm_struct), 0,
sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN,
SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL);
}

0 comments on commit 719decb

Please sign in to comment.