All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: use in_atomic() in print_vma_addr()
@ 2017-11-01 21:38 ` Yang Shi
  0 siblings, 0 replies; 36+ messages in thread
From: Yang Shi @ 2017-11-01 21:38 UTC (permalink / raw)
  To: mhocko, akpm; +Cc: Yang Shi, linux-mm, linux-kernel

commit 3e51f3c4004c9b01f66da03214a3e206f5ed627b
("sched/preempt: Remove PREEMPT_ACTIVE unmasking off in_atomic()") makes
in_atomic() just check the preempt count, so it is not necessary to use
preempt_count() in print_vma_addr() any more. Replace preempt_count() to
in_atomic() which is a generic API for checking atomic context.

Signed-off-by: Yang Shi <yang.s@alibaba-inc.com>
---
 mm/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memory.c b/mm/memory.c
index a728bed..19b684e 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -4460,7 +4460,7 @@ void print_vma_addr(char *prefix, unsigned long ip)
 	 * Do not print if we are in atomic
 	 * contexts (in exception stacks, etc.):
 	 */
-	if (preempt_count())
+	if (in_atomic())
 		return;
 
 	down_read(&mm->mmap_sem);
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2017-11-06 16:24 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-01 21:38 [PATCH] mm: use in_atomic() in print_vma_addr() Yang Shi
2017-11-01 21:38 ` Yang Shi
2017-11-02  7:57 ` Michal Hocko
2017-11-02  7:57   ` Michal Hocko
2017-11-02 17:44   ` Yang Shi
2017-11-02 17:44     ` Yang Shi
2017-11-03  8:29     ` Michal Hocko
2017-11-03  8:29       ` Michal Hocko
2017-11-03 18:02     ` Andrew Morton
2017-11-03 18:02       ` Andrew Morton
2017-11-03 18:16       ` Yang Shi
2017-11-03 18:16         ` Yang Shi
2017-11-03 20:09       ` Bart Van Assche
2017-11-03 20:09         ` Bart Van Assche
2017-11-05  8:19         ` Michal Hocko
2017-11-05  8:19           ` Michal Hocko
2017-11-06 10:05           ` Peter Zijlstra
2017-11-06 10:05             ` Peter Zijlstra
2017-11-06 10:43             ` Michal Hocko
2017-11-06 10:43               ` Michal Hocko
2017-11-06 10:56               ` Michal Hocko
2017-11-06 10:56                 ` Michal Hocko
2017-11-06 12:00               ` Peter Zijlstra
2017-11-06 12:00                 ` Peter Zijlstra
2017-11-06 12:12                 ` Michal Hocko
2017-11-06 12:12                   ` Michal Hocko
2017-11-06 13:40                   ` [PATCH] mm: do not rely on preempt_count in print_vma_addr (was: Re: [PATCH] mm: use in_atomic() in print_vma_addr()) Michal Hocko
2017-11-06 13:40                     ` Michal Hocko
2017-11-06 14:19                     ` [PATCH] mm: do not rely on preempt_count in print_vma_addr Vlastimil Babka
2017-11-06 14:19                       ` Vlastimil Babka
2017-11-06 14:28                       ` Michal Hocko
2017-11-06 14:28                         ` Michal Hocko
2017-11-06 16:16                     ` Yang Shi
2017-11-06 16:16                       ` Yang Shi
2017-11-06 16:24                       ` Michal Hocko
2017-11-06 16:24                         ` Michal Hocko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.