From: Mateusz Nosek
Previously if 'futex_should_fail' returned true, then only 'ret' variable
was set, which was later overwritten without being read. The patch fixes
the problem.
Signed-off-by: Mateusz Nosek
---
kernel/futex.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --g
From: Mateusz Nosek
Previously variable 'tmp' was initialized, but was not read later
before reassigning. So the initialization can be removed.
Signed-off-by: Mateusz Nosek
---
mm/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
From: Mateusz Nosek
Most fields in struct pointed by 'subscriptions' are initialized explicitly
after the allocation. By changing kzalloc to kmalloc the call to memset
is avoided. As the only new code consists of 2 simple memory accesses,
the performance is increased.
Signed-off-by: Mateusz Nose
From: Mateusz Nosek
Variable 'want_page_poisoning' is a switch deciding if page poisoning
should be enabled. This patch changes it to be static key.
Signed-off-by: Mateusz Nosek
---
mm/page_poison.c | 20 +++-
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/mm/pa
From: Mateusz Nosek
Previously flags check was separated into two separated checks with two
separated branches. In case of presence of any of two mentioned flags,
the same effect on flow occurs. Therefore checks can be merged and one
branch can be avoided.
Signed-off-by: Mateusz Nosek
---
mm/p
From: Mateusz Nosek
Variable 'ret' is reassigned before used otherwise, so the assignment is
unnecessary and therefore can be removed.
Signed-off-by: Mateusz Nosek
---
fs/aio.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/aio.c b/fs/aio.c
index 42154e7c44cb..0a0e5cefa1c4 100644
--- a/
From: Mateusz Nosek
Previously variable 'buf' was initialized, but was not read later before
reassigning. So the initialization can be removed.
Signed-off-by: Mateusz Nosek
---
fs/pipe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/pipe.c b/fs/pipe.c
index 60dbee4571
From: Mateusz Nosek
The same code can work both for 'zone->compact_considered > defer_limit'
and 'zone->compact_considered >= defer_limit'. In the latter there is one
branch less which is more effective considering performance.
Signed-off-by: Mateusz Nosek
---
mm/compaction.c | 5 ++---
1 file
From: Mateusz Nosek
Most operations from '__alloc_pages_may_oom' do not require oom_mutex hold.
Exception is 'out_of_memory'. The patch refactors '__alloc_pages_may_oom'
to reduce critical section size and improve overall system performance.
Signed-off-by: Mateusz Nosek
---
mm/page_alloc.c | 4
From: Mateusz Nosek
When flags A and B have equal values than the following code
if(flags1 & A)
flags2 |= B;
is equivalent to
flags2 |= (flags1 & A);
The latter code should generate less instructions and be faster as one
branch is omitted in it.
Introduced patch changes the value of
From: Mateusz Nosek
If file is a directory it is surely not regular. Therefore, if 'S_ISREG'
check returns false one can be sure that vfs_truncate must returns with
error. Introduced patch refactors code to avoid one branch in 'likely'
control flow path. Moreover, it marks the proper check with '
From: Mateusz Nosek
The 'finalise_ac' function is just 'epilogue' for 'prepare_alloc_pages'.
Therefore there is no need to keep them both so 'finalise_ac' content can
be merged into 'prepare_alloc_pages' code. It would make
'__alloc_pages_nodemask' cleaner when it comes to readability.
Signed-of
From: Mateusz Nosek
By small refactoring two 'unlikely' branches are changed so that if
not one of them is true then only one branch occurs in 'likely' path
of the function in question. Change verified in assembly generated
by gcc 8.3.0.
Signed-off-by: Mateusz Nosek
---
mm/slab.c | 5 +++--
1
From: Mateusz Nosek
Previously in '__init early_init_on_alloc' and '__init early_init_on_free'
the return values from 'kstrtobool' were not handled properly. That caused
potential garbage value read from variable 'bool_result'. Introduced patch
fixes error handling.
Signed-off-by: Mateusz Nosek
From: Mateusz Nosek
The enum value 'COMPACT_INACTIVE' is never used so can be removed.
Signed-off-by: Mateusz Nosek
---
include/linux/compaction.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/linux/compaction.h b/include/linux/compaction.h
index 25a521d299c1..1de5a1151ee7 1006
From: Mateusz Nosek
Previously 'for_next_zone_zonelist_nodemask' macro parameter 'zlist' was
unused so this patch removes it.
Signed-off-by: Mateusz Nosek
---
include/linux/mmzone.h | 2 +-
mm/page_alloc.c| 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/
From: Mateusz Nosek
The removed code was unnecessary and changed nothing in the flow, since
in case of returning NULL by 'kmem_cache_alloc_node' returning 'freelist'
from the function in question is the same as returning NULL.
Signed-off-by: Mateusz Nosek
---
mm/slab.c | 2 --
1 file changed,
17 matches
Mail list logo