[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-08-03 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 Andriy Gapon changed: What|Removed |Added Assignee|b...@freebsd.org|a...@freebsd.org Status

[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-08-03 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 --- Comment #15 from commit-h...@freebsd.org --- A commit references this bug: Author: avg Date: Fri Aug 3 14:27:29 UTC 2018 New revision: 337255 URL: https://svnweb.freebsd.org/changeset/base/337255 Log: safer wait-free iteration of sh

[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-06-19 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 --- Comment #14 from Andriy Gapon --- I have created https://reviews.freebsd.org/D15905 It's a hybrid between the approach I mentioned in comment #2 and what John mentioned (comment #1 and others) and what the current code has. -- You are

[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-06-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 --- Comment #13 from Conrad Meyer --- Oh, that's much better. -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-bugs@freebsd.org mailing list https://lists.fr

[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-06-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 --- Comment #12 from John Baldwin --- No, it is kind of per-IRQ, not global. -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-bugs@freebsd.org mailing list h

[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-06-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 --- Comment #11 from Conrad Meyer --- Sure. It'd still be a single global spin lock, right? -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-bugs@freebsd.or

[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-06-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 --- Comment #10 from John Baldwin --- To be clear, we are not talking about adding a spin mutex. We are talking about replacing the existing sched_lock mutex used to schedule the ithread anyway with a dedicated spin mutex that protects the

[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-06-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 --- Comment #9 from Conrad Meyer --- (In reply to Andriy Gapon from comment #8) Yes, performance of add/remove doesn't matter. But performance of intr_event_handle() matters very much, and adding a contested spin lock to it seems like a ba

[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-06-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 --- Comment #8 from Andriy Gapon --- (In reply to Conrad Meyer from comment #7) I don't know epoch(9) / ck_epoch implementation details, but given the constraints[*] of interrupt handling, I think that it could be an overkill. I mean, it p

[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-06-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 --- Comment #7 from Conrad Meyer --- Where does epoch(9) take a regular mtx? I may just be missing it, but I see only spin mutexes. -- You are receiving this mail because: You are the assignee for the bug. ___

[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-06-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 --- Comment #6 from Andriy Gapon --- But a similar approach might work. -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-bugs@freebsd.org mailing list https:

[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-06-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 --- Comment #5 from John Baldwin --- I suspect you cannot use epoch(9) in primary interrupt context (e.g. filters) just as you can't use regular mutexes there. -- You are receiving this mail because: You are the assignee for the bug.

[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-06-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 --- Comment #4 from Conrad Meyer --- Is this list a good candidate for epoch(9)-based reclamation? :-) -- You are receiving this mail because: You are the assignee for the bug. ___ freebsd-bugs@

[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-06-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 Conrad Meyer changed: What|Removed |Added CC||c...@freebsd.org --- Comment #3 fro

[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-06-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 --- Comment #2 from Andriy Gapon --- Yes, it's an old one. I think that using a spinlock is perfectly fine. I also have a work-in-progress that tries to solve the problem with some atomic magic so that intr_event_handle is completely wait /

[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-06-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 --- Comment #1 from John Baldwin --- This is an old race. I have a very old p4 branch that dedicates a spin lock to protecting the list of handlers (and then uses that as the thread_lock of idle interrupt threads so that the number of spin

[Bug 229106] intr_event_handle is unsafe with respect to interrupt handler list

2018-06-18 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229106 Bug ID: 229106 Summary: intr_event_handle is unsafe with respect to interrupt handler list Product: Base System Version: CURRENT Hardware: Any OS: Any