From: Davidlohr Bueso <dave@stgolabs.net> To: akpm@linux-foundation.org Cc: dave@stgolabs.net, linux-kernel@vger.kernel.org Subject: [PATCH 4/6] mm: Remove caller signal_pending branch predictions Date: Thu, 15 Nov 2018 16:27:11 -0800 Message-ID: <20181116002713.8474-5-dave@stgolabs.net> (raw) In-Reply-To: <20181116002713.8474-1-dave@stgolabs.net> This is already done for us internally by the signal machinery. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> --- mm/filemap.c | 2 +- mm/gup.c | 2 +- mm/hugetlb.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 81adec8ee02c..abd6c4591855 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1096,7 +1096,7 @@ static inline int wait_on_page_bit_common(wait_queue_head_t *q, break; } - if (unlikely(signal_pending_state(state, current))) { + if (signal_pending_state(state, current)) { ret = -EINTR; break; } diff --git a/mm/gup.c b/mm/gup.c index f76e77a2d34b..391c71dde267 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -722,7 +722,7 @@ static long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm, * If we have a pending SIGKILL, don't keep faulting pages and * potentially allocating memory. */ - if (unlikely(fatal_signal_pending(current))) { + if (fatal_signal_pending(current)) { ret = -ERESTARTSYS; goto out; } diff --git a/mm/hugetlb.c b/mm/hugetlb.c index c007fb5fb8d5..da798bc2e948 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -4184,7 +4184,7 @@ long follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, * If we have a pending SIGKILL, don't keep faulting pages and * potentially allocating memory. */ - if (unlikely(fatal_signal_pending(current))) { + if (fatal_signal_pending(current)) { remainder = 0; break; } -- 2.16.4
next prev parent reply index Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-11-16 0:27 [PATCH -next 0/6] treewide: Remove redundant branch predictions around signal_pending family Davidlohr Bueso 2018-11-16 0:27 ` [PATCH 1/6] locking/mutex: Remove caller signal_pending branch predictions Davidlohr Bueso 2018-11-16 0:27 ` [PATCH 2/6] kernel/sched: " Davidlohr Bueso 2018-11-16 0:27 ` [PATCH 3/6] arch/arc: Remove caller signal_pending_branch predictions Davidlohr Bueso 2018-11-16 0:27 ` Davidlohr Bueso [this message] 2018-11-16 0:27 ` [PATCH 5/6] drivers/i2c: Remove caller signal_pending branch predictions Davidlohr Bueso 2018-11-27 12:01 ` [5/6] " Wolfram Sang 2018-11-16 0:27 ` [PATCH 6/6] fs: " Davidlohr Bueso
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20181116002713.8474-5-dave@stgolabs.net \ --to=dave@stgolabs.net \ --cc=akpm@linux-foundation.org \ --cc=linux-kernel@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
LKML Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git git clone --mirror https://lore.kernel.org/lkml/9 lkml/git/9.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \ linux-kernel@vger.kernel.org public-inbox-index lkml Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git