All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH-next] epoll: Remove ep_scan_ready_list() in comments
@ 2024-02-06  1:43 Huang Xiaojia
  2024-02-06 10:26 ` Jan Kara
  2024-02-06 12:55 ` Christian Brauner
  0 siblings, 2 replies; 3+ messages in thread
From: Huang Xiaojia @ 2024-02-06  1:43 UTC (permalink / raw)
  To: viro, brauner, jack, yuehaibing, linux-fsdevel; +Cc: huangxiaojia2

Since commit 443f1a042233 ("lift the calls of ep_send_events_proc()
into the callers"), ep_scan_ready_list() has been removed.
But there are still several in comments. All of them should
be replaced with other caller functions.

Signed-off-by: Huang Xiaojia <huangxiaojia2@huawei.com>
---
 fs/eventpoll.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 3534d36a1474..786e023a48b2 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -206,7 +206,7 @@ struct eventpoll {
 	 */
 	struct epitem *ovflist;
 
-	/* wakeup_source used when ep_scan_ready_list is running */
+	/* wakeup_source used when ep_send_events or __ep_eventpoll_poll is running */
 	struct wakeup_source *ws;
 
 	/* The user that created the eventpoll descriptor */
@@ -1153,7 +1153,7 @@ static inline bool chain_epi_lockless(struct epitem *epi)
  * This callback takes a read lock in order not to contend with concurrent
  * events from another file descriptor, thus all modifications to ->rdllist
  * or ->ovflist are lockless.  Read lock is paired with the write lock from
- * ep_scan_ready_list(), which stops all list modifications and guarantees
+ * ep_start/done_scan(), which stops all list modifications and guarantees
  * that lists state is seen correctly.
  *
  * Another thing worth to mention is that ep_poll_callback() can be called
@@ -1751,7 +1751,7 @@ static int ep_send_events(struct eventpoll *ep,
 			 * availability. At this point, no one can insert
 			 * into ep->rdllist besides us. The epoll_ctl()
 			 * callers are locked out by
-			 * ep_scan_ready_list() holding "mtx" and the
+			 * ep_send_events() holding "mtx" and the
 			 * poll callback will queue them in ep->ovflist.
 			 */
 			list_add_tail(&epi->rdllink, &ep->rdllist);
@@ -1904,7 +1904,7 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
 		__set_current_state(TASK_INTERRUPTIBLE);
 
 		/*
-		 * Do the final check under the lock. ep_scan_ready_list()
+		 * Do the final check under the lock. ep_start/done_scan()
 		 * plays with two lists (->rdllist and ->ovflist) and there
 		 * is always a race when both lists are empty for short
 		 * period of time although events are pending, so lock is
-- 
2.34.1


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

* Re: [PATCH-next] epoll: Remove ep_scan_ready_list() in comments
  2024-02-06  1:43 [PATCH-next] epoll: Remove ep_scan_ready_list() in comments Huang Xiaojia
@ 2024-02-06 10:26 ` Jan Kara
  2024-02-06 12:55 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2024-02-06 10:26 UTC (permalink / raw)
  To: Huang Xiaojia; +Cc: viro, brauner, jack, yuehaibing, linux-fsdevel

On Tue 06-02-24 09:43:53, Huang Xiaojia wrote:
> Since commit 443f1a042233 ("lift the calls of ep_send_events_proc()
> into the callers"), ep_scan_ready_list() has been removed.
> But there are still several in comments. All of them should
> be replaced with other caller functions.
> 
> Signed-off-by: Huang Xiaojia <huangxiaojia2@huawei.com>

Not really eventpoll expert but from a cursory look this looks fine to me.
Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

One nit below:


> --- a/fs/eventpoll.c
> +++ b/fs/eventpoll.c
> @@ -206,7 +206,7 @@ struct eventpoll {
>  	 */
>  	struct epitem *ovflist;
>  
> -	/* wakeup_source used when ep_scan_ready_list is running */
> +	/* wakeup_source used when ep_send_events or __ep_eventpoll_poll is running */

Please wrap this comment like:

	/*
	 * wakeup_source - used when ep_send_events or __ep_eventpoll_poll is
	 * running
	 */

									Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

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

* Re: [PATCH-next] epoll: Remove ep_scan_ready_list() in comments
  2024-02-06  1:43 [PATCH-next] epoll: Remove ep_scan_ready_list() in comments Huang Xiaojia
  2024-02-06 10:26 ` Jan Kara
@ 2024-02-06 12:55 ` Christian Brauner
  1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2024-02-06 12:55 UTC (permalink / raw)
  To: Huang Xiaojia; +Cc: Christian Brauner, viro, jack, yuehaibing, linux-fsdevel

On Tue, 06 Feb 2024 09:43:53 +0800, Huang Xiaojia wrote:
> Since commit 443f1a042233 ("lift the calls of ep_send_events_proc()
> into the callers"), ep_scan_ready_list() has been removed.
> But there are still several in comments. All of them should
> be replaced with other caller functions.
> 
> 

Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc

[1/1] epoll: Remove ep_scan_ready_list() in comments
      https://git.kernel.org/vfs/vfs/c/91d5bbf6d41e

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

end of thread, other threads:[~2024-02-06 12:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-06  1:43 [PATCH-next] epoll: Remove ep_scan_ready_list() in comments Huang Xiaojia
2024-02-06 10:26 ` Jan Kara
2024-02-06 12:55 ` Christian Brauner

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.