Skip to content

Commit

Permalink
fixes by glitsj16 and rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
graysky2 committed Mar 25, 2023
1 parent a27ac12 commit a8be553
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 21 deletions.
@@ -1,8 +1,8 @@
From b4b2b4e1126ed54d9df07cffd8d157ca78e43f8d Mon Sep 17 00:00:00 2001
From 967e44ed787eebcf4b162838894ebebf0739c0f8 Mon Sep 17 00:00:00 2001
From: graysky <therealgraysky@proton.me>
Date: Fri, 16 Dec 2022 08:11:55 -0500
Date: Sat, 25 Mar 2023 02:04:41 -0400
Subject: [PATCH 1/8] hrtimer: Create highres timeout variants of
schedule_timeout functions.
schedule_timeout functions

---
include/linux/freezer.h | 25 +++++++++++++++
Expand Down
@@ -1,8 +1,8 @@
From c88461ebe128381153df9d8122b9624c968d305a Mon Sep 17 00:00:00 2001
From 77796145af25597fed48711bd0a5fdbf9f1b6fe9 Mon Sep 17 00:00:00 2001
From: graysky <therealgraysky@proton.me>
Date: Wed, 5 Oct 2022 05:42:29 -0400
Date: Sat, 25 Mar 2023 02:05:00 -0400
Subject: [PATCH 2/8] time: Special case calls of schedule_timeout(1) to use
the min hrtimeout of 1ms, working around low Hz resolutions.
the min hrtimeout of 1ms, working around low Hz resolutions

---
kernel/time/timer.c | 16 ++++++++++++++--
Expand Down
@@ -1,8 +1,8 @@
From dcd83b1bfc7aa94901c989333566c2d9489a6097 Mon Sep 17 00:00:00 2001
From ffeea8b5475925bca95f801e78f11de1caed4e80 Mon Sep 17 00:00:00 2001
From: graysky <therealgraysky@proton.me>
Date: Wed, 5 Oct 2022 05:42:56 -0400
Date: Sat, 25 Mar 2023 02:05:11 -0400
Subject: [PATCH 3/8] time: Special case calls of schedule_timeout(1) to use
the min hrtimeout of 1ms, working around low Hz resolutions.
the min hrtimeout of 1ms, working around low Hz resolutions

---
kernel/time/timer.c | 24 ++++++++++++++++++++++--
Expand Down
@@ -1,6 +1,6 @@
From 91507ab760c73b18aef00c2783de0c4e41212c46 Mon Sep 17 00:00:00 2001
From 765da93e359ce0a01b3306c212a310a72c368b02 Mon Sep 17 00:00:00 2001
From: graysky <therealgraysky@proton.me>
Date: Wed, 5 Oct 2022 05:43:13 -0400
Date: Sat, 25 Mar 2023 02:05:35 -0400
Subject: [PATCH 4/8] hrtimer: Replace all schedule timeout(1) with
schedule_min_hrtimeout()

Expand All @@ -15,6 +15,7 @@ Subject: [PATCH 4/8] hrtimer: Replace all schedule timeout(1) with
drivers/accessibility/speakup/synth.c | 14 ++++----------
drivers/block/swim.c | 5 +++--
drivers/char/ipmi/ipmi_msghandler.c | 2 +-
drivers/char/ipmi/ipmi_ssif.c | 2 +-
drivers/comedi/drivers/ni_mio_common.c | 2 +-
drivers/gpu/drm/vmwgfx/vmwgfx_irq.c | 2 +-
drivers/media/pci/ivtv/ivtv-ioctl.c | 2 +-
Expand All @@ -31,7 +32,7 @@ Subject: [PATCH 4/8] hrtimer: Replace all schedule timeout(1) with
drivers/video/fbdev/pxafb.c | 2 +-
fs/btrfs/delalloc-space.c | 2 +-
sound/usb/line6/pcm.c | 2 +-
26 files changed, 35 insertions(+), 40 deletions(-)
27 files changed, 36 insertions(+), 41 deletions(-)

diff --git a/drivers/accessibility/speakup/speakup_acntpc.c b/drivers/accessibility/speakup/speakup_acntpc.c
index a27e6bbf05da..703d32ed9172 100644
Expand Down Expand Up @@ -227,6 +228,19 @@ index 186f1fee7534..5584e987066a 100644
}

/* No need for locks, the interface is down. */
diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index f49d2c2ef3cf..b395b893dd87 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -1272,7 +1272,7 @@ static void shutdown_ssif(void *send_info)

/* make sure the driver is not looking for flags any more. */
while (ssif_info->ssif_state != SSIF_IDLE)
- schedule_timeout(1);
+ schedule_min_hrtimeout();

ssif_info->stopping = true;
del_timer_sync(&ssif_info->watch_timer);
diff --git a/drivers/comedi/drivers/ni_mio_common.c b/drivers/comedi/drivers/ni_mio_common.c
index d39998565808..7c7d6844b074 100644
--- a/drivers/comedi/drivers/ni_mio_common.c
Expand Down
@@ -1,6 +1,6 @@
From 9aff6e8de6b2540565826ab3444355d9f5656c32 Mon Sep 17 00:00:00 2001
From 8f911962e785dbb69c737c2c0c965c15f28cafbf Mon Sep 17 00:00:00 2001
From: graysky <therealgraysky@proton.me>
Date: Wed, 5 Oct 2022 05:43:38 -0400
Date: Sat, 25 Mar 2023 02:05:42 -0400
Subject: [PATCH 5/8] hrtimer: Replace all calls to
schedule_timeout_interruptible of potentially under 50ms to use
schedule_msec_hrtimeout_interruptible
Expand Down
@@ -1,6 +1,6 @@
From 7d7d965177753240fded5d00110eae99b4ddbd85 Mon Sep 17 00:00:00 2001
From fce702b54a14cf8f89748bf04abb2e9d3f7a2c79 Mon Sep 17 00:00:00 2001
From: graysky <therealgraysky@proton.me>
Date: Wed, 5 Oct 2022 05:44:15 -0400
Date: Sat, 25 Mar 2023 02:05:52 -0400
Subject: [PATCH 6/8] hrtimer: Replace all calls to
schedule_timeout_uninterruptible of potentially under 50ms to use
schedule_msec_hrtimeout_uninterruptible
Expand Down
@@ -1,8 +1,8 @@
From f81252502b6d1fc7e8488d828645e376ff2db54a Mon Sep 17 00:00:00 2001
From c768e376b96722206bdcce8ba3e4ab2aef2d107e Mon Sep 17 00:00:00 2001
From: graysky <therealgraysky@proton.me>
Date: Wed, 5 Oct 2022 05:44:39 -0400
Date: Sat, 25 Mar 2023 02:06:05 -0400
Subject: [PATCH 7/8] time: Don't use hrtimer overlay when pm_freezing since
some drivers still don't correctly use freezable timeouts.
some drivers still don't correctly use freezable timeouts

---
kernel/time/hrtimer.c | 2 +-
Expand Down
@@ -1,6 +1,6 @@
From b166793ed195be5b493db7f4640cd64cfe1006e5 Mon Sep 17 00:00:00 2001
From 48bc023cbc448b4bf30d99b541a986bdf2e49d12 Mon Sep 17 00:00:00 2001
From: graysky <therealgraysky@proton.me>
Date: Fri, 24 Mar 2023 03:37:02 -0400
Date: Sat, 25 Mar 2023 02:06:15 -0400
Subject: [PATCH 8/8] clockevents, hrtimer: Make hrtimer granularity and
minimum hrtimeout configurable in sysctl. Set default granularity to 100us
and min timeout to 500us
Expand Down

0 comments on commit a8be553

Please sign in to comment.