hi, Al Viro, On Tue, Jan 28, 2025 at 07:10:42PM +0000, Al Viro wrote: > On Tue, Jan 28, 2025 at 05:37:39PM +0800, Oliver Sang wrote: > > > > Just to make sure it's not a geniune change of logics somewhere, > > > could you compare d000e073ca2a, 893598979838 and d000e073ca2a with the > > > delta below? That delta provably is an equivalent transformation - all > > > exits from do_pollfd() go through the return in the end, so that just > > > shifts the last assignment in there into the caller. > > > > the 'd000e073ca2a with the delta below' has just very similar score as > > d000e073ca2a as below. > > Not a change of logics, then... AFAICS, the only differences in code generation > here are different spills and conditional fput() not taken out of line. > > I'm somewhat surprised by the amount of slowdowns, TBH... Is there any > chance to get per-insn profiles for those? How much time is spent in > each insn of do_poll()/do_pollfd()? sorry for late. we cannot support per-insn profiles for now. at the same time, we revisit this results on some newer platforms, found there is no signicicant regression by same tests. on an Intel(R) Xeon(R) 6972P (Granite Rapids) with 128G memory ========================================================================================= compiler/cpufreq_governor/debug-setup/kconfig/mode/nr_task/rootfs/tbox_group/test/testcase: gcc-12/performance/no-monitor/x86_64-rhel-9.4/process/100%/debian-12-x86_64-20240206.cgz/lkp-gnr-2ap2/poll2/will-it-scale d000e073ca2a08ab 89359897983825dbfc08578e7ee ---------------- --------------------------- %stddev %change %stddev \ | \ 775439 +0.6% 780350 will-it-scale.per_process_ops on an INTEL(R) XEON(R) PLATINUM 8592+ (Emerald Rapids) with 256G memory ========================================================================================= compiler/cpufreq_governor/debug-setup/kconfig/mode/nr_task/rootfs/tbox_group/test/testcase: gcc-12/performance/no-monitor/x86_64-rhel-9.4/process/100%/debian-12-x86_64-20240206.cgz/lkp-emr-2sp1/poll2/will-it-scale d000e073ca2a08ab 89359897983825dbfc08578e7ee ---------------- --------------------------- %stddev %change %stddev \ | \ 583865 -0.8% 579319 will-it-scale.per_process_ops on an Intel(R) Xeon(R) Platinum 8480CTDX (Sapphire Rapids) with 512G memory ========================================================================================= compiler/cpufreq_governor/debug-setup/kconfig/mode/nr_task/rootfs/tbox_group/test/testcase: gcc-12/performance/no-monitor/x86_64-rhel-9.4/process/100%/debian-12-x86_64-20240206.cgz/lkp-spr-2sp4/poll2/will-it-scale d000e073ca2a08ab 89359897983825dbfc08578e7ee ---------------- --------------------------- %stddev %change %stddev \ | \ 595389 -1.6% 586063 will-it-scale.per_process_ops our original report is upon a Skylake which maybe kind of old. if you still want more check or you have more patch want us to check, please let us know. thanks