* [PATCH] sched/wait: Remove unused bit_wait_io_timeout
@ 2024-10-01 23:40 linux
2024-10-03 21:13 ` Tim Chen
2024-10-08 7:56 ` [tip: sched/core] " tip-bot2 for Dr. David Alan Gilbert
0 siblings, 2 replies; 3+ messages in thread
From: linux @ 2024-10-01 23:40 UTC (permalink / raw)
To: mingo, peterz, juri.lelli, vincent.guittot, dietmar.eggemann,
rostedt, bsegall, mgorman, vschneid
Cc: linux-kernel, Dr. David Alan Gilbert
From: "Dr. David Alan Gilbert" <linux@treblig.org>
bit_wait_io_timeout has been unused since 2016's
commit 62906027091f ("mm: add PageWaiters indicating tasks are waiting for a page bit")
Remove it.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
include/linux/wait_bit.h | 1 -
kernel/sched/wait_bit.c | 14 --------------
2 files changed, 15 deletions(-)
diff --git a/include/linux/wait_bit.h b/include/linux/wait_bit.h
index 7725b7579b78..d9c23377dc75 100644
--- a/include/linux/wait_bit.h
+++ b/include/linux/wait_bit.h
@@ -49,7 +49,6 @@ int wake_bit_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync
extern int bit_wait(struct wait_bit_key *key, int mode);
extern int bit_wait_io(struct wait_bit_key *key, int mode);
extern int bit_wait_timeout(struct wait_bit_key *key, int mode);
-extern int bit_wait_io_timeout(struct wait_bit_key *key, int mode);
/**
* wait_on_bit - wait for a bit to be cleared
diff --git a/kernel/sched/wait_bit.c b/kernel/sched/wait_bit.c
index 134d7112ef71..c6aab3db70bf 100644
--- a/kernel/sched/wait_bit.c
+++ b/kernel/sched/wait_bit.c
@@ -228,20 +228,6 @@ __sched int bit_wait_timeout(struct wait_bit_key *word, int mode)
}
EXPORT_SYMBOL_GPL(bit_wait_timeout);
-__sched int bit_wait_io_timeout(struct wait_bit_key *word, int mode)
-{
- unsigned long now = READ_ONCE(jiffies);
-
- if (time_after_eq(now, word->timeout))
- return -EAGAIN;
- io_schedule_timeout(word->timeout - now);
- if (signal_pending_state(mode, current))
- return -EINTR;
-
- return 0;
-}
-EXPORT_SYMBOL_GPL(bit_wait_io_timeout);
-
void __init wait_bit_init(void)
{
int i;
--
2.46.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] sched/wait: Remove unused bit_wait_io_timeout
2024-10-01 23:40 [PATCH] sched/wait: Remove unused bit_wait_io_timeout linux
@ 2024-10-03 21:13 ` Tim Chen
2024-10-08 7:56 ` [tip: sched/core] " tip-bot2 for Dr. David Alan Gilbert
1 sibling, 0 replies; 3+ messages in thread
From: Tim Chen @ 2024-10-03 21:13 UTC (permalink / raw)
To: linux, mingo, peterz, juri.lelli, vincent.guittot,
dietmar.eggemann, rostedt, bsegall, mgorman, vschneid
Cc: linux-kernel
On Wed, 2024-10-02 at 00:40 +0100, linux@treblig.org wrote:
> From: "Dr. David Alan Gilbert" <linux@treblig.org>
>
> bit_wait_io_timeout has been unused since 2016's
> commit 62906027091f ("mm: add PageWaiters indicating tasks are waiting for a page bit")
>
> Remove it.
Double check the code. Indeed bit_wait_io_timeout() was no longer used since v4.10
and can be removed.
Reviewed-by: Tim Chen <tim.c.chen@linux.intel.com>
>
> Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
> ---
> include/linux/wait_bit.h | 1 -
> kernel/sched/wait_bit.c | 14 --------------
> 2 files changed, 15 deletions(-)
>
> diff --git a/include/linux/wait_bit.h b/include/linux/wait_bit.h
> index 7725b7579b78..d9c23377dc75 100644
> --- a/include/linux/wait_bit.h
> +++ b/include/linux/wait_bit.h
> @@ -49,7 +49,6 @@ int wake_bit_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync
> extern int bit_wait(struct wait_bit_key *key, int mode);
> extern int bit_wait_io(struct wait_bit_key *key, int mode);
> extern int bit_wait_timeout(struct wait_bit_key *key, int mode);
> -extern int bit_wait_io_timeout(struct wait_bit_key *key, int mode);
>
> /**
> * wait_on_bit - wait for a bit to be cleared
> diff --git a/kernel/sched/wait_bit.c b/kernel/sched/wait_bit.c
> index 134d7112ef71..c6aab3db70bf 100644
> --- a/kernel/sched/wait_bit.c
> +++ b/kernel/sched/wait_bit.c
> @@ -228,20 +228,6 @@ __sched int bit_wait_timeout(struct wait_bit_key *word, int mode)
> }
> EXPORT_SYMBOL_GPL(bit_wait_timeout);
>
> -__sched int bit_wait_io_timeout(struct wait_bit_key *word, int mode)
> -{
> - unsigned long now = READ_ONCE(jiffies);
> -
> - if (time_after_eq(now, word->timeout))
> - return -EAGAIN;
> - io_schedule_timeout(word->timeout - now);
> - if (signal_pending_state(mode, current))
> - return -EINTR;
> -
> - return 0;
> -}
> -EXPORT_SYMBOL_GPL(bit_wait_io_timeout);
> -
> void __init wait_bit_init(void)
> {
> int i;
^ permalink raw reply [flat|nested] 3+ messages in thread* [tip: sched/core] sched/wait: Remove unused bit_wait_io_timeout
2024-10-01 23:40 [PATCH] sched/wait: Remove unused bit_wait_io_timeout linux
2024-10-03 21:13 ` Tim Chen
@ 2024-10-08 7:56 ` tip-bot2 for Dr. David Alan Gilbert
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Dr. David Alan Gilbert @ 2024-10-08 7:56 UTC (permalink / raw)
To: linux-tip-commits
Cc: Dr. David Alan Gilbert, Peter Zijlstra (Intel), Tim Chen, x86,
linux-kernel
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 0ac8f14ef22a1592b44dc90272aab35e43b0106a
Gitweb: https://git.kernel.org/tip/0ac8f14ef22a1592b44dc90272aab35e43b0106a
Author: Dr. David Alan Gilbert <linux@treblig.org>
AuthorDate: Wed, 02 Oct 2024 00:40:16 +01:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 07 Oct 2024 09:28:41 +02:00
sched/wait: Remove unused bit_wait_io_timeout
bit_wait_io_timeout has been unused since 2016's
commit 62906027091f ("mm: add PageWaiters indicating tasks are waiting for a page bit")
Remove it.
Signed-off-by: "Dr. David Alan Gilbert" <linux@treblig.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Tim Chen <tim.c.chen@linux.intel.com>
Link: https://lore.kernel.org/r/20241001234016.231696-1-linux@treblig.org
---
include/linux/wait_bit.h | 1 -
kernel/sched/wait_bit.c | 14 --------------
2 files changed, 15 deletions(-)
diff --git a/include/linux/wait_bit.h b/include/linux/wait_bit.h
index 6346e26..9e29d79 100644
--- a/include/linux/wait_bit.h
+++ b/include/linux/wait_bit.h
@@ -49,7 +49,6 @@ int wake_bit_function(struct wait_queue_entry *wq_entry, unsigned mode, int sync
extern int bit_wait(struct wait_bit_key *key, int mode);
extern int bit_wait_io(struct wait_bit_key *key, int mode);
extern int bit_wait_timeout(struct wait_bit_key *key, int mode);
-extern int bit_wait_io_timeout(struct wait_bit_key *key, int mode);
/**
* wait_on_bit - wait for a bit to be cleared
diff --git a/kernel/sched/wait_bit.c b/kernel/sched/wait_bit.c
index 22ec270..b410b61 100644
--- a/kernel/sched/wait_bit.c
+++ b/kernel/sched/wait_bit.c
@@ -266,20 +266,6 @@ __sched int bit_wait_timeout(struct wait_bit_key *word, int mode)
}
EXPORT_SYMBOL_GPL(bit_wait_timeout);
-__sched int bit_wait_io_timeout(struct wait_bit_key *word, int mode)
-{
- unsigned long now = READ_ONCE(jiffies);
-
- if (time_after_eq(now, word->timeout))
- return -EAGAIN;
- io_schedule_timeout(word->timeout - now);
- if (signal_pending_state(mode, current))
- return -EINTR;
-
- return 0;
-}
-EXPORT_SYMBOL_GPL(bit_wait_io_timeout);
-
void __init wait_bit_init(void)
{
int i;
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-08 7:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-01 23:40 [PATCH] sched/wait: Remove unused bit_wait_io_timeout linux
2024-10-03 21:13 ` Tim Chen
2024-10-08 7:56 ` [tip: sched/core] " tip-bot2 for Dr. David Alan Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox