Frogging-Family / linux-tkg

linux-tkg custom kernels
GNU General Public License v2.0
1.33k stars 168 forks source link

Possible _sched_yield_type issue in prjc kernels (pds,bmq) involving Firefox freezes #856

Open kenielf opened 10 months ago

kenielf commented 10 months ago

System Information

Kernel Information

Configuration

_distro="Arch"
_version="6.5.12"
_EXT_CONFIG_PATH=~/.config/frogminer/linux-tkg.cfg
_NUKR="true"
_git_mirror="kernel.org"
_kernel_work_folder=""
_kernel_source_folder=""
CUSTOM_GCC_PATH=""
CUSTOM_LLVM_PATH=""
_force_all_threads="true"
_noccache="false"
_kernel_on_diet="false"
_modprobeddb="true"
_modprobeddb_db_path=~/.config/modprobed.db
_menunconfig="false"
_diffconfig="false"
_diffconfig_name=""
_dracut_options="--lz4"
_configfile=""
_config_updating="olddefconfig"
_debugdisable="true"
_STRIP="true"
_cpusched="bmq"
_compiler="gcc"
_llvm_ias=""
_lto_mode=""
_preempt_rt=""
_preempt_rt_force=""
_sched_yield_type="0"
_rr_interval="4"
_ftracedisable="true"
_numadisable="true"
_misc_adds="true"
_tickless="2"
_acs_override="false"
_bcachefs="false"
_winesync="false"
_waydroid="true"
_glitched_base="true"
_zenify="true"
_compileroptlevel="2"
_processor_opt="skylakex"
_cacule_rdb="false"
_cacule_rdb_interval="19"
_tt_high_hz="false"
_smt_nice="true"
_random_trust_cpu="true"
_timer_freq="100"
_default_cpu_gov="performance"
_aggressive_ondemand="true"
_tcp_cong_alg=""
_custom_commandline="intel_pstate=passive split_lock_detect=off psi=0"
_clear_patches="true"
_openrgb="true"
_custom_pkgbase="linux-tkg-${_cpusched}"
_kernel_localversion=""
_NR_CPUS_value="32"
_fsync_backport="true"
_fsync_legacy="true"
_fsync_futex2="false"
_zfsfix="true"
_runqueue_sharing=""
_irq_threading="false"
_mglru="true"
_community_patches=""
_user_patches="true"
_user_patches_no_confirm="false"
_config_fragments="true"
_config_fragments_no_confirm="false"

Boot Parameters

intel_pstate=passive split_lock_detect=off psi=0 zswap.enabled=0 acpi=force apm=on apm=power-off nowatchdog nmi_watchdog=0 module_blacklist=iTCO_wdt fbcon=nodefer quiet log-priority=3 rd.udev.log-priority=3 vt.global_cursor_default=0 splash nomce mitigations=off initrd=\initramfs-linux-tkg-bmq.img

Note: I removed some of the kernel arguments related to the boot disk, if they are necessary I can re-add them.

The Issue

I found this hard to replicate consistently in time intervals, however, from time to time, firefox will freeze and become unresponsive on pds and bmq kernels, this does not seem to happen on cfs, mainline or arch's zen kernel. Interestingly, most of the freezing happens when playing media content, so this could potentially be unrelated - but I'm not entirely sure as I'm very new to kernel building.

During compilation, most of the warnings are due to unused variables or unchanged destination, alongside some modprobe drivers that won't be found regarding virtualbox. (I don't believe this is related, but it might be important to note)

When I recompile the kernel and change the _sched_yield_type to 1 (default, for both pds and bmq), instead of freezing, it spikes for a second at 100% and comes back in around a second at most. However, I do take a somewhat noticeable performance hit on other tasks.

I have read issue #695 and tried the psi=0 flag, but it did not make any noticeable difference, no yield still freezes the processes.

If there is anything else I can add to help, I'd be glad to add it here.

kenielf commented 10 months ago

Quick update, although the issue isn't fixed, I believe part of the problem was related to the cpu -march being set incorrectly, after validating using gcc -march=native -Q --help=target | grep march, the native optimization seems to be skylake, not skylakex as is set on the configuration, changing that made it so freezes seems to be less frequent, but one happened just as I was typing this comment, forcing me to use killall --verbose firefox to stop the process.