All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org,
	lkp@01.org
Subject: [PATCH 1/6] net: remove sock_poll_busy_flag
Date: Thu, 28 Jun 2018 16:20:54 +0200	[thread overview]
Message-ID: <20180628142059.10017-2-hch@lst.de> (raw)
In-Reply-To: <20180628142059.10017-1-hch@lst.de>

Can simplify be inlined into the only caller.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 include/net/busy_poll.h | 6 ------
 net/socket.c            | 5 ++++-
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/include/net/busy_poll.h b/include/net/busy_poll.h
index c5187438af38..4a459a0d70d1 100644
--- a/include/net/busy_poll.h
+++ b/include/net/busy_poll.h
@@ -130,12 +130,6 @@ static inline void sock_poll_busy_loop(struct socket *sock, __poll_t events)
 	}
 }
 
-/* if this socket can poll_ll, tell the system call */
-static inline __poll_t sock_poll_busy_flag(struct socket *sock)
-{
-	return sk_can_busy_loop(sock->sk) ? POLL_BUSY_LOOP : 0;
-}
-
 /* used in the NIC receive handler to mark the skb */
 static inline void skb_mark_napi_id(struct sk_buff *skb,
 				    struct napi_struct *napi)
diff --git a/net/socket.c b/net/socket.c
index 8a109012608a..0f397fa33614 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -1171,7 +1171,10 @@ static __poll_t sock_poll(struct file *file, poll_table *wait)
 		mask = sock->ops->poll_mask(sock, events);
 	}
 
-	return mask | sock_poll_busy_flag(sock);
+	/* this socket can poll_ll so tell the system call */
+	if (sk_can_busy_loop(sock->sk))
+		mask |= POLL_BUSY_LOOP;
+	return mask;
 }
 
 static int sock_mmap(struct file *file, struct vm_area_struct *vma)
-- 
2.17.1

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: lkp@lists.01.org
Subject: [PATCH 1/6] net: remove sock_poll_busy_flag
Date: Thu, 28 Jun 2018 16:20:54 +0200	[thread overview]
Message-ID: <20180628142059.10017-2-hch@lst.de> (raw)
In-Reply-To: <20180628142059.10017-1-hch@lst.de>

[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]

Can simplify be inlined into the only caller.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 include/net/busy_poll.h | 6 ------
 net/socket.c            | 5 ++++-
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/include/net/busy_poll.h b/include/net/busy_poll.h
index c5187438af38..4a459a0d70d1 100644
--- a/include/net/busy_poll.h
+++ b/include/net/busy_poll.h
@@ -130,12 +130,6 @@ static inline void sock_poll_busy_loop(struct socket *sock, __poll_t events)
 	}
 }
 
-/* if this socket can poll_ll, tell the system call */
-static inline __poll_t sock_poll_busy_flag(struct socket *sock)
-{
-	return sk_can_busy_loop(sock->sk) ? POLL_BUSY_LOOP : 0;
-}
-
 /* used in the NIC receive handler to mark the skb */
 static inline void skb_mark_napi_id(struct sk_buff *skb,
 				    struct napi_struct *napi)
diff --git a/net/socket.c b/net/socket.c
index 8a109012608a..0f397fa33614 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -1171,7 +1171,10 @@ static __poll_t sock_poll(struct file *file, poll_table *wait)
 		mask = sock->ops->poll_mask(sock, events);
 	}
 
-	return mask | sock_poll_busy_flag(sock);
+	/* this socket can poll_ll so tell the system call */
+	if (sk_can_busy_loop(sock->sk))
+		mask |= POLL_BUSY_LOOP;
+	return mask;
 }
 
 static int sock_mmap(struct file *file, struct vm_area_struct *vma)
-- 
2.17.1


  reply	other threads:[~2018-06-28 14:21 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-28 14:20 [RFC] replace ->get_poll_head with a waitqueue pointer in struct file Christoph Hellwig
2018-06-28 14:20 ` Christoph Hellwig
2018-06-28 14:20 ` Christoph Hellwig [this message]
2018-06-28 14:20   ` [PATCH 1/6] net: remove sock_poll_busy_flag Christoph Hellwig
2018-06-28 14:20 ` [PATCH 2/6] net: remove bogus RCU annotations on socket.wq Christoph Hellwig
2018-06-28 14:20   ` Christoph Hellwig
2018-06-28 14:20 ` [PATCH 3/6] net: don't detour through struct to find the poll head Christoph Hellwig
2018-06-28 14:20   ` Christoph Hellwig
2018-06-28 14:20 ` [PATCH 4/6] net: remove busy polling from sock_get_poll_head Christoph Hellwig
2018-06-28 14:20   ` Christoph Hellwig
2018-06-28 14:20 ` [PATCH 5/6] net: remove sock_poll_busy_loop Christoph Hellwig
2018-06-28 14:20   ` Christoph Hellwig
2018-06-28 14:20 ` [PATCH 6/6] fs: replace f_ops->get_poll_head with a static ->f_poll_head pointer Christoph Hellwig
2018-06-28 14:20   ` Christoph Hellwig
2018-06-28 16:40   ` Linus Torvalds
2018-06-28 16:40     ` Linus Torvalds
2018-06-28 18:17     ` Al Viro
2018-06-28 18:17       ` Al Viro
2018-06-28 19:31       ` Linus Torvalds
2018-06-28 19:31         ` Linus Torvalds
2018-06-28 20:28         ` Al Viro
2018-06-28 20:28           ` Al Viro
2018-06-28 20:37           ` Al Viro
2018-06-28 20:37             ` Al Viro
2018-06-28 21:16             ` Linus Torvalds
2018-06-28 21:16               ` Linus Torvalds
2018-06-28 21:11           ` Linus Torvalds
2018-06-28 21:11             ` Linus Torvalds
2018-06-28 21:30             ` Al Viro
2018-06-28 21:30               ` Al Viro
2018-06-28 21:39               ` Linus Torvalds
2018-06-28 21:39                 ` Linus Torvalds
2018-06-28 22:20               ` Al Viro
2018-06-28 22:20                 ` Al Viro
2018-06-28 22:35                 ` Linus Torvalds
2018-06-28 22:35                   ` Linus Torvalds
2018-06-28 22:49                   ` Al Viro
2018-06-28 22:49                     ` Al Viro
2018-06-28 22:55                     ` Linus Torvalds
2018-06-28 22:55                       ` Linus Torvalds
2018-06-28 23:37                       ` Al Viro
2018-06-28 23:37                         ` Al Viro
2018-06-29  0:13                         ` Linus Torvalds
2018-06-29  0:13                           ` Linus Torvalds
2018-06-29 13:29               ` Christoph Hellwig
2018-06-29 13:29                 ` Christoph Hellwig
2018-06-29 13:40                 ` Linus Torvalds
2018-06-29 13:40                   ` Linus Torvalds
2018-06-29 13:28             ` Christoph Hellwig
2018-06-29 13:28               ` Christoph Hellwig

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=20180628142059.10017-2-hch@lst.de \
    --to=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lkp@01.org \
    --cc=netdev@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.