User Details
- User Since
- Feb 26 2021, 3:47 PM (298 w, 5 d)
Today
Mon, Nov 16
After reading the spec a bit, I'm convinced that this change is most probably fine in all cases, as the ECDT is always supposed to contain in field EC_ID a "fully qualified reference to the namespace object", so every spec-compliant will continue to work as before, your case (missing the \, absolute path marker) will be fixed, and normally other cases with a garbage EC_ID should continue not working without ill effect.
I already did a review in Forgejo, but apparently it is currently inaccessible. So you spotted the main bug I wanted to report, that's great. Also, in order to mimick what we do in native calls and what is done in linux_sched_getattr(), I'd move the linux_tdfind() above, just after the copyin(). And I think there was some other minor thing I raised in Forgejo but I don't remember...
Alternative: Set mac.m_string to NULL in the intlabel == NULL case.
Please also consider re-implementing acpi_name() on top of acpi_get_name().
That change looks correct (all proper places having been updated), but I would please ask you to test an alternative without new flag at all, so without the need for cpuset_flags_update(), where the following code in sched_pickcpu():
if (td->td_cpuset->cs_flags & CPU_SET_ONECPU) {
SCHED_STAT_INC(pickcpu_onecpu);
return (CPU_FFS(mask) - 1);
}is replaced by something like (to be amended as per style(9)):
int first_cpu_ffs = CPU_FFS(mask);
MPASS(first_cpu_ffs > 0);
if (cpu_ffs == CPU_SETSIZE || CPU_FFS_AT(mask, first_cpu_ffs) == 0) {
SCHED_STAT_INC(pickcpu_onecpu);
return (first_cpu_ffs - 1);
}where you will have to (trivially) define CPU_FFS_AT() in terms of __BIT_FFS_AT() (as CPU_FFS() is on top of __BIT_FFS().
Sat, Nov 14
Fri, Nov 13
- Update again the commit message and the comment in sched_switch_migrate() for better clarity.
- Optimize tdq_lock_pair() by first trying an optimistic lock of two if one is already held before dropping one and doing a full cycle.
A short note on the commit message: (snip)
- Start the commit message with a short summary.
- Drop the erroneous MTX_DUPOK removal.
Ping? I'd like to move this one and the next (D61169) forward, as they look quite reasonable, but I'm not very familiar with the build system and if that goes against some specific plans or practice, so I'd prefer an external look.
@avg : Could you please test that in your environment and confirm the deadlock is gone?
Thu, Nov 12
- Change strategy to fix the problem (see updated commit message, in particular the paragraph starting with "The fix is similar...").
- Update the commit message with what is hopefully a more precise and intelligible description (yes, it is very long).
- Remove side changes (will go into separate trivial commits).
Wed, Nov 11
Oh, sorry to have missed that too. :-)
Looks generally good.
See inline comment and D61412.
Tue, Nov 10
Approved by: olce (mentor)
Looks good overall. See inline comments for reformulations/suggestions. Also, I would suggest moving kern.sched.*.quantum and kern.sched.*.slice into scheduler.4.
Mon, Nov 9
That's great work. Frankly, I wouldn't have gone to the burden of documenting this facility into that level of details. For example, a (non-pressing) goal is to remove RQ_PPQ. I left it after reworking the runqueues just in case we would need to revert to the old behavior. It has not been the case, so RQ_PPQ has been an unimportant implementation detail, and it should go. We also might want to evolve the interface. But anyway, now that this is written, let's integrate it!
Are you really sure about the change for Alder Lake? Looking at Linux sources, I see #define TGL_PMC_SLP_S0_RES_COUNTER_STEP 0x7A. I also see #define TGL_PMC_LPM_RES_COUNTER_STEP_X2 61 /* 30.5us * 2 */, so 30500 looks like a confusion. If that is indeed the case, then reverting to milliseconds instead of microseconds is probably better.
Fri, Nov 6
Ping? If you do not have time to work on it in the very short term, I'd like to take it over as I need to make progress and implement newer generations here.
Wed, Nov 4
Funny is that, for debugging, I'm doing the reverse at the moment (i.e., prevent devices from actually suspending, and running just cpu_idle()).
Tue, Nov 3
Tue, Oct 20
Put back the temporary entry into a critical section around the thread_lock() call. It is in fact not an optimization but necessary for correct operation.