Page MenuHomeFreeBSD

olce (Olivier Certner)
User

Projects

User Details

User Since
Feb 26 2021, 3:47 PM (257 w, 3 d)

Recent Activity

Today

olce added inline comments to D55001: hwpstate_amd(4): Assert PSTATE_CPPC is on in corresponding sysctl handlers.
Mon, Feb 2, 4:51 PM
olce accepted D48735: acpi: Call SPMC suspend/resume hooks.
Mon, Feb 2, 3:54 PM
olce added inline comments to D54999: hwpstate_amd(4): Factor out printing CPPC registers, fix CPPC_REQUEST's.
Mon, Feb 2, 3:38 PM
olce accepted D55014: EVENTHANDLER.9: EVENTHANDLER_REGISTER never fails.

Would appreciate a:
Suggested by: olce
tag line at commit. Thanks!

Mon, Feb 2, 1:09 PM

Yesterday

olce retitled D54996: x86: x86_msr_op(): Add comments, guarantee atomicity from x86: x86_msr_op(): Add comments, cosmetic changes to x86: x86_msr_op(): Add comments, guarantee atomicity.
Sun, Feb 1, 10:16 PM
olce added inline comments to D54996: x86: x86_msr_op(): Add comments, guarantee atomicity.
Sun, Feb 1, 10:13 PM
olce added inline comments to D54996: x86: x86_msr_op(): Add comments, guarantee atomicity.
Sun, Feb 1, 3:17 PM
olce updated the diff for D54996: x86: x86_msr_op(): Add comments, guarantee atomicity.
  • Disable interrupts on MSR_OP_LOCAL and non-atomic MSR manipulation.
  • Trim and update comments.
Sun, Feb 1, 3:17 PM

Sat, Jan 31

olce added inline comments to D48735: acpi: Call SPMC suspend/resume hooks.
Sat, Jan 31, 3:37 PM
olce requested review of D55010: hwpstate_amd(4): Add knobs to get/set all fields of CPPC_REQUEST.
Sat, Jan 31, 11:50 AM
olce requested review of D55009: hwpstate_amd(4): 'epp' sysctl leaf to operate on real EPP hardware values.
Sat, Jan 31, 11:49 AM
olce requested review of D55008: hwpstate_amd(4): Factor out setting the CPPC_REQUEST register.
Sat, Jan 31, 11:49 AM
olce requested review of D55007: hwpstate_amd(4): Sane defaults for min/max perf on insane capabilities.
Sat, Jan 31, 11:48 AM
olce requested review of D55006: hwpstate_amd(4): attach(): More diagnostic on CPPC enable.
Sat, Jan 31, 11:48 AM
olce requested review of D55005: hwpstate_amd(4): Register dump: Fine-grained error reporting.
Sat, Jan 31, 11:48 AM
olce requested review of D55004: hwpstate_amd(4): Revamp the softc.
Sat, Jan 31, 11:47 AM
olce requested review of D55003: hwpstate_amd(4): attach(): Fix style.
Sat, Jan 31, 11:47 AM
olce requested review of D55002: hwpstate_amd(4): Rename EPP handler, convert to unsigned int.
Sat, Jan 31, 11:47 AM
olce requested review of D55001: hwpstate_amd(4): Assert PSTATE_CPPC is on in corresponding sysctl handlers.
Sat, Jan 31, 11:47 AM
olce requested review of D55000: hwpstate_amd(4): Rename register dump sysctl handler.
Sat, Jan 31, 11:46 AM
olce requested review of D54999: hwpstate_amd(4): Factor out printing CPPC registers, fix CPPC_REQUEST's.
Sat, Jan 31, 11:46 AM
olce requested review of D54998: hwpstate_amd(4): Rename CPPC register macros.
Sat, Jan 31, 11:46 AM
olce requested review of D54997: hwpstate_amd(4): Fix BITS_WITH_VALUE()/SET_BITS_VALUE() to obey the mask.
Sat, Jan 31, 11:45 AM
olce retitled D54996: x86: x86_msr_op(): Add comments, guarantee atomicity from x86: x86_msr_op(): Move setting mode up, delineate logical blocks to x86: x86_msr_op(): Add comments, cosmetic changes.
Sat, Jan 31, 11:32 AM
olce requested review of D54996: x86: x86_msr_op(): Add comments, guarantee atomicity.
Sat, Jan 31, 11:30 AM

Fri, Jan 30

olce accepted D54833: kern: mac: add a prison_cleanup entry point.

rer: removing the prlabel, @csjp noted (paraphrasing, maybe poorly) that that's a MAC-philosophical thing that policy (writers?) shouldn't have to have 'that' much knowledge of kernel internals. It turns out that they often do anyways, but the historically consistent thing is that object labels get passed along with the labels to avoid the policy reaching into the object when it's something that they'll want to act on.

Fri, Jan 30, 5:29 PM
olce added a comment to D54833: kern: mac: add a prison_cleanup entry point.

prison_created is done after we know that the jail's going to stick around because I wanted the prison state to be 'final' (post-OSD) before we do any label propagation stuff... maybe that wasn't quite the right call.

Fri, Jan 30, 9:13 AM

Thu, Jan 29

olce accepted D54951: tuning.7: document schedulers knobs.
Thu, Jan 29, 10:40 PM
olce added inline comments to D54951: tuning.7: document schedulers knobs.
Thu, Jan 29, 10:29 PM

Wed, Jan 28

olce added a comment to D54833: kern: mac: add a prison_cleanup entry point.

The /* Symmetry with prison_created */ comment is indeed welcome to clear the slight but apparently necessary confusion coming from the hook prison_cleanup being called in mac_prison_destroy() while prison_created is not called from mac_prison_init(). :-)

Wed, Jan 28, 5:47 PM
olce added inline comments to D54926: acpi: Move sysctl tree set up at end of initialization.
Wed, Jan 28, 4:32 PM
olce added a comment to D54925: sysctl(9): Booleans: Accept integers to ease knob conversion.

Alternative: Leave sysctl_handle_bool() as is, and created another one, as well as accompanying macros SYSCTL_ADD_xxx() and co., to define booleans compatible with ints. In addition, these could unconditionally output/input an integer, easing back and forth internal transition between int and bool as this would preserve the ABI.

Wed, Jan 28, 2:06 PM
olce updated the diff for D54925: sysctl(9): Booleans: Accept integers to ease knob conversion.

Remove useless initialization of temp_int in the SYSCTL_IN() case.

Wed, Jan 28, 1:49 PM
olce updated the diff for D54626: acpi: 'hw.acpi.s4bios' sysctl: Change type to bool, expand description.

Update commit message

Wed, Jan 28, 1:11 PM
olce updated the diff for D54627: acpi: New R/O 'hw.acpi.s4bios_supported' sysctl, gate S4BIOS with it.

Update commit message

Wed, Jan 28, 1:10 PM
olce updated the diff for D54627: acpi: New R/O 'hw.acpi.s4bios_supported' sysctl, gate S4BIOS with it.

Prevent users to set hw.acpi.s4bios to true if S4BIOS is not supported.

Wed, Jan 28, 1:07 PM
olce updated the diff for D54626: acpi: 'hw.acpi.s4bios' sysctl: Change type to bool, expand description.
  • Impacts of new prerequisite (D54926)
  • Slightly tweak the description of 'hw.acpi.s4bios'
Wed, Jan 28, 12:47 PM
olce requested review of D54926: acpi: Move sysctl tree set up at end of initialization.
Wed, Jan 28, 12:44 PM
olce requested review of D54925: sysctl(9): Booleans: Accept integers to ease knob conversion.
Wed, Jan 28, 12:44 PM
olce committed rG0cca6277499f: acpi: Use AcpiGbl_FACS even on ACPI_REDUCED_HARDWARE (authored by olce).
acpi: Use AcpiGbl_FACS even on ACPI_REDUCED_HARDWARE
Wed, Jan 28, 11:32 AM
olce committed rG526c09a48929: acpi: Use only AcpiGetSleepTypeData() to determine Sx support (authored by olce).
acpi: Use only AcpiGetSleepTypeData() to determine Sx support
Wed, Jan 28, 11:32 AM
olce committed rG149e6c67ca80: acpi_spmc(4): Fix compilation on 32-bit platforms (authored by olce).
acpi_spmc(4): Fix compilation on 32-bit platforms
Wed, Jan 28, 11:32 AM
olce committed rGa9f7074e858f: ahc(4): Fix a warning on i386 compilation (authored by olce).
ahc(4): Fix a warning on i386 compilation
Wed, Jan 28, 11:32 AM
olce closed D54625: acpi: Use AcpiGbl_FACS even on ACPI_REDUCED_HARDWARE.
Wed, Jan 28, 11:32 AM
olce closed D54624: acpi: Use only AcpiGetSleepTypeData() to determine Sx support.
Wed, Jan 28, 11:31 AM

Mon, Jan 26

olce added a comment to D48387: acpi_spmc: Add SPMC (system power management controller) driver.

(Style: I still see a few spurious whitespaces at end of lines; that could be fixed while in tree.)

Mon, Jan 26, 1:40 PM
olce accepted D48387: acpi_spmc: Add SPMC (system power management controller) driver.

Looks good!

Mon, Jan 26, 1:25 PM

Fri, Jan 23

olce added inline comments to D48387: acpi_spmc: Add SPMC (system power management controller) driver.
Fri, Jan 23, 9:49 PM
olce added a comment to D54831: Make ULE and 4BSD coexists.

I think this warrants a "Relnotes: yes" tag.

Fri, Jan 23, 8:37 PM
olce accepted D54831: Make ULE and 4BSD coexists.

Looks good.

Fri, Jan 23, 8:32 PM
olce added a comment to D54831: Make ULE and 4BSD coexists.
In D54831#1253606, @kib wrote:

Mmm... That kind of problem would be automatically avoided if not exporting settings for both 4BSD and ULE, which also changes the sysctl hierarchy.

I want users that tweak schedulers, to put any schedulers' tweaks into their /etc/sysctl.conf, without causing errors if some of the scheduler is not enabled or not configured.
Such users must be intelligent enough to understand that settings for non-active schedulers are not active.
Also I want to be very clear which setting belong to which scheduler.
So I prefer the new scheme.

Fri, Jan 23, 6:08 PM
olce requested changes to D48387: acpi_spmc: Add SPMC (system power management controller) driver.

Almost there! One bug (BUS_PROBE_DEFAULT) and one strongly suggested change (potential bug) around sc->dsm_sets |= DSM_SET_MS;, the rest is mostly cosmetic.

Fri, Jan 23, 5:44 PM
olce added a comment to D54831: Make ULE and 4BSD coexists.
In D54831#1253559, @kib wrote:

Make kern.sched sysctls working when 4BSD is selected:

Fri, Jan 23, 4:46 PM
olce added a comment to D54831: Make ULE and 4BSD coexists.
In D54831#1253557, @kib wrote:

I do not see what the code fragment in cpu_switch.S has to do with sleepqueue. It can only observe either runq lock, or blocked lock, if ever.

Fri, Jan 23, 3:39 PM
olce added inline comments to D54831: Make ULE and 4BSD coexists.
Fri, Jan 23, 10:53 AM
olce added a reviewer for D54831: Make ULE and 4BSD coexists: olce.
Fri, Jan 23, 10:48 AM
olce added a comment to D54831: Make ULE and 4BSD coexists.
In D54831#1253408, @kib wrote:

I'd like also that we investigate why the loop on the blocked lock was elided for 4BSD.

Simply because threads are never blocked because there is only one global scheduler lock on 4BSD instead of per-runq lock on ULE. So on ULE you are not guaranteed that the sched_switch() finished with removing the thread from CPU while cpu_switch() already tries to switch to the new context. The blocked state makes this race closed without the need to somehow lock several runqs. On 4BSD it is impossible (global lock).

Fri, Jan 23, 10:48 AM

Thu, Jan 22

olce added a comment to D54831: Make ULE and 4BSD coexists.

Minsoo beat me to it.

Thu, Jan 22, 9:06 PM
olce added a comment to D54803: hwpstate: Add CPPC enable tunable.

BTW, I suggest that we land this patch first, and continue the discussion at https://bugs.freebsd.org/292615

Thu, Jan 22, 11:10 AM

Wed, Jan 21

olce added a comment to D54803: hwpstate: Add CPPC enable tunable.

@cracauer: Default setting for EPP is 50. This was done to mimic what we already do in CPPC support for Intel processors. Can you try setting all dev.hwpstate_amdX.epp to 0 and see if you're recovering your initial behavior (and then possibly play with more values between 0 and 50)?

I tried 0, 10, 25, 37 and 50. The CPU speed stayed at the 11x slower speed in benchmarks.

Wed, Jan 21, 10:36 AM
olce added a comment to D54803: hwpstate: Add CPPC enable tunable.

@khng mentions that there is if (resource_disabled(HWP_AMD_CLASSNAME, 0)) return; in hwpstate_identify() so maybe setting hint.hwpstate_amd.disabled="1" in hint file also works?

Wed, Jan 21, 10:35 AM
olce added a comment to D54803: hwpstate: Add CPPC enable tunable.

I don't do anything to load cpufreq manually, it comes up with the GENERIC kernel.

Wed, Jan 21, 10:32 AM
olce accepted D54803: hwpstate: Add CPPC enable tunable.

I'm fine with the patch as it is. It is going to be useful in cases the hardware doesn't do self-tuning properly.

Wed, Jan 21, 9:37 AM

Mon, Jan 19

olce added a comment to D54410: acpi: Implement s2idle loop.

This approach looks weird, and I'm still unclear on what is really needed. More generally, I'd like to know why we have to do that, and I question its safety.

Mon, Jan 19, 9:45 PM
olce added a comment to D54407: sched: Flag to force scheduler to always choose idle thread.

I have a couple of comments, but really we should first determine what to do with D54410, please see there.

Mon, Jan 19, 9:21 PM
olce added a comment to D48387: acpi_spmc: Add SPMC (system power management controller) driver.

Fix issues pointed out by olce@ and apply some suggestions. Main changes:

  • Change DSM order again to match Windows & Linux.
  • Hold DSM set info in new struct dsm_set, so we can hold revision ID and DSM name.
  • Print out DSM name & revision.
  • Tunable to change Intel DSM set revision ID to use for debugging.
Mon, Jan 19, 5:38 PM
olce added a comment to D54409: x86: New (un)idle IPIs for setting idle flag in scheduler.

Can totally use smp_rendezvous_cpus() for this instead of adding 2 new IPIs. I thought I had run into a problem using rendezvous when I first implemented this, but I just tried it again and see no problem doing it this way.

Mon, Jan 19, 4:20 PM
olce accepted D54777: acpi: Fix not calling AcpiLeaveSleepState() in S3 path.

Ah, sorry... I'm pretty sure I had seen that problem during the review of D48734 at some point but forgot about it...

Mon, Jan 19, 4:04 PM

Fri, Jan 16

olce accepted D54748: mac(4): also list jails in the example enumeration of objects.

Oh, you're right, jails are more of an object than a subject.

Fri, Jan 16, 8:42 PM
olce added inline comments to D54737: RELNOTES: document the MAC/jail integration.
Fri, Jan 16, 9:10 AM

Wed, Jan 14

olce added a reviewer for D54674: sys: add hmp: olce.
Wed, Jan 14, 8:08 PM
olce added a comment to D48387: acpi_spmc: Add SPMC (system power management controller) driver.

We should also avoid the ugly pollution of struct acpi_softc (I completely understand this was done to get something working more quickly). Rather, let's define a new interface, called something like acpi_lpi (defined in a new acpi_lpi_if.m file), with two methods, acpi_lpi_enter() and acpi_lpi_exit(), which would be called before/after entering suspend-to-idle in acpi_EnterSleepState() (e.g., on all direct children of acpi; we'll see that in D48735). There are examples of interfaces under sys/dev/acpica, acpi_if.m and acpi_bus_if.m. The .m files are processed by sys/tools/makeobjops.awk. There's a bit more doc on kobj(9) (which device(9) relies on) in the Architecture Handbook.

Wed, Jan 14, 12:49 AM
olce accepted D48734: acpi: Suspend-to-idle support (s2idle).

Looks good (if you could move the comment about the sleep button, that would be great, see inline comment).

Wed, Jan 14, 12:49 AM
olce requested changes to D48387: acpi_spmc: Add SPMC (system power management controller) driver.

I'm pretty new to device management in FreeBSD, but it looks to me that allocating some memory + acpi_set_private() in DEVICE_PROBE() (here, acpi_spmc_probe()) and acpi_get_private() + deallocation in DEVICE_ATTACH() is a bad pattern, as it will cause memory leaks and in fact even panics in most cases if there are multiple candidate drivers. Since there is for now only a single driver, could you please instead fill up the acpi_spmc_softc directly and have acpi_spmc_probe() return 0 on success (which guarantees preservation of the softc up to DEVICE_ATTACH())? Let's also avoid possible bad pattern spreading by copy-pasting (incidentally, I see the same pattern in acpi_ec.c).

Wed, Jan 14, 12:49 AM

Mon, Jan 12

olce requested changes to D48734: acpi: Suspend-to-idle support (s2idle).

Looks good, except for one thing (see the inline comment in do_sleep()).

Mon, Jan 12, 1:46 PM
olce committed rG9c25620e57f0: sys: vt_efifb: EFI not supported on i386; move it back to amd64/NOTES (authored by olce).
sys: vt_efifb: EFI not supported on i386; move it back to amd64/NOTES
Mon, Jan 12, 12:18 PM
olce committed rG8342d9f7b5f1: asmc(4): Stop building it on i386, as it supports only 64-bit chipsets (authored by olce).
asmc(4): Stop building it on i386, as it supports only 64-bit chipsets
Mon, Jan 12, 12:18 PM

Sat, Jan 10

olce accepted D54505: hwpstate_amd: Use ipi instead of sched_bind + thread_lock.
Sat, Jan 10, 8:38 AM

Fri, Jan 9

olce added a comment to D54626: acpi: 'hw.acpi.s4bios' sysctl: Change type to bool, expand description.

I'm not too sure about changing the type of a sysctl knob that has existed for a long time. The only compatibility problem that I can see doing this is potentially breaking reporting in an application that would call sysctl(3) (or sysctlbyname(3)) directly, passing an unitialized integer and then reading from it, as only the first byte would have been filled. Setting the boolean would still work (except on big-endian arches). The use of an old sysctl(8) utility is not affected.

Fri, Jan 9, 5:52 PM
olce updated subscribers of D54627: acpi: New R/O 'hw.acpi.s4bios_supported' sysctl, gate S4BIOS with it.
Fri, Jan 9, 5:13 PM
olce updated subscribers of D54626: acpi: 'hw.acpi.s4bios' sysctl: Change type to bool, expand description.
Fri, Jan 9, 5:13 PM
olce updated subscribers of D54625: acpi: Use AcpiGbl_FACS even on ACPI_REDUCED_HARDWARE.
Fri, Jan 9, 5:13 PM
olce updated subscribers of D54624: acpi: Use only AcpiGetSleepTypeData() to determine Sx support.
Fri, Jan 9, 5:13 PM
olce requested review of D54626: acpi: 'hw.acpi.s4bios' sysctl: Change type to bool, expand description.
Fri, Jan 9, 5:10 PM
olce requested review of D54627: acpi: New R/O 'hw.acpi.s4bios_supported' sysctl, gate S4BIOS with it.
Fri, Jan 9, 5:10 PM
olce requested review of D54625: acpi: Use AcpiGbl_FACS even on ACPI_REDUCED_HARDWARE.
Fri, Jan 9, 5:08 PM
olce requested review of D54624: acpi: Use only AcpiGetSleepTypeData() to determine Sx support.
Fri, Jan 9, 5:07 PM
olce updated the diff for D52885: style.9: Encourage style changes when doing significant modifications.

"modified" => "going to be modified"

Fri, Jan 9, 4:55 PM
olce committed rG67599eef01f5: sys/x86/NOTES: Add vt_efifb (authored by olce).
sys/x86/NOTES: Add vt_efifb
Fri, Jan 9, 4:35 PM
olce committed rGfde9fe18219f: i386: Fix kernel compilation after introduction of ASMC_DEBUG option (authored by olce).
i386: Fix kernel compilation after introduction of ASMC_DEBUG option
Fri, Jan 9, 4:35 PM
olce committed rG730b3e20069b: ps(1): Sort headers (authored by olce).
ps(1): Sort headers
Fri, Jan 9, 4:35 PM
olce added inline comments to D52885: style.9: Encourage style changes when doing significant modifications.
Fri, Jan 9, 3:57 PM
olce updated the diff for D52885: style.9: Encourage style changes when doing significant modifications.

Cater to comments.

Fri, Jan 9, 3:57 PM
olce added a comment to D54553: cache: avoid hardcoded cache padding.

I'm also skeptical (and think both SMALL_SIZE and LARGE_SIZE are over aligned on e.g., armv7), but I'm wary of making functional changes here.

Fri, Jan 9, 10:42 AM
olce accepted D54376: cache: avoid hardcoded zone alignment.
Fri, Jan 9, 9:19 AM

Thu, Jan 8

olce accepted D54553: cache: avoid hardcoded cache padding.
Thu, Jan 8, 3:12 PM
olce accepted D54376: cache: avoid hardcoded zone alignment.
Thu, Jan 8, 3:12 PM
olce added a comment to D54553: cache: avoid hardcoded cache padding.

I fail to see any usefulness of CACHE_LARGE_PAD when it was introduced, which corresponds to aligning CACHE_ZONE_LARGE_SIZE to struct namecache_ts. So I'd just drop the corresponding roundup2(), with the benefit of not requiring a struct namecache_ts alignment for CACHE_ZONE_LARGE_SIZE (but then you have to change the corresponding static assertion).

Thu, Jan 8, 3:05 PM
olce added inline comments to D54554: cache: avoid hardcoded CACHE_PATH_CUTOFF.
Thu, Jan 8, 2:47 PM
olce added inline comments to D54376: cache: avoid hardcoded zone alignment.
Thu, Jan 8, 2:15 PM