diff options
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r-- | include/linux/dcache.h | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index f4b40a751f09..b1aeda077258 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -82,25 +82,33 @@ full_name_hash(const unsigned char *name, unsigned int len) | |||
82 | * large memory footprint increase). | 82 | * large memory footprint increase). |
83 | */ | 83 | */ |
84 | #ifdef CONFIG_64BIT | 84 | #ifdef CONFIG_64BIT |
85 | #define DNAME_INLINE_LEN_MIN 32 /* 192 bytes */ | 85 | # define DNAME_INLINE_LEN 32 /* 192 bytes */ |
86 | #else | 86 | #else |
87 | #define DNAME_INLINE_LEN_MIN 40 /* 128 bytes */ | 87 | # ifdef CONFIG_SMP |
88 | # define DNAME_INLINE_LEN 36 /* 128 bytes */ | ||
89 | # else | ||
90 | # define DNAME_INLINE_LEN 40 /* 128 bytes */ | ||
91 | # endif | ||
88 | #endif | 92 | #endif |
89 | 93 | ||
90 | struct dentry { | 94 | struct dentry { |
91 | unsigned int d_count; /* protected by d_lock */ | 95 | /* RCU lookup touched fields */ |
92 | unsigned int d_flags; /* protected by d_lock */ | 96 | unsigned int d_flags; /* protected by d_lock */ |
93 | spinlock_t d_lock; /* per dentry lock */ | ||
94 | seqcount_t d_seq; /* per dentry seqlock */ | 97 | seqcount_t d_seq; /* per dentry seqlock */ |
95 | struct inode *d_inode; /* Where the name belongs to - NULL is | ||
96 | * negative */ | ||
97 | /* | ||
98 | * The next three fields are touched by __d_lookup. Place them here | ||
99 | * so they all fit in a cache line. | ||
100 | */ | ||
101 | struct hlist_node d_hash; /* lookup hash list */ | 98 | struct hlist_node d_hash; /* lookup hash list */ |
102 | struct dentry *d_parent; /* parent directory */ | 99 | struct dentry *d_parent; /* parent directory */ |
103 | struct qstr d_name; | 100 | struct qstr d_name; |
101 | struct inode *d_inode; /* Where the name belongs to - NULL is | ||
102 | * negative */ | ||
103 | unsigned char d_iname[DNAME_INLINE_LEN]; /* small names */ | ||
104 | |||
105 | /* Ref lookup also touches following */ | ||
106 | unsigned int d_count; /* protected by d_lock */ | ||
107 | spinlock_t d_lock; /* per dentry lock */ | ||
108 | const struct dentry_operations *d_op; | ||
109 | struct super_block *d_sb; /* The root of the dentry tree */ | ||
110 | unsigned long d_time; /* used by d_revalidate */ | ||
111 | void *d_fsdata; /* fs-specific data */ | ||
104 | 112 | ||
105 | struct list_head d_lru; /* LRU list */ | 113 | struct list_head d_lru; /* LRU list */ |
106 | /* | 114 | /* |
@@ -112,12 +120,6 @@ struct dentry { | |||
112 | } d_u; | 120 | } d_u; |
113 | struct list_head d_subdirs; /* our children */ | 121 | struct list_head d_subdirs; /* our children */ |
114 | struct list_head d_alias; /* inode alias list */ | 122 | struct list_head d_alias; /* inode alias list */ |
115 | unsigned long d_time; /* used by d_revalidate */ | ||
116 | const struct dentry_operations *d_op; | ||
117 | struct super_block *d_sb; /* The root of the dentry tree */ | ||
118 | void *d_fsdata; /* fs-specific data */ | ||
119 | |||
120 | unsigned char d_iname[DNAME_INLINE_LEN_MIN]; /* small names */ | ||
121 | }; | 123 | }; |
122 | 124 | ||
123 | /* | 125 | /* |
@@ -143,7 +145,7 @@ struct dentry_operations { | |||
143 | void (*d_release)(struct dentry *); | 145 | void (*d_release)(struct dentry *); |
144 | void (*d_iput)(struct dentry *, struct inode *); | 146 | void (*d_iput)(struct dentry *, struct inode *); |
145 | char *(*d_dname)(struct dentry *, char *, int); | 147 | char *(*d_dname)(struct dentry *, char *, int); |
146 | }; | 148 | } ____cacheline_aligned; |
147 | 149 | ||
148 | /* | 150 | /* |
149 | * Locking rules for dentry_operations callbacks are to be found in | 151 | * Locking rules for dentry_operations callbacks are to be found in |