On funct remove_entity_load_avg issue.

Bug #1591487 reported by asu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

On function remove_entity_load_avg from file http://lxr.free-electrons.com/source/kernel/sched/fair.c#L2647

http://lxr.free-electrons.com/source/kernel/sched/fair.c#L3000
my processor spent 100 cycles to move nonexistent data on %rbx.
On this funct exist embbeded function with issue .

Bellow isresult
$perf record -e cycles -ag and thern perf report.

remove_entity_load_avg /proc/kcore
       │ ▒
       │ ▒
       │ ▒
       │ Disassembly of section load0: ▒
       │ ▒
       │ ffffffff810bbcb0 <load0>: ▒
       │ nop ▒
       │ push %rbp ◆
       │ mov %rsp,%rbp ▒
       │ push %r15 ▒
       │ push %r14 ▒
       │ push %r13 ▒
       │ push %r12 ▒
       │ push %rbx ▒
       │ mov %rdi,%rbx ▒
       │ and $0xfffffffffffffff0,%rsp ▒
       │ sub $0x10,%rsp ▒
       │ mov 0x150(%rdi),%r13 ▒
       │ mov 0x60(%r13),%rdx ▒
       │ mov %rdx,%rax ▒
       │ sub 0x160(%rdi),%rax ▒
       │ ↓ js 1f4 ▒
       │ shr $0xa,%rax ▒
       │ test %rax,%rax ▒
       │ ↓ je 120 ▒
       │ mov %rdx,0x160(%rdi) ▒
       │ mov 0x174(%rdi),%edx ▒
       │ mov %rdx,%rcx ▒
       │ add %rax,%rdx ▒
       │ cmp $0x3ff,%rdx ▒
       │ ↓ jbe 14d ▒
       │ mov $0x400,%edx ▒
       │ movl $0x0,0x174(%rdi) ▒
       │ sub %ecx,%edx ▒
       │ sub %rdx,%rax ▒
       │ mov %rax,%rdi ▒
       │ and $0x3ff,%eax ▒
       │ shr $0xa,%rdi ▒
Press 'h' for help on key bindings

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-4.4.0-22-generic 4.4.0-22.40
ProcVersionSignature: Ubuntu 4.4.0-22.40-generic 4.4.8
Uname: Linux 4.4.0-22-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/pcmC0D0p: asu 3213 F...m pulseaudio
 /dev/snd/controlC0: asu 3213 F.... pulseaudio
CurrentDesktop: MATE
Date: Sat Jun 11 13:12:03 2016
InstallationDate: Installed on 2016-04-29 (42 days ago)
InstallationMedia: Ubuntu-Studio 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
IwConfig:
 lo no wireless extensions.

 enp1s0 no wireless extensions.
MachineType: Olidata S.p.A. ALABAMA
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.4.0-22-generic root=/dev/mapper/192--168--0--108--vg-root ro
RelatedPackageVersions:
 linux-restricted-modules-4.4.0-22-generic N/A
 linux-backports-modules-4.4.0-22-generic N/A
 linux-firmware 1.157
RfKill:

SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 07/08/2008
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: S0101
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: To be filled by O.E.M.
dmi.board.vendor: To be filled by O.E.M.
dmi.board.version: To be filled by O.E.M.
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrS0101:bd07/08/2008:svnOlidataS.p.A.:pnALABAMA:pvrToBeFilledByO.E.M.:rvnTobefilledbyO.E.M.:rnTobefilledbyO.E.M.:rvrTobefilledbyO.E.M.:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.name: ALABAMA
dmi.product.version: To Be Filled By O.E.M.
dmi.sys.vendor: Olidata S.p.A.

Revision history for this message
asu (corcodel-marian) wrote :
Revision history for this message
asu (corcodel-marian) wrote :

................................
       │ │ mov %eax,0x170(%rbx) ▒
       │ │↑ jbe db ▒
       │ │ shr %edx ▒
       │ │ mov $0xafb50401,%ecx ▒
       │ │ shr %r8 ▒
       │ │ mov %edx,%eax ▒
       │ │ mul %ecx ▒
       │ │ movabs $0xafb504000afb5041,%rcx ▒
       │ │ mov %r8,%rax ▒
       │ │ shr $0xe,%edx ▒
       │ │ mov %edx,%r15d ▒
       │ │ mul %rcx ▒
       │ │ shr $0xe,%rdx ▒
       │ │ cmp $0x158,%rdi ▒
       │ │ mov %rdx,%r14 ▒
       │ │↑ ja 109 ▒
       │ │ mov %rdx,0x8(%rsp) ▒
       │ │ callq 0xffffffff810b2c10 ▒
       │ │ mov 0x8(%rsp),%rdx ▒
       │ │↑ jmpq 109 ▒
       │1f4:│ mov %rdx,0x160(%rdi) ▒
       │ │ mov 0x178(%rdi),%r14 ▒
       │ │↑ jmpq 127 ▒
100,00 │207:│ movq $0x0,0x168(%rbx) ▒
       │ │ movl $0x0,0x170(%rbx) ▒
       │ │ xor %r14d,%r14d ▒
       │ │ xor %edx,%edx

Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
asu (corcodel-marian) wrote :

This is part from verry "hot" function entry_SYSCALL_64_fastpath.

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.7-rc1 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7-rc3-yakkety/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.