* [PATCH] proc: shuffle "struct pde_opener"
@ 2019-10-04 23:47 Alexey Dobriyan
0 siblings, 0 replies; only message in thread
From: Alexey Dobriyan @ 2019-10-04 23:47 UTC (permalink / raw)
To: akpm; +Cc: linux-fsdevel
List iteration takes more code than anything else which means embedded
list_head should be the first element of the structure.
Space savings:
add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-18 (-18)
Function old new delta
close_pdeo 228 227 -1
proc_reg_release 86 82 -4
proc_entry_rundown 143 139 -4
proc_reg_open 298 289 -9
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
fs/proc/internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -197,8 +197,8 @@ extern ssize_t proc_simple_write(struct file *, const char __user *, size_t, lof
* inode.c
*/
struct pde_opener {
- struct file *file;
struct list_head lh;
+ struct file *file;
bool closing;
struct completion *c;
} __randomize_layout;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-04 23:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-04 23:47 [PATCH] proc: shuffle "struct pde_opener" Alexey Dobriyan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).