[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <172838551018.1442.3527533027258106388.tip-bot2@tip-bot2>
Date: Tue, 08 Oct 2024 11:05:10 -0000
From: "tip-bot2 for Oleg Nesterov" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Oleg Nesterov <oleg@...hat.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Andrii Nakryiko <andrii@...nel.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject:
[tip: perf/core] uprobes: fold xol_take_insn_slot() into xol_get_insn_slot()
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 6c74ca7aa81a23c613b8ca52bfe0a4b3734dd287
Gitweb: https://git.kernel.org/tip/6c74ca7aa81a23c613b8ca52bfe0a4b3734dd287
Author: Oleg Nesterov <oleg@...hat.com>
AuthorDate: Tue, 01 Oct 2024 16:25:03 +02:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Mon, 07 Oct 2024 09:28:45 +02:00
uprobes: fold xol_take_insn_slot() into xol_get_insn_slot()
After the previous change xol_take_insn_slot() becomes trivial, kill it.
Signed-off-by: Oleg Nesterov <oleg@...hat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Acked-by: Andrii Nakryiko <andrii@...nel.org>
Link: https://lore.kernel.org/r/20241001142503.GA13633@redhat.com
---
kernel/events/uprobes.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index a1c801e..2a00594 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -1641,28 +1641,19 @@ static unsigned long xol_get_slot_nr(struct xol_area *area)
}
/*
- * - search for a free slot.
- */
-static unsigned long xol_take_insn_slot(struct xol_area *area)
-{
- unsigned long slot_nr;
-
- wait_event(area->wq, (slot_nr = xol_get_slot_nr(area)) < UINSNS_PER_PAGE);
-
- return area->vaddr + slot_nr * UPROBE_XOL_SLOT_BYTES;
-}
-
-/*
* xol_get_insn_slot - allocate a slot for xol.
*/
static bool xol_get_insn_slot(struct uprobe *uprobe, struct uprobe_task *utask)
{
struct xol_area *area = get_xol_area();
+ unsigned long slot_nr;
if (!area)
return false;
- utask->xol_vaddr = xol_take_insn_slot(area);
+ wait_event(area->wq, (slot_nr = xol_get_slot_nr(area)) < UINSNS_PER_PAGE);
+
+ utask->xol_vaddr = area->vaddr + slot_nr * UPROBE_XOL_SLOT_BYTES;
arch_uprobe_copy_ixol(area->page, utask->xol_vaddr,
&uprobe->arch.ixol, sizeof(uprobe->arch.ixol));
return true;
Powered by blists - more mailing lists