Commit 3749a8f
mm: zero hash tables in allocator
Add a new flag HASH_ZERO which when provided grantees that the hash
table that is returned by alloc_large_system_hash() is zeroed. In most
cases that is what is needed by the caller. Use page level allocator's
__GFP_ZERO flags to zero the memory. It is using memset() which is
efficient method to zero memory and is optimized for most platforms.
Link: http://lkml.kernel.org/r/1488432825-92126-3-git-send-email-pasha.tatashin@oracle.com
Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Reviewed-by: Babu Moger <babu.moger@oracle.com>
Cc: David Miller <davem@davemloft.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent f7fb506 commit 3749a8f
2 files changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
361 | 362 | | |
362 | 363 | | |
363 | 364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7198 | 7198 | | |
7199 | 7199 | | |
7200 | 7200 | | |
| 7201 | + | |
7201 | 7202 | | |
7202 | 7203 | | |
7203 | 7204 | | |
| |||
7242 | 7243 | | |
7243 | 7244 | | |
7244 | 7245 | | |
| 7246 | + | |
| 7247 | + | |
| 7248 | + | |
| 7249 | + | |
| 7250 | + | |
7245 | 7251 | | |
7246 | 7252 | | |
7247 | 7253 | | |
7248 | 7254 | | |
7249 | 7255 | | |
7250 | | - | |
| 7256 | + | |
7251 | 7257 | | |
7252 | 7258 | | |
7253 | 7259 | | |
7254 | 7260 | | |
7255 | 7261 | | |
7256 | 7262 | | |
7257 | 7263 | | |
7258 | | - | |
7259 | | - | |
| 7264 | + | |
| 7265 | + | |
7260 | 7266 | | |
7261 | 7267 | | |
7262 | 7268 | | |
| |||
0 commit comments