* Re: Oops on shutdown : 3.11.0-5-powerpc-e500mc Ubuntu
From: Thadeu Lima de Souza Cascardo @ 2014-02-04 15:59 UTC (permalink / raw)
To: John Donnelly; +Cc: linuxppc-dev
In-Reply-To: <CAGtOQbSJeJ85Nj-M2XB+w3p5+PTVWrpsFKZqCbEqZYkwsa0GGg@mail.gmail.com>
On Tue, Feb 04, 2014 at 08:47:14AM -0600, John Donnelly wrote:
> Hi,
> Where is a appropriate place to file a bug for this : This is the second
> occurrence I have seen.
>
If this is a Ubuntu kernel, probably report it at Canonical's Launchpad.
If it is provided by Freescale, report it to Freescale.
If you can run a mainline kernel (best now would be 3.14-rc1) and
reproduce that, then best place would be linux-nfs@vger.kernel.org.
Hope that helps.
Cascardo.
>
>
> saucy)root@(none):/work/svy/tools# * Stopping MD monitoring service mdadm
> --monitor
> [ OK ]
> * Asking all remaining processes to terminate... [
> OK ]
> * All processes ended within 1 seconds... [
> OK ]
> [65426.692405] Oops: Exception in kernel mode, sig: 11 [#1]
> [65426.697721] SMP NR_CPUS=8 P4080 DS
> [65426.701122] Modules linked in: btrfs(F) raid6_pq(F) zlib_deflate(F)
> xor(F) ufs(F) qnx4(F) hfsplus(F) hfs(F) minix(F) ntfs(F) msdos(F) jfs(F)
> xfs(F) libcrc32c(F) reiserfs(F) nls_iso8859_1(F) nls_cp437(F) vfat(F)
> fat(F) dm_multipath(F) scsi_dh(F) usb_storage(F) ext2(F) rpcsec_gss_krb5(F)
> nfsv4(F) nfsd(F) auth_rpcgss(F) nfs_acl(F) nfs(F) lockd(F) sunrpc(F)
> fscache(F) ofpart(F) redboot(F) cmdlinepart(F) cfi_cmdset_0002(F)
> cfi_probe(F) cfi_util(F) gen_probe(F) physmap_of(F) map_funcs(F) chipreg(F)
> mtd(F) lm90(F) at24(F) caam(F) i2c_mpc(F) mpc85xx_edac(F) edac_core(F)
> uio_pdrv_genirq(F) uio(F) ata_generic(F) ahci(F) libahci(F) pata_jmicron(F)
> fsl_pq_mdio(F)
> [65426.759065] CPU: 6 PID: 19006 Comm: umount.nfs Tainted: GF
> 3.11.0-5-powerpc-e500mc #8-Ubuntu
> [65426.768461] task: ea0f3900 ti: ea05c000 task.ti: ea05c000
> [65426.773858] NIP: f99a0f50 LR: f998250c CTR: c07f85c0
> [65426.778820] REGS: ea05dda0 TRAP: 0700 Tainted: GF
> (3.11.0-5-powerpc-e500mc)
> [65426.786998] MSR: 00029002 <CE,EE,ME> CR: 24000422 XER: 20000000
> [65426.793107]
> GPR00: f9982d20 ea05de50 ea0f3900 e7e66ee0 00029002 00000001 00000000
> 00000000
> GPR08: eadc2504 00000000 00000000 00000001 c07f85c0 1002e3ac 10010000
> 00008000
> GPR16: 100112e4 1000f3c4 1000f3e0 1000f594 1000f59c 1000f440 c0b4fb6c
> 10010000
> GPR24: 10010000 00000000 c0089180 ea05de84 f99ab064 ea2bf500 c0b41380
> ea54ef00
> [65426.822949] NIP [f99a0f50] rpc_remove_client_dir+0x0/0x30 [sunrpc]
> [65426.829143] LR [f998250c] __rpc_clnt_remove_pipedir+0x5c/0x80 [sunrpc]
> [65426.835668] Call Trace:
> [65426.838128] [ea05de50] [f999f9f0] rpc_get_sb_net+0x70/0xa0 [sunrpc]
> (unreliable)
> [65426.845542] [ea05de60] [f9982d20] rpc_free_client+0x50/0xa0 [sunrpc]
> [65426.851910] [ea05de70] [f9982c58] rpc_shutdown_client+0x68/0xe0 [sunrpc]
> [65426.858647] [ea05dec0] [f9a3fd04] nfs_free_server+0x124/0x190 [nfs]
> [65426.864920] [ea05dee0] [c01c5f34] deactivate_locked_super+0x74/0xa0
> [65426.871193] [ea05def0] [c01e9184] SyS_umount+0x94/0x3d0
> [65426.876422] [ea05df40] [c0010604] ret_from_syscall+0x0/0x3c
> [65426.882002] --- Exception: c01 at 0xfec55dc
> [65426.882002] LR = 0xff88d54
> [65426.889225] Instruction dump:
> [65426.892191] 00001b50 0000aa32 00000706 00000120 0000aa36 00000706
> 00001af8 0000aa3a
> [65426.899964] 00000706 00001aa0 0000aa46 00000704 <00000058> 0000aa4a
> 00000704 00001b74
> [65426.907949] udlfb: /dev/fb0 FB_BLANK mode 1 --> 0
> [65426.912666] udlfb: set_par mode 1024x768
> [65426.927196] ---[ end trace b25b3039b99e0391 ]---
> [65426.931816]
> umount.nfs: /work: not mounted
> [65426.960296] init: idmapd main process (2394) killed by TERM signal
> [65426.983998] init: systemd-logind main process (544) killed by TERM signal
> [65426.994070] Oops: Exception in kernel mode, sig: 11 [#2]
> [65426.999386] SMP NR_CPUS=8 P4080 DS
> [65427.002787] Modules linked in: btrfs(F) raid6_pq(F) zlib_deflate(F)
> xor(F) ufs(F) qnx4(F) hfsplus(F) hfs(F) minix(F) ntfs(F) msdos(F) jfs(F)
> xfs(F) libcrc32c(F) reiserfs(F) nls_iso8859_1(F) nls_cp437(F) vfat(F)
> fat(F) dm_multipath(F) scsi_dh(F) usb_storage(F) ext2(F) rpcsec_gss_krb5(F)
> nfsv4(F) nfsd(F) auth_rpcgss(F) nfs_acl(F) nfs(F) lockd(F) sunrpc(F)
> fscache(F) ofpart(F) redboot(F) cmdlinepart(F) cfi_cmdset_0002(F)
> cfi_probe(F) cfi_util(F) gen_probe(F) physmap_of(F) map_funcs(F) chipreg(F)
> mtd(F) lm90(F) at24(F) caam(F) i2c_mpc(F) mpc85xx_edac(F) edac_core(F)
> uio_pdrv_genirq(F) uio(F) ata_generic(F) ahci(F) libahci(F) pata_jmicron(F)
> fsl_pq_mdio(F)
> [65427.060734] CPU: 7 PID: 19014 Comm: umount Tainted: GF D
> 3.11.0-5-powerpc-e500mc #8-Ubuntu
> [65427.069783] task: e5d55580 ti: ea2f0000 task.ti: ea2f0000
> [65427.075180] NIP: f99a0270 LR: c01c5f34 CTR: f99a0270
> [65427.080142] REGS: ea2f1e30 TRAP: 0700 Tainted: GF D
> (3.11.0-5-powerpc-e500mc)
> [65427.088320] MSR: 00029002 <CE,EE,ME> CR: 24004424 XER: 00000000
> [65427.094430]
> GPR00: c01c5f24 ea2f1ee0 e5d55580 ea1e7800 c1d404e0 ea027a80 c01e7b78
> 00000001
> GPR08: ffffffff f99a0270 ffffffff 0000000d 003fe0f9 100192e0 10010000
> 00008000
> GPR16: 100112e4 1000f3c4 1000f3e0 1000f594 1000f59c ea027aa0 c0b4fb6c
> ea2f1ef8
> GPR24: 00000000 ea027a80 00000000 ea027a80 ea027aa0 ea027abc f99aba78
> ea1e7800
> [65427.124275] NIP [f99a0270] rpc_kill_sb+0x0/0x110 [sunrpc]
> [65427.129677] LR [c01c5f34] deactivate_locked_super+0x74/0xa0
> [65427.135246] Call Trace:
> [65427.137689] [ea2f1ee0] [c01c5f24] deactivate_locked_super+0x64/0xa0
> (unreliable)
> [65427.145094] [ea2f1ef0] [c01e9184] SyS_umount+0x94/0x3d0
> [65427.150322] [ea2f1f40] [c0010604] ret_from_syscall+0x0/0x3c
> [65427.155902] --- Exception: c01 at 0xfec45cc
> [65427.155902] LR = 0x10003130
> [65427.163212] Instruction dump:
> [65427.166178] 0000867e 00000706 00001288 00008682 00000706 00000058
> 00008686 00000704
> [65427.173952] 00001288 0000868a 00000704 00000058 <00008690> 0006320a
> 00000000 00008694
> [65427.181901] ---[ end trace b25b3039b99e0392 ]---
> [65427.186514]
> rpcbind: rpcbind terminating on signal. Restart with "rpcbind -w"
> [65427.235270] init: rpcbind main process (2082) terminated with status 2
> [65427.294746] init: Disconnected from system bus
> * Deactivating swap... [
> OK ]
> * Unmounting local filesystems... [
> OK ]
> mount: / is busy
> * Will now restart
>
> --
>
> *Regards,*
> * John.*
>
> *--*
>
> *o* Energy-efficiency is #1 reason data centers look to expand. -- Digital
> Realty Trust
> *o* Green Data Centers spending to increase 300% worldwide by 2016. --
> Pike Research
> *o *Data Centers have become as vital to the functioni
> ng of society as power stations. -- The Economist
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
^ permalink raw reply
* Re: Oops on shutdown : 3.11.0-5-powerpc-e500mc Ubuntu
From: John Donnelly @ 2014-02-04 16:43 UTC (permalink / raw)
To: Thadeu Lima de Souza Cascardo; +Cc: linuxppc-dev
In-Reply-To: <20140204155921.GA31582@oc0268524204.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 7559 bytes --]
Thanks.
It appears to be a Ubuntu component :
(saucy)root@(none)# dpkg -S /boot/vmlinux-3.11.0-5-powerpc-e500mc
linux-image-3.11.0-5-powerpc-e500mc: /boot/vmlinux-3.11.0-5-powerpc-e500mc
On Tue, Feb 4, 2014 at 9:59 AM, Thadeu Lima de Souza Cascardo <
cascardo@linux.vnet.ibm.com> wrote:
> On Tue, Feb 04, 2014 at 08:47:14AM -0600, John Donnelly wrote:
> > Hi,
> > Where is a appropriate place to file a bug for this : This is the second
> > occurrence I have seen.
> >
>
> If this is a Ubuntu kernel, probably report it at Canonical's Launchpad.
> If it is provided by Freescale, report it to Freescale.
> If you can run a mainline kernel (best now would be 3.14-rc1) and
> reproduce that, then best place would be linux-nfs@vger.kernel.org.
>
> Hope that helps.
> Cascardo.
>
> >
> >
> > saucy)root@(none):/work/svy/tools# * Stopping MD monitoring service
> mdadm
> > --monitor
> > [ OK ]
> > * Asking all remaining processes to terminate...
> [
> > OK ]
> > * All processes ended within 1 seconds...
> [
> > OK ]
> > [65426.692405] Oops: Exception in kernel mode, sig: 11 [#1]
> > [65426.697721] SMP NR_CPUS=8 P4080 DS
> > [65426.701122] Modules linked in: btrfs(F) raid6_pq(F) zlib_deflate(F)
> > xor(F) ufs(F) qnx4(F) hfsplus(F) hfs(F) minix(F) ntfs(F) msdos(F) jfs(F)
> > xfs(F) libcrc32c(F) reiserfs(F) nls_iso8859_1(F) nls_cp437(F) vfat(F)
> > fat(F) dm_multipath(F) scsi_dh(F) usb_storage(F) ext2(F)
> rpcsec_gss_krb5(F)
> > nfsv4(F) nfsd(F) auth_rpcgss(F) nfs_acl(F) nfs(F) lockd(F) sunrpc(F)
> > fscache(F) ofpart(F) redboot(F) cmdlinepart(F) cfi_cmdset_0002(F)
> > cfi_probe(F) cfi_util(F) gen_probe(F) physmap_of(F) map_funcs(F)
> chipreg(F)
> > mtd(F) lm90(F) at24(F) caam(F) i2c_mpc(F) mpc85xx_edac(F) edac_core(F)
> > uio_pdrv_genirq(F) uio(F) ata_generic(F) ahci(F) libahci(F)
> pata_jmicron(F)
> > fsl_pq_mdio(F)
> > [65426.759065] CPU: 6 PID: 19006 Comm: umount.nfs Tainted: GF
> > 3.11.0-5-powerpc-e500mc #8-Ubuntu
> > [65426.768461] task: ea0f3900 ti: ea05c000 task.ti: ea05c000
> > [65426.773858] NIP: f99a0f50 LR: f998250c CTR: c07f85c0
> > [65426.778820] REGS: ea05dda0 TRAP: 0700 Tainted: GF
> > (3.11.0-5-powerpc-e500mc)
> > [65426.786998] MSR: 00029002 <CE,EE,ME> CR: 24000422 XER: 20000000
> > [65426.793107]
> > GPR00: f9982d20 ea05de50 ea0f3900 e7e66ee0 00029002 00000001 00000000
> > 00000000
> > GPR08: eadc2504 00000000 00000000 00000001 c07f85c0 1002e3ac 10010000
> > 00008000
> > GPR16: 100112e4 1000f3c4 1000f3e0 1000f594 1000f59c 1000f440 c0b4fb6c
> > 10010000
> > GPR24: 10010000 00000000 c0089180 ea05de84 f99ab064 ea2bf500 c0b41380
> > ea54ef00
> > [65426.822949] NIP [f99a0f50] rpc_remove_client_dir+0x0/0x30 [sunrpc]
> > [65426.829143] LR [f998250c] __rpc_clnt_remove_pipedir+0x5c/0x80 [sunrpc]
> > [65426.835668] Call Trace:
> > [65426.838128] [ea05de50] [f999f9f0] rpc_get_sb_net+0x70/0xa0 [sunrpc]
> > (unreliable)
> > [65426.845542] [ea05de60] [f9982d20] rpc_free_client+0x50/0xa0 [sunrpc]
> > [65426.851910] [ea05de70] [f9982c58] rpc_shutdown_client+0x68/0xe0
> [sunrpc]
> > [65426.858647] [ea05dec0] [f9a3fd04] nfs_free_server+0x124/0x190 [nfs]
> > [65426.864920] [ea05dee0] [c01c5f34] deactivate_locked_super+0x74/0xa0
> > [65426.871193] [ea05def0] [c01e9184] SyS_umount+0x94/0x3d0
> > [65426.876422] [ea05df40] [c0010604] ret_from_syscall+0x0/0x3c
> > [65426.882002] --- Exception: c01 at 0xfec55dc
> > [65426.882002] LR = 0xff88d54
> > [65426.889225] Instruction dump:
> > [65426.892191] 00001b50 0000aa32 00000706 00000120 0000aa36 00000706
> > 00001af8 0000aa3a
> > [65426.899964] 00000706 00001aa0 0000aa46 00000704 <00000058> 0000aa4a
> > 00000704 00001b74
> > [65426.907949] udlfb: /dev/fb0 FB_BLANK mode 1 --> 0
> > [65426.912666] udlfb: set_par mode 1024x768
> > [65426.927196] ---[ end trace b25b3039b99e0391 ]---
> > [65426.931816]
> > umount.nfs: /work: not mounted
> > [65426.960296] init: idmapd main process (2394) killed by TERM signal
> > [65426.983998] init: systemd-logind main process (544) killed by TERM
> signal
> > [65426.994070] Oops: Exception in kernel mode, sig: 11 [#2]
> > [65426.999386] SMP NR_CPUS=8 P4080 DS
> > [65427.002787] Modules linked in: btrfs(F) raid6_pq(F) zlib_deflate(F)
> > xor(F) ufs(F) qnx4(F) hfsplus(F) hfs(F) minix(F) ntfs(F) msdos(F) jfs(F)
> > xfs(F) libcrc32c(F) reiserfs(F) nls_iso8859_1(F) nls_cp437(F) vfat(F)
> > fat(F) dm_multipath(F) scsi_dh(F) usb_storage(F) ext2(F)
> rpcsec_gss_krb5(F)
> > nfsv4(F) nfsd(F) auth_rpcgss(F) nfs_acl(F) nfs(F) lockd(F) sunrpc(F)
> > fscache(F) ofpart(F) redboot(F) cmdlinepart(F) cfi_cmdset_0002(F)
> > cfi_probe(F) cfi_util(F) gen_probe(F) physmap_of(F) map_funcs(F)
> chipreg(F)
> > mtd(F) lm90(F) at24(F) caam(F) i2c_mpc(F) mpc85xx_edac(F) edac_core(F)
> > uio_pdrv_genirq(F) uio(F) ata_generic(F) ahci(F) libahci(F)
> pata_jmicron(F)
> > fsl_pq_mdio(F)
> > [65427.060734] CPU: 7 PID: 19014 Comm: umount Tainted: GF D
> > 3.11.0-5-powerpc-e500mc #8-Ubuntu
> > [65427.069783] task: e5d55580 ti: ea2f0000 task.ti: ea2f0000
> > [65427.075180] NIP: f99a0270 LR: c01c5f34 CTR: f99a0270
> > [65427.080142] REGS: ea2f1e30 TRAP: 0700 Tainted: GF D
> > (3.11.0-5-powerpc-e500mc)
> > [65427.088320] MSR: 00029002 <CE,EE,ME> CR: 24004424 XER: 00000000
> > [65427.094430]
> > GPR00: c01c5f24 ea2f1ee0 e5d55580 ea1e7800 c1d404e0 ea027a80 c01e7b78
> > 00000001
> > GPR08: ffffffff f99a0270 ffffffff 0000000d 003fe0f9 100192e0 10010000
> > 00008000
> > GPR16: 100112e4 1000f3c4 1000f3e0 1000f594 1000f59c ea027aa0 c0b4fb6c
> > ea2f1ef8
> > GPR24: 00000000 ea027a80 00000000 ea027a80 ea027aa0 ea027abc f99aba78
> > ea1e7800
> > [65427.124275] NIP [f99a0270] rpc_kill_sb+0x0/0x110 [sunrpc]
> > [65427.129677] LR [c01c5f34] deactivate_locked_super+0x74/0xa0
> > [65427.135246] Call Trace:
> > [65427.137689] [ea2f1ee0] [c01c5f24] deactivate_locked_super+0x64/0xa0
> > (unreliable)
> > [65427.145094] [ea2f1ef0] [c01e9184] SyS_umount+0x94/0x3d0
> > [65427.150322] [ea2f1f40] [c0010604] ret_from_syscall+0x0/0x3c
> > [65427.155902] --- Exception: c01 at 0xfec45cc
> > [65427.155902] LR = 0x10003130
> > [65427.163212] Instruction dump:
> > [65427.166178] 0000867e 00000706 00001288 00008682 00000706 00000058
> > 00008686 00000704
> > [65427.173952] 00001288 0000868a 00000704 00000058 <00008690> 0006320a
> > 00000000 00008694
> > [65427.181901] ---[ end trace b25b3039b99e0392 ]---
> > [65427.186514]
> > rpcbind: rpcbind terminating on signal. Restart with "rpcbind -w"
> > [65427.235270] init: rpcbind main process (2082) terminated with status 2
> > [65427.294746] init: Disconnected from system bus
> > * Deactivating swap...
> [
> > OK ]
> > * Unmounting local filesystems...
> [
> > OK ]
> > mount: / is busy
> > * Will now restart
> >
> > --
> >
> > *Regards,*
> > * John.*
> >
> > *--*
> >
> > *o* Energy-efficiency is #1 reason data centers look to expand. --
> Digital
> > Realty Trust
> > *o* Green Data Centers spending to increase 300% worldwide by 2016. --
> > Pike Research
> > *o *Data Centers have become as vital to the functioni
> > ng of society as power stations. -- The Economist
>
> > _______________________________________________
> > Linuxppc-dev mailing list
> > Linuxppc-dev@lists.ozlabs.org
> > https://lists.ozlabs.org/listinfo/linuxppc-dev
>
>
--
*Regards,*
* John.*
*--*
*o* Energy-efficiency is #1 reason data centers look to expand. -- Digital
Realty Trust
*o* Green Data Centers spending to increase 300% worldwide by 2016. --
Pike Research
*o *Data Centers have become as vital to the functioni
ng of society as power stations. -- The Economist
[-- Attachment #2: Type: text/html, Size: 10959 bytes --]
^ permalink raw reply
* Re: [PATCH V2 2/2] tick/cpuidle: Initialize hrtimer mode of broadcast
From: Preeti U Murthy @ 2014-02-04 17:09 UTC (permalink / raw)
To: Thomas Gleixner
Cc: daniel.lezcano, peterz, fweisbec, paul.gortmaker, paulus, mingo,
mikey, shangw, rafael.j.wysocki, agraf, paulmck, arnd, linux-pm,
rostedt, michael, john.stultz, anton, chenhui.zhao, deepthi,
r58472, geoff, linux-kernel, srivatsa.bhat, schwidefsky,
linuxppc-dev
In-Reply-To: <alpine.DEB.2.02.1402041101330.24986@ionos.tec.linutronix.de>
Hi Thomas,
On 02/04/2014 03:48 PM, Thomas Gleixner wrote:
>> +++ b/kernel/time/tick-broadcast-hrtimer.c
>> +/*
>> + * This is called from the guts of the broadcast code when the cpu
>> + * which is about to enter idle has the earliest broadcast timer event.
>> + */
>> +static int bc_set_next(ktime_t expires, struct clock_event_device *bc)
>> +{
>> + ktime_t now, interval;
>> + /*
>> + * We try to cancel the timer first. If the callback is on
>> + * flight on some other cpu then we let it handle it. If we
>> + * were able to cancel the timer nothing can rearm it as we
>> + * own broadcast_lock.
>> + *
>> + * However if we are called from the hrtimer interrupt handler
>> + * itself, reprogram it.
>> + */
>> + if (hrtimer_try_to_cancel(&bctimer) >= 0) {
>> + hrtimer_start(&bctimer, expires, HRTIMER_MODE_ABS_PINNED);
>> + /* Bind the "device" to the cpu */
>> + bc->bound_on = smp_processor_id();
>> + } else if (bc->bound_on == smp_processor_id()) {
>
> This part really wants a proper comment. It took me a while to figure
> out why this is correct and what the call chain is.
How about:
"However we can also be called from the event handler of
ce_broadcast_hrtimer when bctimer expires. We cannot therefore restart
the timer since it is on flight on the same CPU. But due to the same
reason we can reset it."
?
>
>
>> + now = ktime_get();
>> + interval = ktime_sub(expires, now);
>> + hrtimer_forward_now(&bctimer, interval);
>
> We are in the event handler called from bc_handler() and expires is
> absolute time. So what's wrong with calling
> hrtimer_set_expires(&bctimer, expires)?
You are right. There are so many interfaces doing nearly the same thing
:( I overlooked that hrtimer_forward() and its variants were being used
when the interval was pre-calculated and stored away. And
hrtimer_set_expires() would be used when we knew the absolute expiry.
And it looks safe to call it here too.
>
>> +static enum hrtimer_restart bc_handler(struct hrtimer *t)
>> +{
>> + ce_broadcast_hrtimer.event_handler(&ce_broadcast_hrtimer);
>> + return HRTIMER_RESTART;
>
> We probably want to check whether the timer needs to be restarted at
> all.
>
> if (ce_broadcast_timer.next_event.tv64 == KTIME_MAX)
> return HRTIMER_NORESTART;
>
> return HRTIMER_RESTART;
True this additional check would be useful.
Do you want me to send out the next version with the above corrections
including the patch added to this thread where we handle archs setting
the CPUIDLE_FLAG_TIMER_STOP flag?
>
> Hmm?
>
> Thanks,
>
> tglx
Thanks
Regards
Preeti U Murthy
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
^ permalink raw reply
* Re: [PATCH V2 1/2] time: Change the return type of clockevents_notify() to integer
From: Preeti U Murthy @ 2014-02-04 17:14 UTC (permalink / raw)
To: Thomas Gleixner
Cc: daniel.lezcano, peterz, fweisbec, agraf, paul.gortmaker, paulus,
mingo, mikey, shangw, rafael.j.wysocki, paulmck, arnd, linux-pm,
rostedt, michael, john.stultz, anton, chenhui.zhao, deepthi,
r58472, geoff, linux-kernel, srivatsa.bhat, schwidefsky,
linuxppc-dev
In-Reply-To: <alpine.DEB.2.02.1402041100250.24986@ionos.tec.linutronix.de>
On 02/04/2014 03:31 PM, Thomas Gleixner wrote:
> On Fri, 24 Jan 2014, Preeti U Murthy wrote:
>> -extern void tick_broadcast_oneshot_control(unsigned long reason);
>> +extern int tick_broadcast_oneshot_control(unsigned long reason);
>
>> -static inline void tick_broadcast_oneshot_control(unsigned long reason) { }
>> +static inline int tick_broadcast_oneshot_control(unsigned long reason) { }
>
>> -static inline void tick_broadcast_oneshot_control(unsigned long reason) { }
>> +static inline int tick_broadcast_oneshot_control(unsigned long reason) { }
>
> The inline stubs need to return 0.
Oh right! Apologies!
Thanks.
>
> Thanks,
>
> tglx
>
Regards
Preeti U Murthy
^ permalink raw reply
* Re: [PATCH V2 2/2] tick/cpuidle: Initialize hrtimer mode of broadcast
From: Thomas Gleixner @ 2014-02-04 20:18 UTC (permalink / raw)
To: Preeti U Murthy
Cc: daniel.lezcano, peterz, fweisbec, paul.gortmaker, paulus, mingo,
mikey, shangw, rafael.j.wysocki, agraf, paulmck, arnd, linux-pm,
rostedt, michael, john.stultz, anton, chenhui.zhao, deepthi,
r58472, geoff, linux-kernel, srivatsa.bhat, schwidefsky,
linuxppc-dev
In-Reply-To: <52F11ECE.605@linux.vnet.ibm.com>
On Tue, 4 Feb 2014, Preeti U Murthy wrote:
> Do you want me to send out the next version with the above corrections
> including the patch added to this thread where we handle archs setting
> the CPUIDLE_FLAG_TIMER_STOP flag?
Yes please.
^ permalink raw reply
* Re: [PATCH] slub: Don't throw away partial remote slabs if there is no local memory
From: Christoph Lameter @ 2014-02-04 20:39 UTC (permalink / raw)
To: Nishanth Aravamudan
Cc: Han Pingtian, mpm, penberg, linux-mm, paulus, Anton Blanchard,
David Rientjes, Joonsoo Kim, linuxppc-dev, Wanpeng Li
In-Reply-To: <20140204072630.GB10101@linux.vnet.ibm.com>
On Mon, 3 Feb 2014, Nishanth Aravamudan wrote:
> Yes, sorry for my lack of clarity. I meant Joonsoo's latest patch for
> the $SUBJECT issue.
Hmmm... I am not sure that this is a general solution. The fallback to
other nodes can not only occur because a node has no memory as his patch
assumes.
If the target node allocation fails (for whatever reason) then I would
recommend for simplicities sake to change the target node to NUMA_NO_NODE
and just take whatever is in the current cpu slab. A more complex solution
would be to look through partial lists in increasing distance to find a
partially used slab that is reasonable close to the current node. Slab has
logic like that in fallback_alloc(). Slubs get_any_partial() function does
something close to what you want.
^ permalink raw reply
* [GIT PULL] tree-wide: clean up no longer required #include <linux/init.h>
From: Paul Gortmaker @ 2014-02-04 20:51 UTC (permalink / raw)
To: torvalds
Cc: linux-arch, linux-mips, linux-m68k, rusty, linux-ia64, kvm,
linux-s390, netdev, x86, gregkh, Paul Gortmaker, linux-alpha,
sparclinux, sfr, akpm, linuxppc-dev, linux-arm-kernel
We've had this in linux-next for 2+ weeks (thanks Stephen!) as a
linux-stable like queue of patches, and as can be seen here:
https://git.kernel.org/pub/scm/linux/kernel/git/paulg/init.git
most of the changes in the last week have been trivial adding acks
or dropping patches that maintainers decided to take themselves.
With -rc1 now containing what was in linux-next, the queue applies
to that baseline w/o issue, and I've redone comprehensive multi
arch build testing on the -rc1 baseline as a final sanity check.
Original RFC discussion and patch posting is here, if needed:
https://lkml.org/lkml/2014/1/21/434
Suggested merge text follows:
----------------------------8<-----------------------------
Summary - We removed cpuinit and devinit, which left ~2000 instances
of include <linux/init.h> that were no longer needed. To fully enable
this removal/cleanup, we relocate module_init() from init.h into
module.h. Multi arch/multi config build testing on linux-next has
been used to find and fix any implicit header dependencies prior to
deploying the actual init.h --> module.h move, to preserve bisection.
Additional details:
module_init/module_exit and friends moved to module.h
-----------------------------------------------------
Aside from enabling this init.h cleanup to extend into modular files,
it actually does make sense. For all modules will use some form of
our initfunc processing/categorization, but not all initfunc users
will be necessarily using modular functionality. So we move these
module related macros to module.h and ensure module.h sources init.h
module_init in non modular code:
--------------------------------
This series uncovered that we are enabling people to use module_init
in non-modular code. While that works fine, there are at least three
reasons why it probably should not be encouraged:
1) it makes a casual reader of the code assume the code is modular
even though it is obj-y (builtin) or controlled by a bool Kconfig.
2) it makes it too easy to add dead code in a function that is handed
to module_exit() -- [more on that below]
3) it breaks our ability to use priority sorted initcalls properly
[more on that below.]
4) on some files, the use of module.h vs. init.h can cost a ~10%
increase in the number of lines output from CPP.
After this change, a new coder who tries to make use of module_init in
non modular code would find themselves also needing to include the
module.h header. At which point the odds are greater that they would
ask themselves "Am I doing this right? I shouldn't need this."
Note that existing non-modular code that already includes module.h and
uses module_init doesn't get fixed here, since they already build w/o
errors triggered by this change; we'll have to hunt them down later.
module_init and initcall ordering:
----------------------------------
We have a group of about ten priority sorted initcalls, that are
called in init/main.c after most of the hard coded/direct calls
have been processed. These serve the purpose of avoiding everyone
poking at init/main.c to hook in their init sequence. The bins are:
pure_initcall 0
core_initcall 1
postcore_initcall 2
arch_initcall 3
subsys_initcall 4
fs_initcall 5
device_initcall 6
late_initcall 7
These are meant to eventually replace users of the non specific
priority "__initcall" which currently maps onto device_initcall.
This is of interest, because in non-modular code, cpp does this:
module_init --> __initcall --> device_initcall
So all module_init() land in the device_initcall bucket, rather late
in the sequence. That makes sense, since if it was a module, the init
could be real late (days, weeks after boot). But now imagine you add
support for some non-modular bus/arch/infrastructure (say for e.g. PCI)
and you use module_init for it. That means anybody else who wants
to use your subsystem can't do so if they use an initcall of 0 --> 5
priority. For a real world example of this, see patch #1 in this series:
https://lkml.org/lkml/2014/1/14/809
We don't want to force code that is clearly arch or subsys or fs
specific to have to use the device_initcall just because something
else has been mistakenly put (or left) in that bucket. So a couple of
changes do actually change the initcall level where it is inevitably
appropriate to do so. Those are called out explicitly in their
respective commit logs.
module_exit and dead code
-------------------------
Built in code will never have an opportunity to call functions that
are registered with module_exit(), so any cases of that uncovered in
this series delete that dead code. Note that any built-in code that
was already including module.h and using module_exit won't have shown
up as breakage on the build coverage of this series, so we'll have to
find those independently later. It looks like there may be quite a
few that are invisibly created via module_platform_driver -- a macro
that creates module_init and module_exit automatically. We may want
to consider relocating module_platform_driver into module.h later...
cpuinit
-------
To finalize the removal of cpuinit, which was done several releases
ago, we remove the remaining stub functions from init.h in this
series. We've seen one or two "users" try to creep back in, so this
will close the door on that chapter and prevent creep.
----------------------------8<-----------------------------
Thanks,
Paul.
---
Cc: linux-alpha@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-ia64@vger.kernel.org
Cc: linux-m68k@lists.linux-m68k.org
Cc: linux-mips@linux-mips.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-s390@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Cc: x86@kernel.org
Cc: netdev@vger.kernel.org
Cc: kvm@vger.kernel.org
Cc: sfr@canb.auug.org.au
Cc: rusty@rustcorp.com.au
Cc: gregkh@linuxfoundation.org
Cc: akpm@linux-foundation.org
Cc: torvalds@linux-foundation.org
The following changes since commit 38dbfb59d1175ef458d006556061adeaa8751b72:
Linus 3.14-rc1 (2014-02-02 16:42:13 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux.git tags/init-cleanup
for you to fetch changes up to a830e2e2777c893e5bfdaa370d6375023e8cd2a5:
include: remove needless instances of <linux/init.h> (2014-02-03 16:39:14 -0500)
----------------------------------------------------------------
Cleanup of <linux/init.h> for 3.14-rc1
----------------------------------------------------------------
Paul Gortmaker (77):
init: delete the __cpuinit related stubs
kernel: audit/fix non-modular users of module_init in core code
mm: replace module_init usages with subsys_initcall in nommu.c
fs/notify: don't use module_init for non-modular inotify_user code
netfilter: don't use module_init/exit in core IPV4 code
x86: don't use module_init in non-modular intel_mid_vrtc.c
x86: don't use module_init for non-modular core bootflag code
x86: replace __init_or_module with __init in non-modular vsmp_64.c
x86: don't use module_init in non-modular devicetree.c code
drivers/tty/hvc: don't use module_init in non-modular hyp. console code
staging: don't use module_init in non-modular ion_dummy_driver.c
powerpc: use device_initcall for registering rtc devices
powerpc: use subsys_initcall for Freescale Local Bus
powerpc: don't use module_init for non-modular core hugetlb code
powerpc: don't use module_init in non-modular 83xx suspend code
arm: include module.h in drivers/bus/omap_l3_smx.c
arm: fix implicit module.h use in mach-at91 gpio.h
arm: fix implicit #include <linux/init.h> in entry asm.
arm: mach-s3c64xx mach-crag6410-module.c is not modular
arm: use subsys_initcall in non-modular pl320 IPC code
arm: don't use module_init in non-modular mach-vexpress/spc.c code
alpha: don't use module_init for non-modular core code
m68k: don't use module_init in non-modular mvme16x/rtc.c code
ia64: don't use module_init for non-modular core kernel/mca.c code
ia64: don't use module_init in non-modular sim/simscsi.c code
mips: make loongsoon serial driver explicitly modular
mips: don't use module_init in non-modular sead3-mtd.c code
cris: don't use module_init for non-modular core intmem.c code
parisc: don't use module_init for non-modular core pdc_cons code
parisc64: don't use module_init for non-modular core perf code
mn10300: don't use module_init in non-modular flash.c code
sh: don't use module_init in non-modular psw.c code
sh: mach-highlander/psw.c is tristate and should use module.h
xtensa: don't use module_init for non-modular core network.c code
drivers/clk: don't use module_init in clk-nomadik.c which is non-modular
cpuidle: don't use modular platform register in non-modular ARM drivers
drivers/platform: don't use modular register in non-modular pdev_bus.c
module: relocate module_init from init.h to module.h
logo: emit "#include <linux/init.h> in autogenerated C file
arm: delete non-required instances of include <linux/init.h>
mips: restore init.h usage to arch/mips/ar7/time.c
s390: delete non-required instances of include <linux/init.h>
alpha: delete non-required instances of <linux/init.h>
powerpc: delete another unrequired instance of <linux/init.h>
arm64: delete non-required instances of <linux/init.h>
watchdog: delete non-required instances of include <linux/init.h>
video: delete non-required instances of include <linux/init.h>
rtc: delete non-required instances of include <linux/init.h>
scsi: delete non-required instances of include <linux/init.h>
spi: delete non-required instances of include <linux/init.h>
acpi: delete non-required instances of include <linux/init.h>
drivers/power: delete non-required instances of include <linux/init.h>
drivers/media: delete non-required instances of include <linux/init.h>
drivers/ata: delete non-required instances of include <linux/init.h>
drivers/hwmon: delete non-required instances of include <linux/init.h>
drivers/pinctrl: delete non-required instances of include <linux/init.h>
drivers/isdn: delete non-required instances of include <linux/init.h>
drivers/leds: delete non-required instances of include <linux/init.h>
drivers/pcmcia: delete non-required instances of include <linux/init.h>
drivers/char: delete non-required instances of include <linux/init.h>
drivers/infiniband: delete non-required instances of include <linux/init.h>
drivers/mfd: delete non-required instances of include <linux/init.h>
drivers/gpio: delete non-required instances of include <linux/init.h>
drivers/bluetooth: delete non-required instances of include <linux/init.h>
drivers/mmc: delete non-required instances of include <linux/init.h>
drivers/crypto: delete non-required instances of include <linux/init.h>
drivers/platform: delete non-required instances of include <linux/init.h>
drivers/misc: delete non-required instances of include <linux/init.h>
drivers/edac: delete non-required instances of include <linux/init.h>
drivers/macintosh: delete non-required instances of include <linux/init.h>
drivers/base: delete non-required instances of include <linux/init.h>
drivers/cpufreq: delete non-required instances of <linux/init.h>
drivers/pci: delete non-required instances of <linux/init.h>
drivers/dma: delete non-required instances of <linux/init.h>
drivers/gpu: delete non-required instances of <linux/init.h>
drivers: delete remaining non-required instances of <linux/init.h>
include: remove needless instances of <linux/init.h>
arch/alpha/kernel/err_ev6.c | 1 -
arch/alpha/kernel/irq.c | 1 -
arch/alpha/kernel/srmcons.c | 3 +-
arch/alpha/kernel/traps.c | 1 -
arch/alpha/oprofile/op_model_ev4.c | 1 -
arch/alpha/oprofile/op_model_ev5.c | 1 -
arch/alpha/oprofile/op_model_ev6.c | 1 -
arch/alpha/oprofile/op_model_ev67.c | 1 -
arch/arm/common/dmabounce.c | 1 -
arch/arm/firmware/trusted_foundations.c | 1 -
arch/arm/include/asm/arch_timer.h | 1 -
arch/arm/kernel/entry-armv.S | 2 +
arch/arm/kernel/entry-header.S | 1 -
arch/arm/kernel/hyp-stub.S | 1 -
arch/arm/kernel/suspend.c | 1 -
arch/arm/kernel/unwind.c | 1 -
arch/arm/mach-at91/include/mach/gpio.h | 1 +
arch/arm/mach-cns3xxx/pm.c | 1 -
arch/arm/mach-exynos/headsmp.S | 1 -
arch/arm/mach-footbridge/personal.c | 1 -
arch/arm/mach-imx/headsmp.S | 1 -
arch/arm/mach-imx/iomux-v3.c | 1 -
arch/arm/mach-iop33x/uart.c | 1 -
arch/arm/mach-msm/headsmp.S | 1 -
arch/arm/mach-msm/proc_comm.h | 1 -
arch/arm/mach-mvebu/headsmp.S | 1 -
arch/arm/mach-netx/fb.c | 1 -
arch/arm/mach-netx/pfifo.c | 1 -
arch/arm/mach-netx/xc.c | 1 -
arch/arm/mach-nspire/clcd.c | 1 -
arch/arm/mach-omap1/fpga.c | 1 -
arch/arm/mach-omap1/include/mach/serial.h | 1 -
arch/arm/mach-omap2/omap-headsmp.S | 1 -
arch/arm/mach-omap2/omap3-restart.c | 1 -
arch/arm/mach-omap2/vc3xxx_data.c | 1 -
arch/arm/mach-omap2/vc44xx_data.c | 1 -
arch/arm/mach-omap2/vp3xxx_data.c | 1 -
arch/arm/mach-omap2/vp44xx_data.c | 1 -
arch/arm/mach-prima2/headsmp.S | 1 -
arch/arm/mach-pxa/clock-pxa2xx.c | 1 -
arch/arm/mach-pxa/clock-pxa3xx.c | 1 -
arch/arm/mach-pxa/corgi_pm.c | 1 -
arch/arm/mach-pxa/mfp-pxa3xx.c | 1 -
arch/arm/mach-pxa/spitz_pm.c | 1 -
arch/arm/mach-s3c24xx/clock-s3c244x.c | 1 -
arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 1 -
arch/arm/mach-s3c24xx/iotiming-s3c2412.c | 1 -
arch/arm/mach-s3c24xx/irq-pm.c | 1 -
arch/arm/mach-s3c24xx/pm.c | 1 -
arch/arm/mach-s3c64xx/mach-crag6410-module.c | 2 +-
arch/arm/mach-s5p64x0/clock.c | 1 -
arch/arm/mach-sa1100/ssp.c | 1 -
arch/arm/mach-shmobile/headsmp-scu.S | 1 -
arch/arm/mach-shmobile/headsmp.S | 1 -
arch/arm/mach-shmobile/platsmp.c | 1 -
arch/arm/mach-shmobile/sleep-sh7372.S | 1 -
arch/arm/mach-socfpga/headsmp.S | 1 -
arch/arm/mach-sti/headsmp.S | 1 -
arch/arm/mach-sunxi/headsmp.S | 1 -
arch/arm/mach-tegra/flowctrl.c | 1 -
arch/arm/mach-tegra/headsmp.S | 1 -
arch/arm/mach-tegra/reset-handler.S | 1 -
arch/arm/mach-u300/dummyspichip.c | 1 -
arch/arm/mach-ux500/board-mop500-audio.c | 1 -
arch/arm/mach-ux500/headsmp.S | 1 -
arch/arm/mach-versatile/versatile_ab.c | 1 -
arch/arm/mach-vexpress/spc.c | 2 +-
arch/arm/mach-zynq/headsmp.S | 1 -
arch/arm/mm/hugetlbpage.c | 1 -
arch/arm/plat-iop/i2c.c | 1 -
arch/arm/plat-samsung/pm-check.c | 1 -
arch/arm/plat-samsung/pm-gpio.c | 1 -
arch/arm/plat-samsung/s5p-irq-pm.c | 1 -
arch/arm/plat-versatile/headsmp.S | 1 -
arch/arm/plat-versatile/platsmp.c | 1 -
arch/arm/vfp/entry.S | 2 +
arch/arm64/include/asm/arch_timer.h | 1 -
arch/arm64/kernel/cputable.c | 2 -
arch/arm64/kernel/entry.S | 1 -
arch/arm64/kernel/hyp-stub.S | 1 -
arch/arm64/kernel/process.c | 1 -
arch/arm64/kernel/ptrace.c | 1 -
arch/arm64/kernel/smp_spin_table.c | 1 -
arch/arm64/kernel/vdso/vdso.S | 1 -
arch/arm64/lib/delay.c | 1 -
arch/arm64/mm/cache.S | 1 -
arch/arm64/mm/proc.S | 1 -
arch/cris/arch-v32/mm/intmem.c | 3 +-
arch/ia64/hp/sim/simscsi.c | 11 +---
arch/ia64/sn/kernel/mca.c | 3 +-
arch/m68k/mvme16x/rtc.c | 2 +-
arch/mips/ar7/time.c | 1 +
arch/mips/loongson/common/serial.c | 9 ++-
arch/mips/mti-sead3/sead3-mtd.c | 3 +-
arch/mn10300/unit-asb2303/flash.c | 3 +-
arch/parisc/kernel/pdc_cons.c | 3 +-
arch/parisc/kernel/perf.c | 3 +-
arch/powerpc/kernel/time.c | 2 +-
arch/powerpc/mm/hugetlbpage.c | 2 +-
arch/powerpc/platforms/83xx/suspend.c | 3 +-
arch/powerpc/platforms/ps3/time.c | 3 +-
arch/powerpc/sysdev/fsl_lbc.c | 2 +-
arch/powerpc/sysdev/indirect_pci.c | 1 -
arch/sh/boards/mach-highlander/psw.c | 2 +-
arch/sh/boards/mach-landisk/psw.c | 2 +-
arch/x86/kernel/bootflag.c | 2 +-
arch/x86/kernel/devicetree.c | 2 +-
arch/x86/kernel/vsmp_64.c | 2 +-
arch/x86/platform/intel-mid/intel_mid_vrtc.c | 3 +-
arch/xtensa/platforms/iss/network.c | 4 +-
drivers/acpi/apei/apei-base.c | 1 -
drivers/acpi/button.c | 1 -
[ ... snip ~1000 lines of trivial driver diffstat ... ]
drivers/watchdog/wdt_pci.c | 1 -
drivers/xen/xen-stub.c | 1 -
fs/notify/inotify/inotify_user.c | 4 +-
include/drm/drmP.h | 1 -
include/linux/fb.h | 1 -
include/linux/ide.h | 1 -
include/linux/init.h | 77 ----------------------
include/linux/kdb.h | 1 -
include/linux/linux_logo.h | 3 -
include/linux/lsm_audit.h | 1 -
include/linux/module.h | 72 ++++++++++++++++++++
include/linux/moduleparam.h | 1 -
include/linux/netfilter.h | 1 -
include/linux/nls.h | 2 +-
include/linux/percpu_ida.h | 1 -
include/linux/profile.h | 1 -
include/linux/pstore_ram.h | 1 -
include/linux/usb/gadget.h | 1 -
include/xen/xenbus.h | 1 -
kernel/hung_task.c | 3 +-
kernel/kexec.c | 4 +-
kernel/profile.c | 2 +-
kernel/sched/stats.c | 2 +-
kernel/user.c | 3 +-
kernel/user_namespace.c | 2 +-
mm/nommu.c | 4 +-
net/ipv4/netfilter.c | 9 +--
scripts/pnmtologo.c | 1 +
scripts/tags.sh | 2 +-
1115 files changed, 148 insertions(+), 1273 deletions(-)
^ permalink raw reply
* Re: [GIT PULL] tree-wide: clean up no longer required #include <linux/init.h>
From: Paul Gortmaker @ 2014-02-04 21:30 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-arch, linux-mips, linux-m68k, rusty, linux-ia64, kvm, sfr,
gregkh, x86, netdev, linux-alpha, sparclinux, akpm, linuxppc-dev,
linux-arm-kernel, linux-s390
In-Reply-To: <1391547118-21967-1-git-send-email-paul.gortmaker@windriver.com>
[-- Attachment #1: Type: text/plain, Size: 21587 bytes --]
On Feb 4, 2014 3:52 PM, "Paul Gortmaker" <paul.gortmaker@windriver.com>
wrote:
>
> We've had this in linux-next for 2+ weeks (thanks Stephen!) as a
> linux-stable like queue of patches, and as can be seen here:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/paulg/init.git
Argh, above link is meant for cloning, not viewing.
This should be better...
https://git.kernel.org/cgit/linux/kernel/git/paulg/init.git/
Thanks,
Paul.
--
> most of the changes in the last week have been trivial adding acks
> or dropping patches that maintainers decided to take themselves.
>
> With -rc1 now containing what was in linux-next, the queue applies
> to that baseline w/o issue, and I've redone comprehensive multi
> arch build testing on the -rc1 baseline as a final sanity check.
>
> Original RFC discussion and patch posting is here, if needed:
>
> https://lkml.org/lkml/2014/1/21/434
>
> Suggested merge text follows:
>
> ----------------------------8<-----------------------------
> Summary - We removed cpuinit and devinit, which left ~2000 instances
> of include <linux/init.h> that were no longer needed. To fully enable
> this removal/cleanup, we relocate module_init() from init.h into
> module.h. Multi arch/multi config build testing on linux-next has
> been used to find and fix any implicit header dependencies prior to
> deploying the actual init.h --> module.h move, to preserve bisection.
>
> Additional details:
>
> module_init/module_exit and friends moved to module.h
> -----------------------------------------------------
> Aside from enabling this init.h cleanup to extend into modular files,
> it actually does make sense. For all modules will use some form of
> our initfunc processing/categorization, but not all initfunc users
> will be necessarily using modular functionality. So we move these
> module related macros to module.h and ensure module.h sources init.h
>
>
> module_init in non modular code:
> --------------------------------
> This series uncovered that we are enabling people to use module_init
> in non-modular code. While that works fine, there are at least three
> reasons why it probably should not be encouraged:
>
> 1) it makes a casual reader of the code assume the code is modular
> even though it is obj-y (builtin) or controlled by a bool Kconfig.
>
> 2) it makes it too easy to add dead code in a function that is handed
> to module_exit() -- [more on that below]
>
> 3) it breaks our ability to use priority sorted initcalls properly
> [more on that below.]
>
> 4) on some files, the use of module.h vs. init.h can cost a ~10%
> increase in the number of lines output from CPP.
>
> After this change, a new coder who tries to make use of module_init in
> non modular code would find themselves also needing to include the
> module.h header. At which point the odds are greater that they would
> ask themselves "Am I doing this right? I shouldn't need this."
>
> Note that existing non-modular code that already includes module.h and
> uses module_init doesn't get fixed here, since they already build w/o
> errors triggered by this change; we'll have to hunt them down later.
>
>
> module_init and initcall ordering:
> ----------------------------------
> We have a group of about ten priority sorted initcalls, that are
> called in init/main.c after most of the hard coded/direct calls
> have been processed. These serve the purpose of avoiding everyone
> poking at init/main.c to hook in their init sequence. The bins are:
>
> pure_initcall 0
> core_initcall 1
> postcore_initcall 2
> arch_initcall 3
> subsys_initcall 4
> fs_initcall 5
> device_initcall 6
> late_initcall 7
>
> These are meant to eventually replace users of the non specific
> priority "__initcall" which currently maps onto device_initcall.
> This is of interest, because in non-modular code, cpp does this:
>
> module_init --> __initcall --> device_initcall
>
> So all module_init() land in the device_initcall bucket, rather late
> in the sequence. That makes sense, since if it was a module, the init
> could be real late (days, weeks after boot). But now imagine you add
> support for some non-modular bus/arch/infrastructure (say for e.g. PCI)
> and you use module_init for it. That means anybody else who wants
> to use your subsystem can't do so if they use an initcall of 0 --> 5
> priority. For a real world example of this, see patch #1 in this series:
>
> https://lkml.org/lkml/2014/1/14/809
>
> We don't want to force code that is clearly arch or subsys or fs
> specific to have to use the device_initcall just because something
> else has been mistakenly put (or left) in that bucket. So a couple of
> changes do actually change the initcall level where it is inevitably
> appropriate to do so. Those are called out explicitly in their
> respective commit logs.
>
>
> module_exit and dead code
> -------------------------
> Built in code will never have an opportunity to call functions that
> are registered with module_exit(), so any cases of that uncovered in
> this series delete that dead code. Note that any built-in code that
> was already including module.h and using module_exit won't have shown
> up as breakage on the build coverage of this series, so we'll have to
> find those independently later. It looks like there may be quite a
> few that are invisibly created via module_platform_driver -- a macro
> that creates module_init and module_exit automatically. We may want
> to consider relocating module_platform_driver into module.h later...
>
>
> cpuinit
> -------
> To finalize the removal of cpuinit, which was done several releases
> ago, we remove the remaining stub functions from init.h in this
> series. We've seen one or two "users" try to creep back in, so this
> will close the door on that chapter and prevent creep.
>
> ----------------------------8<-----------------------------
>
> Thanks,
> Paul.
> ---
>
> Cc: linux-alpha@vger.kernel.org
> Cc: linux-arch@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-ia64@vger.kernel.org
> Cc: linux-m68k@lists.linux-m68k.org
> Cc: linux-mips@linux-mips.org
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: linux-s390@vger.kernel.org
> Cc: sparclinux@vger.kernel.org
> Cc: x86@kernel.org
> Cc: netdev@vger.kernel.org
> Cc: kvm@vger.kernel.org
> Cc: sfr@canb.auug.org.au
> Cc: rusty@rustcorp.com.au
> Cc: gregkh@linuxfoundation.org
> Cc: akpm@linux-foundation.org
> Cc: torvalds@linux-foundation.org
>
>
> The following changes since commit
38dbfb59d1175ef458d006556061adeaa8751b72:
>
> Linus 3.14-rc1 (2014-02-02 16:42:13 -0800)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux.gittags/init-cleanup
>
> for you to fetch changes up to a830e2e2777c893e5bfdaa370d6375023e8cd2a5:
>
> include: remove needless instances of <linux/init.h> (2014-02-03
16:39:14 -0500)
>
> ----------------------------------------------------------------
> Cleanup of <linux/init.h> for 3.14-rc1
>
> ----------------------------------------------------------------
> Paul Gortmaker (77):
> init: delete the __cpuinit related stubs
> kernel: audit/fix non-modular users of module_init in core code
> mm: replace module_init usages with subsys_initcall in nommu.c
> fs/notify: don't use module_init for non-modular inotify_user code
> netfilter: don't use module_init/exit in core IPV4 code
> x86: don't use module_init in non-modular intel_mid_vrtc.c
> x86: don't use module_init for non-modular core bootflag code
> x86: replace __init_or_module with __init in non-modular vsmp_64.c
> x86: don't use module_init in non-modular devicetree.c code
> drivers/tty/hvc: don't use module_init in non-modular hyp. console
code
> staging: don't use module_init in non-modular ion_dummy_driver.c
> powerpc: use device_initcall for registering rtc devices
> powerpc: use subsys_initcall for Freescale Local Bus
> powerpc: don't use module_init for non-modular core hugetlb code
> powerpc: don't use module_init in non-modular 83xx suspend code
> arm: include module.h in drivers/bus/omap_l3_smx.c
> arm: fix implicit module.h use in mach-at91 gpio.h
> arm: fix implicit #include <linux/init.h> in entry asm.
> arm: mach-s3c64xx mach-crag6410-module.c is not modular
> arm: use subsys_initcall in non-modular pl320 IPC code
> arm: don't use module_init in non-modular mach-vexpress/spc.c code
> alpha: don't use module_init for non-modular core code
> m68k: don't use module_init in non-modular mvme16x/rtc.c code
> ia64: don't use module_init for non-modular core kernel/mca.c code
> ia64: don't use module_init in non-modular sim/simscsi.c code
> mips: make loongsoon serial driver explicitly modular
> mips: don't use module_init in non-modular sead3-mtd.c code
> cris: don't use module_init for non-modular core intmem.c code
> parisc: don't use module_init for non-modular core pdc_cons code
> parisc64: don't use module_init for non-modular core perf code
> mn10300: don't use module_init in non-modular flash.c code
> sh: don't use module_init in non-modular psw.c code
> sh: mach-highlander/psw.c is tristate and should use module.h
> xtensa: don't use module_init for non-modular core network.c code
> drivers/clk: don't use module_init in clk-nomadik.c which is
non-modular
> cpuidle: don't use modular platform register in non-modular ARM
drivers
> drivers/platform: don't use modular register in non-modular
pdev_bus.c
> module: relocate module_init from init.h to module.h
> logo: emit "#include <linux/init.h> in autogenerated C file
> arm: delete non-required instances of include <linux/init.h>
> mips: restore init.h usage to arch/mips/ar7/time.c
> s390: delete non-required instances of include <linux/init.h>
> alpha: delete non-required instances of <linux/init.h>
> powerpc: delete another unrequired instance of <linux/init.h>
> arm64: delete non-required instances of <linux/init.h>
> watchdog: delete non-required instances of include <linux/init.h>
> video: delete non-required instances of include <linux/init.h>
> rtc: delete non-required instances of include <linux/init.h>
> scsi: delete non-required instances of include <linux/init.h>
> spi: delete non-required instances of include <linux/init.h>
> acpi: delete non-required instances of include <linux/init.h>
> drivers/power: delete non-required instances of include
<linux/init.h>
> drivers/media: delete non-required instances of include
<linux/init.h>
> drivers/ata: delete non-required instances of include <linux/init.h>
> drivers/hwmon: delete non-required instances of include
<linux/init.h>
> drivers/pinctrl: delete non-required instances of include
<linux/init.h>
> drivers/isdn: delete non-required instances of include
<linux/init.h>
> drivers/leds: delete non-required instances of include
<linux/init.h>
> drivers/pcmcia: delete non-required instances of include
<linux/init.h>
> drivers/char: delete non-required instances of include
<linux/init.h>
> drivers/infiniband: delete non-required instances of include
<linux/init.h>
> drivers/mfd: delete non-required instances of include <linux/init.h>
> drivers/gpio: delete non-required instances of include
<linux/init.h>
> drivers/bluetooth: delete non-required instances of include
<linux/init.h>
> drivers/mmc: delete non-required instances of include <linux/init.h>
> drivers/crypto: delete non-required instances of include
<linux/init.h>
> drivers/platform: delete non-required instances of include
<linux/init.h>
> drivers/misc: delete non-required instances of include
<linux/init.h>
> drivers/edac: delete non-required instances of include
<linux/init.h>
> drivers/macintosh: delete non-required instances of include
<linux/init.h>
> drivers/base: delete non-required instances of include
<linux/init.h>
> drivers/cpufreq: delete non-required instances of <linux/init.h>
> drivers/pci: delete non-required instances of <linux/init.h>
> drivers/dma: delete non-required instances of <linux/init.h>
> drivers/gpu: delete non-required instances of <linux/init.h>
> drivers: delete remaining non-required instances of <linux/init.h>
> include: remove needless instances of <linux/init.h>
>
> arch/alpha/kernel/err_ev6.c | 1 -
> arch/alpha/kernel/irq.c | 1 -
> arch/alpha/kernel/srmcons.c | 3 +-
> arch/alpha/kernel/traps.c | 1 -
> arch/alpha/oprofile/op_model_ev4.c | 1 -
> arch/alpha/oprofile/op_model_ev5.c | 1 -
> arch/alpha/oprofile/op_model_ev6.c | 1 -
> arch/alpha/oprofile/op_model_ev67.c | 1 -
> arch/arm/common/dmabounce.c | 1 -
> arch/arm/firmware/trusted_foundations.c | 1 -
> arch/arm/include/asm/arch_timer.h | 1 -
> arch/arm/kernel/entry-armv.S | 2 +
> arch/arm/kernel/entry-header.S | 1 -
> arch/arm/kernel/hyp-stub.S | 1 -
> arch/arm/kernel/suspend.c | 1 -
> arch/arm/kernel/unwind.c | 1 -
> arch/arm/mach-at91/include/mach/gpio.h | 1 +
> arch/arm/mach-cns3xxx/pm.c | 1 -
> arch/arm/mach-exynos/headsmp.S | 1 -
> arch/arm/mach-footbridge/personal.c | 1 -
> arch/arm/mach-imx/headsmp.S | 1 -
> arch/arm/mach-imx/iomux-v3.c | 1 -
> arch/arm/mach-iop33x/uart.c | 1 -
> arch/arm/mach-msm/headsmp.S | 1 -
> arch/arm/mach-msm/proc_comm.h | 1 -
> arch/arm/mach-mvebu/headsmp.S | 1 -
> arch/arm/mach-netx/fb.c | 1 -
> arch/arm/mach-netx/pfifo.c | 1 -
> arch/arm/mach-netx/xc.c | 1 -
> arch/arm/mach-nspire/clcd.c | 1 -
> arch/arm/mach-omap1/fpga.c | 1 -
> arch/arm/mach-omap1/include/mach/serial.h | 1 -
> arch/arm/mach-omap2/omap-headsmp.S | 1 -
> arch/arm/mach-omap2/omap3-restart.c | 1 -
> arch/arm/mach-omap2/vc3xxx_data.c | 1 -
> arch/arm/mach-omap2/vc44xx_data.c | 1 -
> arch/arm/mach-omap2/vp3xxx_data.c | 1 -
> arch/arm/mach-omap2/vp44xx_data.c | 1 -
> arch/arm/mach-prima2/headsmp.S | 1 -
> arch/arm/mach-pxa/clock-pxa2xx.c | 1 -
> arch/arm/mach-pxa/clock-pxa3xx.c | 1 -
> arch/arm/mach-pxa/corgi_pm.c | 1 -
> arch/arm/mach-pxa/mfp-pxa3xx.c | 1 -
> arch/arm/mach-pxa/spitz_pm.c | 1 -
> arch/arm/mach-s3c24xx/clock-s3c244x.c | 1 -
> arch/arm/mach-s3c24xx/iotiming-s3c2410.c | 1 -
> arch/arm/mach-s3c24xx/iotiming-s3c2412.c | 1 -
> arch/arm/mach-s3c24xx/irq-pm.c | 1 -
> arch/arm/mach-s3c24xx/pm.c | 1 -
> arch/arm/mach-s3c64xx/mach-crag6410-module.c | 2 +-
> arch/arm/mach-s5p64x0/clock.c | 1 -
> arch/arm/mach-sa1100/ssp.c | 1 -
> arch/arm/mach-shmobile/headsmp-scu.S | 1 -
> arch/arm/mach-shmobile/headsmp.S | 1 -
> arch/arm/mach-shmobile/platsmp.c | 1 -
> arch/arm/mach-shmobile/sleep-sh7372.S | 1 -
> arch/arm/mach-socfpga/headsmp.S | 1 -
> arch/arm/mach-sti/headsmp.S | 1 -
> arch/arm/mach-sunxi/headsmp.S | 1 -
> arch/arm/mach-tegra/flowctrl.c | 1 -
> arch/arm/mach-tegra/headsmp.S | 1 -
> arch/arm/mach-tegra/reset-handler.S | 1 -
> arch/arm/mach-u300/dummyspichip.c | 1 -
> arch/arm/mach-ux500/board-mop500-audio.c | 1 -
> arch/arm/mach-ux500/headsmp.S | 1 -
> arch/arm/mach-versatile/versatile_ab.c | 1 -
> arch/arm/mach-vexpress/spc.c | 2 +-
> arch/arm/mach-zynq/headsmp.S | 1 -
> arch/arm/mm/hugetlbpage.c | 1 -
> arch/arm/plat-iop/i2c.c | 1 -
> arch/arm/plat-samsung/pm-check.c | 1 -
> arch/arm/plat-samsung/pm-gpio.c | 1 -
> arch/arm/plat-samsung/s5p-irq-pm.c | 1 -
> arch/arm/plat-versatile/headsmp.S | 1 -
> arch/arm/plat-versatile/platsmp.c | 1 -
> arch/arm/vfp/entry.S | 2 +
> arch/arm64/include/asm/arch_timer.h | 1 -
> arch/arm64/kernel/cputable.c | 2 -
> arch/arm64/kernel/entry.S | 1 -
> arch/arm64/kernel/hyp-stub.S | 1 -
> arch/arm64/kernel/process.c | 1 -
> arch/arm64/kernel/ptrace.c | 1 -
> arch/arm64/kernel/smp_spin_table.c | 1 -
> arch/arm64/kernel/vdso/vdso.S | 1 -
> arch/arm64/lib/delay.c | 1 -
> arch/arm64/mm/cache.S | 1 -
> arch/arm64/mm/proc.S | 1 -
> arch/cris/arch-v32/mm/intmem.c | 3 +-
> arch/ia64/hp/sim/simscsi.c | 11 +---
> arch/ia64/sn/kernel/mca.c | 3 +-
> arch/m68k/mvme16x/rtc.c | 2 +-
> arch/mips/ar7/time.c | 1 +
> arch/mips/loongson/common/serial.c | 9 ++-
> arch/mips/mti-sead3/sead3-mtd.c | 3 +-
> arch/mn10300/unit-asb2303/flash.c | 3 +-
> arch/parisc/kernel/pdc_cons.c | 3 +-
> arch/parisc/kernel/perf.c | 3 +-
> arch/powerpc/kernel/time.c | 2 +-
> arch/powerpc/mm/hugetlbpage.c | 2 +-
> arch/powerpc/platforms/83xx/suspend.c | 3 +-
> arch/powerpc/platforms/ps3/time.c | 3 +-
> arch/powerpc/sysdev/fsl_lbc.c | 2 +-
> arch/powerpc/sysdev/indirect_pci.c | 1 -
> arch/sh/boards/mach-highlander/psw.c | 2 +-
> arch/sh/boards/mach-landisk/psw.c | 2 +-
> arch/x86/kernel/bootflag.c | 2 +-
> arch/x86/kernel/devicetree.c | 2 +-
> arch/x86/kernel/vsmp_64.c | 2 +-
> arch/x86/platform/intel-mid/intel_mid_vrtc.c | 3 +-
> arch/xtensa/platforms/iss/network.c | 4 +-
> drivers/acpi/apei/apei-base.c | 1 -
> drivers/acpi/button.c | 1 -
>
> [ ... snip ~1000 lines of trivial driver diffstat ... ]
>
> drivers/watchdog/wdt_pci.c | 1 -
> drivers/xen/xen-stub.c | 1 -
> fs/notify/inotify/inotify_user.c | 4 +-
> include/drm/drmP.h | 1 -
> include/linux/fb.h | 1 -
> include/linux/ide.h | 1 -
> include/linux/init.h | 77
----------------------
> include/linux/kdb.h | 1 -
> include/linux/linux_logo.h | 3 -
> include/linux/lsm_audit.h | 1 -
> include/linux/module.h | 72
++++++++++++++++++++
> include/linux/moduleparam.h | 1 -
> include/linux/netfilter.h | 1 -
> include/linux/nls.h | 2 +-
> include/linux/percpu_ida.h | 1 -
> include/linux/profile.h | 1 -
> include/linux/pstore_ram.h | 1 -
> include/linux/usb/gadget.h | 1 -
> include/xen/xenbus.h | 1 -
> kernel/hung_task.c | 3 +-
> kernel/kexec.c | 4 +-
> kernel/profile.c | 2 +-
> kernel/sched/stats.c | 2 +-
> kernel/user.c | 3 +-
> kernel/user_namespace.c | 2 +-
> mm/nommu.c | 4 +-
> net/ipv4/netfilter.c | 9 +--
> scripts/pnmtologo.c | 1 +
> scripts/tags.sh | 2 +-
> 1115 files changed, 148 insertions(+), 1273 deletions(-)
>
[-- Attachment #2: Type: text/html, Size: 26478 bytes --]
^ permalink raw reply
* Re: Oops on shutdown : 3.11.0-5-powerpc-e500mc Ubuntu
From: Scott Wood @ 2014-02-04 22:24 UTC (permalink / raw)
To: John Donnelly; +Cc: linuxppc-dev
In-Reply-To: <CAGtOQbSJeJ85Nj-M2XB+w3p5+PTVWrpsFKZqCbEqZYkwsa0GGg@mail.gmail.com>
On Tue, 2014-02-04 at 08:47 -0600, John Donnelly wrote:
>
>
>
>
> Hi,
> Where is a appropriate place to file a bug for this : This is the
> second occurrence I have seen.
>
What U-Boot are you running, and what is the output of its "errata"
command? There are some errata (e.g. A-004510) that can cause random
corruption if you don't have the workaround.
Were both crashes similar (same part of the code, same circumstances)?
-Scott
^ permalink raw reply
* Re: [PATCH v2] powerpc: Add cpu family documentation
From: Scott Wood @ 2014-02-04 22:43 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, Stephen Rothwell
In-Reply-To: <1391229347-23026-1-git-send-email-mpe@ellerman.id.au>
On Sat, 2014-02-01 at 15:35 +1100, Michael Ellerman wrote:
> This patch adds some documentation on the different cpu families
> supported by arch/powerpc.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
> v2: Reworked formatting to avoid wrapping.
> Fixed up Freescale details.
>
>
> Documentation/powerpc/cpu_families.txt | 227 +++++++++++++++++++++++++++++++++
> 1 file changed, 227 insertions(+)
> create mode 100644 Documentation/powerpc/cpu_families.txt
>
> diff --git a/Documentation/powerpc/cpu_families.txt b/Documentation/powerpc/cpu_families.txt
> new file mode 100644
> index 0000000..fa4f159
> --- /dev/null
> +++ b/Documentation/powerpc/cpu_families.txt
> @@ -0,0 +1,227 @@
> +CPU Families
> +============
> +
> +This document tries to summarise some of the different cpu families that exist
> +and are supported by arch/powerpc.
> +
> +
> +Book3S (aka sPAPR)
> +------------------
> +
> + - Hash MMU
> + - Mix of 32 & 64 bit
> +
> + +--------------+ +----------------+
> + | Old POWER | ---------------------------> | RS64 (threads) |
> + +--------------+ +----------------+
> + |
> + |
> + v
> + +--------------+ +----------------+ +-------+
> + | 601 | ---------------------------> | 603 | -> | 740 |
> + +--------------+ +----------------+ +-------+
> + | |
> + | |
> + v v
> + +--------------+ +----------------+ +-------+
> + | 604 | | 750 (G3) | -> | 750CX |
> + +--------------+ +----------------+ +-------+
> + | | |
> + | | |
> + v v v
> + +--------------+ +----------------+ +-------+
> + | 620 (64 bit) | | 7400 | | 750CL |
> + +--------------+ +----------------+ +-------+
> + | | |
> + | | |
> + v v v
> + +--------------+ +----------------+ +-------+
> + | POWER3/630 | | 7410 | | 750FX |
> + +--------------+ +----------------+ +-------+
> + | |
> + | |
> + v v
> + +--------------+ +----------------+
> + | POWER3+ | | 7450 |
> + +--------------+ +----------------+
> + | |
> + | |
> + v v
> + +--------------+ +----------------+
> + | POWER4 | | 7455 |
> + +--------------+ +----------------+
> + | |
> + | |
> + v v
> + +--------------+ +-------+ +----------------+
> + | POWER4+ | ---------------> | 970 | | 7447 |
> + +--------------+ +-------+ +----------------+
> + | | |
> + | | |
> + v v v
> + +--------------+ +-------+ +-------+ +----------------+
> + | POWER5 | --> | Cell | | 970FX | | 7448 |
> + +--------------+ +-------+ +-------+ +----------------+
> + | |
> + | |
> + v v
> + +--------------+ +-------+
> + | POWER5+ | | 970MP |
> + +--------------+ +-------+
> + |
> + |
> + v
> + +--------------+
> + | POWER5++ |
> + +--------------+
> + |
> + |
> + v
> + +--------------+
> + | POWER6 |
> + +--------------+
> + |
> + |
> + v
> + +--------------+
> + | POWER7 |
> + +--------------+
> + |
> + |
> + v
> + +--------------+
> + | POWER7+ |
> + +--------------+
> + |
> + |
> + v
> + +--------------+
> + | POWER8 |
> + +--------------+
> +
> +
> + +---------------+
> + | PA6T (64 bit) |
> + +---------------+
Missing e300 (603 derivative) and e600 (7448 derivative).
> +IBM BookE
> +---------
> +
> + - Software loaded TLB.
> + - All 32 bit
> +
> + +--------------+
> + | 401 |
> + +--------------+
> + |
> + |
> + v
> + +--------------+
> + | 403 |
> + +--------------+
> + |
> + |
> + v
> + +--------------+
> + | 405 |
> + +--------------+
> + |
> + |
> + v
Are 40x considered booke?
> +
> +Motorola/Freescale 8xx
> +----------------------
> +
> + - Software loaded with hardware assist.
> + - All 32 bit
> +
> + +--------------+
> + | 8xx |
> + +--------------+
> + |
> + |
> + v
> + +--------------+
> + | 850 |
> + +--------------+
Is the core of MPC850 different from other MPC8xx?
> +
> +
> +Freescale BookE
> +---------------
> +
> + - Software loaded TLB.
> + - e6500 adds HW loaded indirect TLB entries.
> + - Mix of 32 & 64 bit
> +
> + +--------------+
> + | e200 |
> + +--------------+
> +
> +
> + +--------------------------------+
> + | e500 |
> + +--------------------------------+
> + |
> + |
> + v
> + +--------------------------------+
> + | e500v2 |
> + +--------------------------------+
> + |
> + |
> + v
> + +--------------------------------+
> + | e500mc |
> + +--------------------------------+
> + |
> + |
> + v
> + +--------------------------------+
> + | e5500 (Book3e) (64 bit) |
> + +--------------------------------+
> + |
> + |
> + v
> + +--------------------------------+
> + | e6500 (HW TLB) (Multithreaded) |
> + +--------------------------------+
Why (Book3e) on e5500? e500mc is also an ISA 2.06 book3e core.
-Scott
^ permalink raw reply
* Re: Oops on shutdown : 3.11.0-5-powerpc-e500mc Ubuntu
From: John Donnelly @ 2014-02-04 22:45 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <1391552655.6733.184.camel@snotra.buserror.net>
[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]
Hi Scott,
This panic was in the kernel related to NFS , not u-boot; Unfortunately
I didn't catch the earlier console message/Oops but I recall it being
something similar.
Can you enlighten me what the errata addresses ? I
I filed the bug here:
https://bugs.launchpad.net/ubuntu/+source/linux-ppc/+bug/1276290
On Tue, Feb 4, 2014 at 4:24 PM, Scott Wood <scottwood@freescale.com> wrote:
> On Tue, 2014-02-04 at 08:47 -0600, John Donnelly wrote:
> >
> >
> >
> >
> > Hi,
> > Where is a appropriate place to file a bug for this : This is the
> > second occurrence I have seen.
> >
> What U-Boot are you running, and what is the output of its "errata"
> command? There are some errata (e.g. A-004510) that can cause random
> corruption if you don't have the workaround.
>
> Were both crashes similar (same part of the code, same circumstances)?
>
> -Scott
>
>
>
>
--
*Regards,*
* John.*
*--*
*o* Energy-efficiency is #1 reason data centers look to expand. -- Digital
Realty Trust
*o* Green Data Centers spending to increase 300% worldwide by 2016. --
Pike Research
*o *Data Centers have become as vital to the functioni
ng of society as power stations. -- The Economist
[-- Attachment #2: Type: text/html, Size: 3675 bytes --]
^ permalink raw reply
* Re: Oops on shutdown : 3.11.0-5-powerpc-e500mc Ubuntu
From: Scott Wood @ 2014-02-04 23:28 UTC (permalink / raw)
To: John Donnelly; +Cc: linuxppc-dev
In-Reply-To: <CAGtOQbRKZLzeup58X8rHz4YiF244TrkRXTqNv_57vEu2Rs8UNg@mail.gmail.com>
On Tue, 2014-02-04 at 16:45 -0600, John Donnelly wrote:
> Hi Scott,
>
> This panic was in the kernel related to NFS , not u-boot;
> Unfortunately I didn't catch the earlier console message/Oops but I
> recall it being something similar.
>
>
> Can you enlighten me what the errata addresses ? I
A-004510 can cause memory corruption due to dirty cache lines being
dropped. The workaround in U-Boot reconfigures the chip so that this
can't happen. The reconfiguration lasts until a reboot, so it's still
effective once you start Linux. It needs to happen while there's no
other traffic on the bus, which is why the workaround is not done in
Linux itself.
What revision of what chip are you using, and what version of U-Boot?
-Scott
^ permalink raw reply
* Re: Oops on shutdown : 3.11.0-5-powerpc-e500mc Ubuntu
From: Scott Wood @ 2014-02-04 23:33 UTC (permalink / raw)
To: John Donnelly; +Cc: linuxppc-dev
In-Reply-To: <CAGtOQbRKZLzeup58X8rHz4YiF244TrkRXTqNv_57vEu2Rs8UNg@mail.gmail.com>
On Tue, 2014-02-04 at 16:45 -0600, John Donnelly wrote:
> Hi Scott,
>
> This panic was in the kernel related to NFS , not u-boot;
> Unfortunately I didn't catch the earlier console message/Oops but I
> recall it being something similar.
>
>
> Can you enlighten me what the errata addresses ? I
>
>
> I filed the bug here:
>
>
> https://bugs.launchpad.net/ubuntu/+source/linux-ppc/+bug/1276290
>
>
>From the oops output it looks like you have force-loaded modules... Are
you sure that isn't causing a problem?
-Scott
^ permalink raw reply
* Re: [PATCH] slub: Don't throw away partial remote slabs if there is no local memory
From: Nishanth Aravamudan @ 2014-02-05 0:13 UTC (permalink / raw)
To: Christoph Lameter
Cc: Han Pingtian, David Rientjes, penberg, linux-mm, paulus,
Anton Blanchard, mpm, Joonsoo Kim, linuxppc-dev, Wanpeng Li
In-Reply-To: <alpine.DEB.2.10.1402041436150.11222@nuc>
On 04.02.2014 [14:39:32 -0600], Christoph Lameter wrote:
> On Mon, 3 Feb 2014, Nishanth Aravamudan wrote:
>
> > Yes, sorry for my lack of clarity. I meant Joonsoo's latest patch for
> > the $SUBJECT issue.
>
> Hmmm... I am not sure that this is a general solution. The fallback to
> other nodes can not only occur because a node has no memory as his patch
> assumes.
Thanks, Christoph. I see your point.
Something in this area would be nice, though, as it does produce a
fairly significant bump in the slab usage on our test system.
> If the target node allocation fails (for whatever reason) then I would
> recommend for simplicities sake to change the target node to
> NUMA_NO_NODE and just take whatever is in the current cpu slab. A more
> complex solution would be to look through partial lists in increasing
> distance to find a partially used slab that is reasonable close to the
> current node. Slab has logic like that in fallback_alloc(). Slubs
> get_any_partial() function does something close to what you want.
I apologize for my own ignorance, but I'm having trouble following.
Anton's original patch did fallback to the current cpu slab, but I'm not
sure any NUMA_NO_NODE change is necessary there. At the point we're
deactivating the slab (in the current code, in __slab_alloc()), we have
successfully allocated from somewhere, it's just not on the node we
expected to be on.
So perhaps you are saying to make a change lower in the code? I'm not
sure where it makes sense to change the target node in that case. I'd
appreciate any guidance you can give.
Thanks,
Nish
^ permalink raw reply
* Re: [GIT PULL] tree-wide: clean up no longer required #include <linux/init.h>
From: Ingo Molnar @ 2014-02-05 6:06 UTC (permalink / raw)
To: Paul Gortmaker
Cc: linux-arch, linux-mips, linux-m68k, rusty, linux-ia64, kvm, sfr,
Linus Torvalds, x86, linux-alpha, netdev, gregkh, sparclinux,
akpm, linuxppc-dev, linux-arm-kernel, linux-s390
In-Reply-To: <CAP=VYLp+zus5591g-1YQBCJifbk+UY59yJ7rV06ZN3QhhdnK7w@mail.gmail.com>
* Paul Gortmaker <paul.gortmaker@windriver.com> wrote:
> On Feb 4, 2014 3:52 PM, "Paul Gortmaker" <paul.gortmaker@windriver.com>
> wrote:
> >
> > We've had this in linux-next for 2+ weeks (thanks Stephen!) as a
> > linux-stable like queue of patches, and as can be seen here:
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/paulg/init.git
>
> Argh, above link is meant for cloning, not viewing.
>
> This should be better...
>
> https://git.kernel.org/cgit/linux/kernel/git/paulg/init.git/
So, if you meant Linus to pull it, you probably want to cite a real
Git URI along the lines of:
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/init.git
( Otherwise your pull request might be ignored or worse, you might get
an honest reply, due to the https transport being considered evil
that no free man outside of corporate firewalls should ever consider
and all that. )
Nice cleanups btw.
Thanks,
Ingo
^ permalink raw reply
* Re: [GIT PULL] tree-wide: clean up no longer required #include <linux/init.h>
From: Stephen Rothwell @ 2014-02-05 6:27 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-arch, linux-mips, linux-m68k, rusty, linux-ia64, kvm,
linux-s390, linuxppc-dev, x86, Paul Gortmaker, linux-alpha,
netdev, gregkh, sparclinux, akpm, Linus Torvalds,
linux-arm-kernel
In-Reply-To: <20140205060633.GE30094@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 492 bytes --]
Hi Ingo,
On Wed, 5 Feb 2014 07:06:33 +0100 Ingo Molnar <mingo@kernel.org> wrote:
>
> So, if you meant Linus to pull it, you probably want to cite a real
> Git URI along the lines of:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/paulg/init.git
Paul provided the proper git url further down in the mail along with the
usual pull request message (I guess he should have put that bit at the
top).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [GIT PULL] tree-wide: clean up no longer required #include <linux/init.h>
From: Ingo Molnar @ 2014-02-05 6:41 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-arch, linux-mips, linux-m68k, rusty, linux-ia64, kvm,
linux-s390, linuxppc-dev, x86, Paul Gortmaker, linux-alpha,
netdev, gregkh, sparclinux, akpm, Linus Torvalds,
linux-arm-kernel
In-Reply-To: <20140205172723.3fa841793b3fa3f3f534937f@canb.auug.org.au>
* Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> Hi Ingo,
>
> On Wed, 5 Feb 2014 07:06:33 +0100 Ingo Molnar <mingo@kernel.org> wrote:
> >
> > So, if you meant Linus to pull it, you probably want to cite a real
> > Git URI along the lines of:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/paulg/init.git
>
> Paul provided the proper git url further down in the mail along with the
> usual pull request message (I guess he should have put that bit at the
> top).
Yeah, indeed, and it even comes with a signed tag, which is an extra
nice touch:
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux.git tags/init-cleanup
(I guess the https was mentioned first to lower expectations.)
Thanks,
Ingo
^ permalink raw reply
* [V5 01/11] powerpc, perf: Re-arrange BHRB processing
From: Anshuman Khandual @ 2014-02-05 8:06 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel
Cc: mikey, ak, eranian, michael, acme, sukadev, mingo
In-Reply-To: <1391587582-32028-1-git-send-email-khandual@linux.vnet.ibm.com>
This patch cleans up some existing indentation problem and
re-organizes the BHRB processing code with an helper function
named `update_branch_entry` making it more readable. This patch
does not change any functionality.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
arch/powerpc/perf/core-book3s.c | 102 ++++++++++++++++++++--------------------
1 file changed, 52 insertions(+), 50 deletions(-)
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index 29b89e8..8a44dc1 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -400,11 +400,21 @@ static __u64 power_pmu_bhrb_to(u64 addr)
return target - (unsigned long)&instr + addr;
}
+/* Update individual branch entry */
+void update_branch_entry(struct cpu_hw_events *cpuhw, int u_index, u64 from, u64 to, int pred)
+{
+ cpuhw->bhrb_entries[u_index].from = from;
+ cpuhw->bhrb_entries[u_index].to = to;
+ cpuhw->bhrb_entries[u_index].mispred = pred;
+ cpuhw->bhrb_entries[u_index].predicted = ~pred;
+ return;
+}
+
/* Processing BHRB entries */
void power_pmu_bhrb_read(struct cpu_hw_events *cpuhw)
{
u64 val;
- u64 addr;
+ u64 addr, tmp;
int r_index, u_index, pred;
r_index = 0;
@@ -415,62 +425,54 @@ void power_pmu_bhrb_read(struct cpu_hw_events *cpuhw)
if (!val)
/* Terminal marker: End of valid BHRB entries */
break;
- else {
- addr = val & BHRB_EA;
- pred = val & BHRB_PREDICTION;
- if (!addr)
- /* invalid entry */
- continue;
+ addr = val & BHRB_EA;
+ pred = val & BHRB_PREDICTION;
- /* Branches are read most recent first (ie. mfbhrb 0 is
- * the most recent branch).
- * There are two types of valid entries:
- * 1) a target entry which is the to address of a
- * computed goto like a blr,bctr,btar. The next
- * entry read from the bhrb will be branch
- * corresponding to this target (ie. the actual
- * blr/bctr/btar instruction).
- * 2) a from address which is an actual branch. If a
- * target entry proceeds this, then this is the
- * matching branch for that target. If this is not
- * following a target entry, then this is a branch
- * where the target is given as an immediate field
- * in the instruction (ie. an i or b form branch).
- * In this case we need to read the instruction from
- * memory to determine the target/to address.
+ if (!addr)
+ /* invalid entry */
+ continue;
+
+ /* Branches are read most recent first (ie. mfbhrb 0 is
+ * the most recent branch).
+ * There are two types of valid entries:
+ * 1) a target entry which is the to address of a
+ * computed goto like a blr,bctr,btar. The next
+ * entry read from the bhrb will be branch
+ * corresponding to this target (ie. the actual
+ * blr/bctr/btar instruction).
+ * 2) a from address which is an actual branch. If a
+ * target entry proceeds this, then this is the
+ * matching branch for that target. If this is not
+ * following a target entry, then this is a branch
+ * where the target is given as an immediate field
+ * in the instruction (ie. an i or b form branch).
+ * In this case we need to read the instruction from
+ * memory to determine the target/to address.
+ */
+ if (val & BHRB_TARGET) {
+ /* Target branches use two entries
+ * (ie. computed gotos/XL form)
*/
+ tmp = addr;
+ /* Get from address in next entry */
+ val = read_bhrb(r_index++);
+ addr = val & BHRB_EA;
if (val & BHRB_TARGET) {
- /* Target branches use two entries
- * (ie. computed gotos/XL form)
- */
- cpuhw->bhrb_entries[u_index].to = addr;
- cpuhw->bhrb_entries[u_index].mispred = pred;
- cpuhw->bhrb_entries[u_index].predicted = ~pred;
-
- /* Get from address in next entry */
- val = read_bhrb(r_index++);
- addr = val & BHRB_EA;
- if (val & BHRB_TARGET) {
- /* Shouldn't have two targets in a
- row.. Reset index and try again */
- r_index--;
- addr = 0;
- }
- cpuhw->bhrb_entries[u_index].from = addr;
- } else {
- /* Branches to immediate field
- (ie I or B form) */
- cpuhw->bhrb_entries[u_index].from = addr;
- cpuhw->bhrb_entries[u_index].to =
- power_pmu_bhrb_to(addr);
- cpuhw->bhrb_entries[u_index].mispred = pred;
- cpuhw->bhrb_entries[u_index].predicted = ~pred;
+ /* Shouldn't have two targets in a
+ row.. Reset index and try again */
+ r_index--;
+ addr = 0;
}
- u_index++;
-
+ update_branch_entry(cpuhw, u_index, addr, tmp, pred);
+ } else {
+ /* Branches to immediate field
+ (ie I or B form) */
+ tmp = power_pmu_bhrb_to(addr);
+ update_branch_entry(cpuhw, u_index, addr, tmp, pred);
}
+ u_index++;
}
cpuhw->bhrb_stack.nr = u_index;
return;
--
1.7.11.7
^ permalink raw reply related
* [V5 02/11] perf: Add PERF_SAMPLE_BRANCH_COND
From: Anshuman Khandual @ 2014-02-05 8:06 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel
Cc: mikey, ak, eranian, michael, acme, sukadev, mingo
In-Reply-To: <1391587582-32028-1-git-send-email-khandual@linux.vnet.ibm.com>
This patch introduces new branch filter PERF_SAMPLE_BRANCH_COND which
will extend the existing perf ABI. Various architectures can provide
this functionality with either with HW filtering support (if present)
or with SW filtering of captured branch instructions.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Reviewed-by: Stephane Eranian <eranian@google.com>
---
include/uapi/linux/perf_event.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h
index 853bc1c..696f69b4 100644
--- a/include/uapi/linux/perf_event.h
+++ b/include/uapi/linux/perf_event.h
@@ -163,8 +163,9 @@ enum perf_branch_sample_type {
PERF_SAMPLE_BRANCH_ABORT_TX = 1U << 7, /* transaction aborts */
PERF_SAMPLE_BRANCH_IN_TX = 1U << 8, /* in transaction */
PERF_SAMPLE_BRANCH_NO_TX = 1U << 9, /* not in transaction */
+ PERF_SAMPLE_BRANCH_COND = 1U << 10, /* conditional branches */
- PERF_SAMPLE_BRANCH_MAX = 1U << 10, /* non-ABI */
+ PERF_SAMPLE_BRANCH_MAX = 1U << 11, /* non-ABI */
};
#define PERF_SAMPLE_BRANCH_PLM_ALL \
--
1.7.11.7
^ permalink raw reply related
* [V5 00/11] perf: New conditional branch filter
From: Anshuman Khandual @ 2014-02-05 8:06 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel
Cc: mikey, ak, eranian, michael, acme, sukadev, mingo
This patchset is the re-spin of the original branch stack sampling
patchset which introduced new PERF_SAMPLE_BRANCH_COND branch filter. This patchset
also enables SW based branch filtering support for book3s powerpc platforms which
have PMU HW backed branch stack sampling support.
Summary of code changes in this patchset:
(1) Introduces a new PERF_SAMPLE_BRANCH_COND branch filter
(2) Add the "cond" branch filter options in the "perf record" tool
(3) Enable PERF_SAMPLE_BRANCH_COND in X86 platforms
(4) Enable PERF_SAMPLE_BRANCH_COND in POWER8 platform
(5) Update the documentation regarding "perf record" tool
(6) Add some new powerpc instruction analysis functions in code-patching library
(7) Enable SW based branch filter support for powerpc book3s
(8) Changed BHRB configuration in POWER8 to accommodate SW branch filters
With this new SW enablement, the branch filter support for book3s platforms have
been extended to include all these combinations discussed below with a sample test
application program (included here).
Changes in V2
=============
(1) Enabled PPC64 SW branch filtering support
(2) Incorporated changes required for all previous comments
Changes in V3
=============
(1) Split the SW branch filter enablement into multiple patches
(2) Added PMU neutral SW branch filtering code, PMU specific HW branch filtering code
(3) Added new instruction analysis functionality into powerpc code-patching library
(4) Changed name for some of the functions
(5) Fixed couple of spelling mistakes
(6) Changed code documentation in multiple places
Changes in V4
=============
(1) Changed the commit message for patch (01/10)
(2) Changed the patch (02/10) to accommodate review comments from Michael Ellerman
(3) Rebased the patchset against latest Linus's tree
Changes in V5
=============
(1) Added a precursor patch to cleanup the indentation problem in power_pmu_bhrb_read
(2) Added a precursor patch to re-arrange P8 PMU BHRB filter config which improved the clarity
(3) Merged the previous 10th patch into the 8th patch
(4) Moved SW based branch analysis code from core perf into code-patching library as suggested by Michael
(5) Simplified the logic in branch analysis library
(6) Fixed some ambiguities in documentation at various places
(7) Added some more in-code documentation blocks at various places
(8) Renamed some local variable and function names
(9) Fixed some indentation and white space errors in the code
(10) Implemented almost all the review comments and suggestions made by Michael Ellerman on V4 patchset
(11) Enabled privilege mode SW branch filter
(12) Simplified and generalized the SW implemented conditional branch filter
(13) PERF_SAMPLE_BRANCH_COND filter is now supported only through SW implementation
(14) Adjusted other patches to deal with the above changes
HW implemented branch filters
=============================
(1) perf record -j any_call -e branch-misses:u ./cprog
# Overhead Command Source Shared Object Source Symbol Target Shared Object Target Symbol
# ........ ....... .................... ....................... .................... ....................
#
7.85% cprog cprog [.] sw_3_1 cprog [.] success_3_1_2
5.66% cprog cprog [.] sw_3_1 cprog [.] sw_3_1_2
5.65% cprog cprog [.] hw_1_1 cprog [.] symbol1
5.42% cprog cprog [.] sw_3_1 cprog [.] sw_3_1_3
5.40% cprog cprog [.] callme cprog [.] hw_1_1
5.40% cprog cprog [.] sw_3_1 cprog [.] success_3_1_1
5.40% cprog cprog [.] sw_3_1 cprog [.] sw_3_1_1
5.39% cprog cprog [.] sw_4_2 cprog [.] lr_addr
5.39% cprog cprog [.] callme cprog [.] sw_4_2
5.39% cprog [unknown] [.] 00000000 cprog [.] ctr_addr
5.38% cprog cprog [.] hw_1_2 cprog [.] symbol2
5.38% cprog cprog [.] callme cprog [.] hw_1_2
5.16% cprog cprog [.] sw_3_1 cprog [.] success_3_1_3
5.15% cprog cprog [.] callme cprog [.] sw_3_2
5.14% cprog cprog [.] callme cprog [.] hw_2_2
2.96% cprog cprog [.] callme cprog [.] sw_3_1
2.94% cprog cprog [.] callme cprog [.] hw_2_1
2.71% cprog cprog [.] main cprog [.] callme
2.71% cprog [unknown] [.] 00000000 cprog [.] lr_addr
2.70% cprog cprog [.] sw_4_1 cprog [.] ctr_addr
2.70% cprog cprog [.] callme cprog [.] sw_4_1
0.09% cprog [unknown] [.] 0xf7ad76c4 [unknown] [.] 0xf7ac22c0
0.00% cprog libc-2.11.2.so [.] vfprintf libc-2.11.2.so [.] __errno_location
0.00% cprog libc-2.11.2.so [.] printf libc-2.11.2.so [.] vfprintf
0.00% cprog libc-2.11.2.so [.] _IO_file_doallocate libc-2.11.2.so [.] isatty
0.00% cprog libc-2.11.2.so [.] _IO_file_doallocate libc-2.11.2.so [.] mmap
0.00% cprog libc-2.11.2.so [.] isatty libc-2.11.2.so [.] tcgetattr
0.00% cprog cprog [.] main [unknown] [.] 0x10000950
0.00% cprog [unknown] [.] 00000000 libc-2.11.2.so [.] _IO_file_stat
0.00% cprog [unknown] [.] 0xf7acfca4 cprog [.] _fini
0.00% cprog [unknown] [k] 00000000 cprog [k] ctr_addr
0.00% cprog [unknown] [k] 00000000 cprog [k] lr_addr
SW implemented branch filters
=============================
(2) perf record -j cond -e branch-misses:u ./cprog
# Overhead Command Source Shared Object Source Symbol Target Shared Object Target Symbol
# ........ ....... .................... ...................... .................... ......................
#
25.82% cprog [unknown] [.] 00000000 cprog [.] sw_3_1
12.66% cprog cprog [.] sw_4_2 cprog [.] lr_addr
12.63% cprog [unknown] [.] 00000000 cprog [.] callme
9.42% cprog cprog [.] hw_2_2 cprog [.] address2
9.39% cprog cprog [.] sw_3_1 cprog [.] success_3_1_2
4.91% cprog cprog [.] sw_3_1 cprog [.] success_3_1_1
4.91% cprog cprog [.] sw_3_1 cprog [.] success_3_1_3
3.35% cprog cprog [.] sw_3_1_3 cprog [.] sw_3_1
3.34% cprog cprog [.] sw_3_1_1 cprog [.] sw_3_1
3.31% cprog cprog [.] hw_1_2 cprog [.] symbol2
3.31% cprog cprog [.] sw_4_1 cprog [.] ctr_addr
3.29% cprog cprog [.] hw_2_1 cprog [.] address1
3.27% cprog cprog [.] sw_3_1_2 cprog [.] sw_3_1
0.32% cprog [unknown] [.] 0xf7c62328 [unknown] [.] 0xf7c62320
0.01% cprog libc-2.11.2.so [.] vfprintf libc-2.11.2.so [.] vfprintf
0.01% cprog libc-2.11.2.so [.] _IO_file_xsputn libc-2.11.2.so [.] _IO_file_xsputn
0.01% cprog libc-2.11.2.so [.] _IO_default_xsputn libc-2.11.2.so [.] _IO_default_xsputn
0.01% cprog libc-2.11.2.so [.] strchrnul libc-2.11.2.so [.] strchrnul
0.01% cprog [unknown] [.] 00000000 libc-2.11.2.so [.] _IO_file_xsputn
0.01% cprog [unknown] [k] 00000000 cprog [k] callme
(3) perf record -j any_ret -e branch-misses:u ./cprog
# Overhead Command Source Shared Object Source Symbol Target Shared Object Target Symbol
# ........ ....... .................... ..................... .................... .....................
#
15.61% cprog [unknown] [.] 00000000 cprog [.] sw_3_1
6.28% cprog cprog [.] symbol2 cprog [.] hw_1_2
6.28% cprog cprog [.] ctr_addr cprog [.] sw_4_1
6.26% cprog cprog [.] success_3_1_3 cprog [.] sw_3_1
6.24% cprog cprog [.] symbol1 cprog [.] hw_1_1
6.24% cprog cprog [.] sw_4_2 cprog [.] callme
6.21% cprog [unknown] [.] 00000000 cprog [.] callme
6.19% cprog cprog [.] lr_addr cprog [.] sw_4_2
3.16% cprog cprog [.] hw_1_2 cprog [.] callme
3.15% cprog cprog [.] success_3_1_1 cprog [.] sw_3_1
3.15% cprog cprog [.] sw_4_1 cprog [.] callme
3.14% cprog cprog [.] callme cprog [.] main
3.13% cprog cprog [.] hw_1_1 cprog [.] callme
3.13% cprog cprog [.] sw_3_1_1 cprog [.] sw_3_1
3.12% cprog cprog [.] back2 cprog [.] callme
3.12% cprog cprog [.] sw_3_1 cprog [.] callme
3.11% cprog cprog [.] back1 cprog [.] callme
3.11% cprog cprog [.] sw_3_1_2 cprog [.] sw_3_1
3.11% cprog cprog [.] sw_3_1_3 cprog [.] sw_3_1
3.10% cprog cprog [.] sw_3_2 cprog [.] callme
3.09% cprog cprog [.] success_3_1_2 cprog [.] sw_3_1
0.03% cprog [unknown] [.] 0x100009b0 [unknown] [.] 0xf7d5581c
0.01% cprog libc-2.11.2.so [.] _IO_file_overflow libc-2.11.2.so [.] _IO_file_xsputn
0.01% cprog libc-2.11.2.so [.] _IO_file_setbuf [unknown] [.] 0x0fee1084
0.01% cprog [unknown] [.] 0xf7d5589c libc-2.11.2.so [.] printf
0.01% cprog [unknown] [.] 00000000 libc-2.11.2.so [.] _IO_file_overflow
0.01% cprog [unknown] [.] 00000000 libc-2.11.2.so [.] _IO_file_setbuf
0.01% cprog [unknown] [k] 00000000 cprog [k] callme
(4) perf record -j ind_call -e branch-misses:u ./cprog
# Overhead Command Source Shared Object Source Symbol Target Shared Object Target Symbol
# ........ ....... .................... .............. .................... .....................
#
42.59% cprog [unknown] [.] 00000000 cprog [.] sw_3_1
25.88% cprog cprog [.] sw_4_2 cprog [.] lr_addr
25.65% cprog [unknown] [.] 00000000 cprog [.] callme
5.58% cprog cprog [.] sw_4_1 cprog [.] ctr_addr
0.23% cprog [unknown] [k] 00000000 cprog [k] callme
0.05% cprog [unknown] [.] 00000000 [unknown] [.] 0xf79fd740
0.03% cprog [unknown] [.] 00000000 libc-2.11.2.so [.] _IO_file_overflow
(5) perf record -j any_call,any_ret -e branch-misses:u ./cprog
# Overhead Command Source Shared Object Source Symbol Target Shared Object Target Symbol
# ........ ....... .................... ......................... .................... .....................
#
10.00% cprog [unknown] [.] 00000000 cprog [.] sw_3_1
4.20% cprog cprog [.] sw_4_2 cprog [.] lr_addr
4.17% cprog cprog [.] lr_addr cprog [.] sw_4_2
4.16% cprog cprog [.] symbol1 cprog [.] hw_1_1
4.12% cprog [unknown] [.] 00000000 cprog [.] callme
4.12% cprog cprog [.] symbol2 cprog [.] hw_1_2
4.11% cprog cprog [.] success_3_1_3 cprog [.] sw_3_1
4.11% cprog cprog [.] ctr_addr cprog [.] sw_4_1
4.10% cprog cprog [.] sw_4_2 cprog [.] callme
2.42% cprog cprog [.] callme cprog [.] sw_4_2
2.40% cprog cprog [.] sw_3_1_3 cprog [.] sw_3_1
2.40% cprog cprog [.] sw_3_1 cprog [.] sw_3_1_3
2.39% cprog cprog [.] hw_1_2 cprog [.] symbol2
2.39% cprog cprog [.] back1 cprog [.] callme
2.39% cprog cprog [.] sw_3_1_1 cprog [.] sw_3_1
2.39% cprog cprog [.] sw_3_1 cprog [.] sw_3_1_1
2.39% cprog cprog [.] sw_3_1 cprog [.] callme
2.39% cprog cprog [.] sw_4_1 cprog [.] ctr_addr
2.39% cprog cprog [.] callme cprog [.] hw_1_2
2.39% cprog cprog [.] callme cprog [.] sw_3_1
2.39% cprog cprog [.] sw_3_1_2 cprog [.] sw_3_1
2.39% cprog cprog [.] sw_3_1 cprog [.] sw_3_1_2
2.38% cprog cprog [.] hw_1_1 cprog [.] symbol1
2.38% cprog cprog [.] callme cprog [.] hw_1_1
1.78% cprog cprog [.] back2 cprog [.] callme
1.78% cprog cprog [.] hw_1_1 cprog [.] callme
1.76% cprog cprog [.] success_3_1_2 cprog [.] sw_3_1
1.76% cprog cprog [.] sw_3_1 cprog [.] success_3_1_2
1.76% cprog cprog [.] sw_3_2 cprog [.] callme
1.76% cprog cprog [.] callme cprog [.] sw_3_2
1.73% cprog cprog [.] success_3_1_1 cprog [.] sw_3_1
1.73% cprog cprog [.] sw_3_1 cprog [.] success_3_1_1
1.73% cprog cprog [.] hw_1_2 cprog [.] callme
1.71% cprog cprog [.] sw_3_1 cprog [.] success_3_1_3
1.71% cprog cprog [.] sw_4_1 cprog [.] callme
1.71% cprog cprog [.] callme cprog [.] main
0.05% cprog [unknown] [k] 00000000 cprog [k] callme
0.03% cprog [unknown] [.] 0xf7aa9d4c [unknown] [.] 0xf7aa5f80
0.01% cprog libc-2.11.2.so [.] __errno_location libc-2.11.2.so [.] vfprintf
0.01% cprog libc-2.11.2.so [.] vfprintf libc-2.11.2.so [.] __errno_location
0.01% cprog libc-2.11.2.so [.] _IO_doallocbuf libc-2.11.2.so [.] _IO_file_overflow
0.01% cprog cprog [.] __do_global_dtors_aux [unknown] [.] 0xf7a9fc74
0.01% cprog [unknown] [.] 0xf7a9fca4 cprog [.] _fini
(6) perf record -j any_call,ind_call -e branch-misses:u ./cprog
# Overhead Command Source Shared Object Source Symbol Target Shared Object Target Symbol
# ........ ....... .................... ...................... .................... ......................
#
17.38% cprog [unknown] [.] 00000000 cprog [.] sw_3_1
7.76% cprog cprog [.] sw_4_2 cprog [.] lr_addr
7.64% cprog [unknown] [.] 00000000 cprog [.] callme
6.00% cprog cprog [.] sw_3_1 cprog [.] sw_3_1_1
6.00% cprog cprog [.] callme cprog [.] sw_3_1
5.98% cprog cprog [.] sw_4_1 cprog [.] ctr_addr
5.97% cprog cprog [.] hw_1_1 cprog [.] symbol1
5.97% cprog cprog [.] hw_1_2 cprog [.] symbol2
5.97% cprog cprog [.] sw_3_1 cprog [.] sw_3_1_3
5.97% cprog cprog [.] callme cprog [.] hw_1_1
5.97% cprog cprog [.] callme cprog [.] hw_1_2
5.96% cprog cprog [.] callme cprog [.] sw_4_2
5.95% cprog cprog [.] sw_3_1 cprog [.] sw_3_1_2
1.83% cprog cprog [.] sw_3_1 cprog [.] success_3_1_2
1.82% cprog cprog [.] sw_3_1 cprog [.] success_3_1_1
1.82% cprog cprog [.] sw_3_1 cprog [.] success_3_1_3
1.82% cprog cprog [.] callme cprog [.] sw_3_2
0.14% cprog [unknown] [k] 00000000 cprog [k] callme
0.01% cprog libc-2.11.2.so [.] vfprintf libc-2.11.2.so [.] strchrnul
0.01% cprog libc-2.11.2.so [.] _IO_file_xsputn libc-2.11.2.so [.] _IO_default_xsputn
0.01% cprog libc-2.11.2.so [.] _IO_default_xsputn libc-2.11.2.so [.] _IO_file_overflow
0.01% cprog ld-2.11.2.so [.] calloc [unknown] [.] 0xf795b390
0.01% cprog [unknown] [.] 0x0fee00fc libc-2.11.2.so [.] _IO_file_overflow
0.01% cprog [unknown] [.] 00000000 ld-2.11.2.so [.] calloc
0.01% cprog [unknown] [.] 0xf794b41c [unknown] [.] 0xf794ab70
(7) perf record -j cond,any_ret -e branch-misses:u ./cprog
# Overhead Command Source Shared Object Source Symbol Target Shared Object Target Symbol
# ........ ....... .................... ...................... .................... ......................
#
12.43% cprog [unknown] [.] 00000000 cprog [.] sw_3_1
4.91% cprog cprog [.] lr_addr cprog [.] sw_4_2
4.89% cprog [unknown] [.] 00000000 cprog [.] callme
4.87% cprog cprog [.] sw_4_2 cprog [.] lr_addr
4.87% cprog cprog [.] symbol1 cprog [.] hw_1_1
4.19% cprog cprog [.] hw_2_2 cprog [.] address2
4.19% cprog cprog [.] back2 cprog [.] callme
4.19% cprog cprog [.] sw_3_2 cprog [.] callme
4.18% cprog cprog [.] hw_1_1 cprog [.] callme
4.18% cprog cprog [.] success_3_1_2 cprog [.] sw_3_1
4.18% cprog cprog [.] sw_3_1 cprog [.] success_3_1_2
4.16% cprog cprog [.] sw_4_2 cprog [.] callme
4.13% cprog cprog [.] ctr_addr cprog [.] sw_4_1
4.12% cprog cprog [.] symbol2 cprog [.] hw_1_2
4.12% cprog cprog [.] success_3_1_3 cprog [.] sw_3_1
3.43% cprog cprog [.] callme cprog [.] main
3.42% cprog cprog [.] sw_3_1 cprog [.] success_3_1_3
3.41% cprog cprog [.] success_3_1_1 cprog [.] sw_3_1
3.41% cprog cprog [.] sw_3_1 cprog [.] success_3_1_1
3.41% cprog cprog [.] sw_4_1 cprog [.] callme
3.40% cprog cprog [.] hw_1_2 cprog [.] callme
0.73% cprog cprog [.] sw_3_1_3 cprog [.] sw_3_1
0.73% cprog cprog [.] sw_4_1 cprog [.] ctr_addr
0.72% cprog cprog [.] hw_1_2 cprog [.] symbol2
0.72% cprog cprog [.] sw_3_1_1 cprog [.] sw_3_1
0.70% cprog cprog [.] hw_2_1 cprog [.] address1
0.70% cprog cprog [.] back1 cprog [.] callme
0.70% cprog cprog [.] sw_3_1_2 cprog [.] sw_3_1
0.70% cprog cprog [.] sw_3_1 cprog [.] callme
0.19% cprog [unknown] [.] 0xf7c12328 [unknown] [.] 0xf7c12320
0.01% cprog libc-2.11.2.so [.] __errno_location libc-2.11.2.so [.] vfprintf
0.01% cprog libc-2.11.2.so [.] vfprintf libc-2.11.2.so [.] vfprintf
0.01% cprog libc-2.11.2.so [.] _IO_file_overflow [unknown] [.] 0x0fee0100
0.01% cprog libc-2.11.2.so [.] _IO_default_xsputn libc-2.11.2.so [.] _IO_default_xsputn
0.01% cprog [unknown] [.] 00000000 libc-2.11.2.so [.] _IO_file_overflow
(8) perf record -j cond,ind_call -e branch-misses:u ./cprog
# Overhead Command Source Shared Object Source Symbol Target Shared Object Target Symbol
# ........ ....... .................... .............. .................... .................
#
20.70% cprog [unknown] [.] 00000000 cprog [.] sw_3_1
9.99% cprog cprog [.] sw_4_2 cprog [.] lr_addr
9.91% cprog [unknown] [.] 00000000 cprog [.] callme
9.45% cprog cprog [.] sw_3_1_3 cprog [.] sw_3_1
9.44% cprog cprog [.] hw_2_1 cprog [.] address1
9.43% cprog cprog [.] sw_3_1_1 cprog [.] sw_3_1
9.42% cprog cprog [.] hw_1_2 cprog [.] symbol2
9.42% cprog cprog [.] sw_3_1_2 cprog [.] sw_3_1
9.42% cprog cprog [.] sw_4_1 cprog [.] ctr_addr
0.65% cprog cprog [.] sw_3_1 cprog [.] success_3_1_1
0.62% cprog cprog [.] sw_3_1 cprog [.] success_3_1_3
0.56% cprog cprog [.] hw_2_2 cprog [.] address2
0.55% cprog cprog [.] sw_3_1 cprog [.] success_3_1_2
0.29% cprog [unknown] [.] 0xf7f72328 [unknown] [.] 0xf7f72320
0.10% cprog [unknown] [k] 00000000 cprog [k] callme
0.02% cprog libc-2.11.2.so [.] _IO_setb libc-2.11.2.so [.] _IO_setb
(9) perf record -e branch-misses:u -j any_call,any_ret,ind_call,cond ./cprog
# Overhead Command Source Shared Object Source Symbol Target Shared Object Target Symbol
# ........ ....... .................... .................. .................... .......................
#
9.31% cprog [unknown] [.] 00000000 cprog [.] sw_3_1
4.04% cprog cprog [.] symbol1 cprog [.] hw_1_1
4.03% cprog cprog [.] lr_addr cprog [.] sw_4_2
4.03% cprog cprog [.] sw_4_2 cprog [.] lr_addr
4.00% cprog [unknown] [.] 00000000 cprog [.] callme
3.88% cprog cprog [.] ctr_addr cprog [.] sw_4_1
3.87% cprog cprog [.] sw_4_2 cprog [.] callme
3.86% cprog cprog [.] symbol2 cprog [.] hw_1_2
3.86% cprog cprog [.] success_3_1_3 cprog [.] sw_3_1
2.49% cprog cprog [.] sw_4_1 cprog [.] ctr_addr
2.47% cprog cprog [.] hw_1_1 cprog [.] symbol1
2.47% cprog cprog [.] sw_3_1_1 cprog [.] sw_3_1
2.47% cprog cprog [.] sw_3_1 cprog [.] sw_3_1_1
2.47% cprog cprog [.] callme cprog [.] hw_1_1
2.47% cprog cprog [.] callme cprog [.] sw_3_1
2.47% cprog cprog [.] hw_1_2 cprog [.] symbol2
2.47% cprog cprog [.] hw_2_1 cprog [.] address1
2.47% cprog cprog [.] back1 cprog [.] callme
2.47% cprog cprog [.] sw_3_1_3 cprog [.] sw_3_1
2.47% cprog cprog [.] sw_3_1 cprog [.] sw_3_1_3
2.47% cprog cprog [.] sw_3_1 cprog [.] callme
2.47% cprog cprog [.] callme cprog [.] hw_1_2
2.47% cprog cprog [.] callme cprog [.] sw_4_2
2.46% cprog cprog [.] sw_3_1_2 cprog [.] sw_3_1
2.46% cprog cprog [.] sw_3_1 cprog [.] sw_3_1_2
1.57% cprog cprog [.] success_3_1_2 cprog [.] sw_3_1
1.57% cprog cprog [.] sw_3_1 cprog [.] success_3_1_2
1.57% cprog cprog [.] hw_1_1 cprog [.] callme
1.56% cprog cprog [.] hw_2_2 cprog [.] address2
1.56% cprog cprog [.] back2 cprog [.] callme
1.56% cprog cprog [.] sw_3_2 cprog [.] callme
1.56% cprog cprog [.] callme cprog [.] sw_3_2
1.41% cprog cprog [.] success_3_1_1 cprog [.] sw_3_1
1.41% cprog cprog [.] sw_3_1 cprog [.] success_3_1_1
1.40% cprog cprog [.] sw_4_1 cprog [.] callme
1.39% cprog cprog [.] hw_1_2 cprog [.] callme
1.39% cprog cprog [.] sw_3_1 cprog [.] success_3_1_3
1.39% cprog cprog [.] callme cprog [.] main
0.14% cprog [unknown] [.] 0xf7d72328 [unknown] [.] 0xf7d72320
0.03% cprog [unknown] [k] 00000000 cprog [k] callme
0.01% cprog libc-2.11.2.so [.] _IO_doallocbuf libc-2.11.2.so [.] _IO_doallocbuf
0.01% cprog libc-2.11.2.so [.] printf cprog [.] main
0.01% cprog libc-2.11.2.so [.] _IO_doallocbuf libc-2.11.2.so [.] _IO_file_doallocate
0.01% cprog ld-2.11.2.so [.] malloc [unknown] [.] 0xf7d8b380
0.01% cprog cprog [.] main [unknown] [.] 0x0fe7f63c
0.01% cprog [unknown] [.] 0xf7d8b388 ld-2.11.2.so [.] __libc_memalign
0.01% cprog [unknown] [.] 00000000 ld-2.11.2.so [.] malloc
Please refer to the V4 version of the patchset to learn about the sample test case and it's makefile.
Anshuman Khandual (11):
powerpc, perf: Re-arrange BHRB processing
perf: Add PERF_SAMPLE_BRANCH_COND
powerpc, perf: Re-arrange PMU based branch filter processing in POWER8
perf, tool: Conditional branch filter 'cond' added to perf record
x86, perf: Add conditional branch filtering support
perf, documentation: Description for conditional branch filter
powerpc, perf: Change the name of HW PMU branch filter tracking variable
powerpc, lib: Add new branch analysis support functions
powerpc, perf: Enable SW filtering in branch stack sampling framework
power8, perf: Adapt BHRB PMU configuration to work with SW filters
powerpc, perf: Enable privilege mode SW branch filters
arch/powerpc/include/asm/code-patching.h | 16 ++
arch/powerpc/include/asm/perf_event_server.h | 6 +-
arch/powerpc/lib/code-patching.c | 80 +++++++
arch/powerpc/perf/core-book3s.c | 323 ++++++++++++++++++++++-----
arch/powerpc/perf/power8-pmu.c | 70 ++++--
arch/x86/kernel/cpu/perf_event_intel_lbr.c | 5 +
include/uapi/linux/perf_event.h | 3 +-
tools/perf/Documentation/perf-record.txt | 3 +-
tools/perf/builtin-record.c | 1 +
9 files changed, 429 insertions(+), 78 deletions(-)
--
1.7.11.7
^ permalink raw reply
* [V5 03/11] powerpc, perf: Re-arrange PMU based branch filter processing in POWER8
From: Anshuman Khandual @ 2014-02-05 8:06 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel
Cc: mikey, ak, eranian, michael, acme, sukadev, mingo
In-Reply-To: <1391587582-32028-1-git-send-email-khandual@linux.vnet.ibm.com>
This patch does some code re-arrangements to make it clear that
it ignores any separate privilege level branch filter request
and does not support any combinations of HW PMU branch filters.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
arch/powerpc/perf/power8-pmu.c | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/arch/powerpc/perf/power8-pmu.c b/arch/powerpc/perf/power8-pmu.c
index a3f7abd..8551f85 100644
--- a/arch/powerpc/perf/power8-pmu.c
+++ b/arch/powerpc/perf/power8-pmu.c
@@ -561,8 +561,6 @@ static int power8_generic_events[] = {
static u64 power8_bhrb_filter_map(u64 branch_sample_type)
{
- u64 pmu_bhrb_filter = 0;
-
/* BHRB and regular PMU events share the same privilege state
* filter configuration. BHRB is always recorded along with a
* regular PMU event. As the privilege state filter is handled
@@ -570,20 +568,15 @@ static u64 power8_bhrb_filter_map(u64 branch_sample_type)
* PMU event, we ignore any separate BHRB specific request.
*/
- /* No branch filter requested */
- if (branch_sample_type & PERF_SAMPLE_BRANCH_ANY)
- return pmu_bhrb_filter;
-
- /* Invalid branch filter options - HW does not support */
- if (branch_sample_type & PERF_SAMPLE_BRANCH_ANY_RETURN)
- return -1;
+ /* Ignore user, kernel, hv bits */
+ branch_sample_type &= ~PERF_SAMPLE_BRANCH_PLM_ALL;
- if (branch_sample_type & PERF_SAMPLE_BRANCH_IND_CALL)
- return -1;
+ /* No branch filter requested */
+ if (branch_sample_type == PERF_SAMPLE_BRANCH_ANY)
+ return 0;
- if (branch_sample_type & PERF_SAMPLE_BRANCH_ANY_CALL) {
- pmu_bhrb_filter |= POWER8_MMCRA_IFM1;
- return pmu_bhrb_filter;
+ if (branch_sample_type == PERF_SAMPLE_BRANCH_ANY_CALL) {
+ return POWER8_MMCRA_IFM1;
}
/* Every thing else is unsupported */
--
1.7.11.7
^ permalink raw reply related
* [V5 04/11] perf, tool: Conditional branch filter 'cond' added to perf record
From: Anshuman Khandual @ 2014-02-05 8:06 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel
Cc: mikey, ak, eranian, michael, acme, sukadev, mingo
In-Reply-To: <1391587582-32028-1-git-send-email-khandual@linux.vnet.ibm.com>
Adding perf record support for new branch stack filter criteria
PERF_SAMPLE_BRANCH_COND.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Reviewed-by: Stephane Eranian <eranian@google.com>
---
tools/perf/builtin-record.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 3c394bf..eb74bcd 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -589,6 +589,7 @@ static const struct branch_mode branch_modes[] = {
BRANCH_OPT("abort_tx", PERF_SAMPLE_BRANCH_ABORT_TX),
BRANCH_OPT("in_tx", PERF_SAMPLE_BRANCH_IN_TX),
BRANCH_OPT("no_tx", PERF_SAMPLE_BRANCH_NO_TX),
+ BRANCH_OPT("cond", PERF_SAMPLE_BRANCH_COND),
BRANCH_END
};
--
1.7.11.7
^ permalink raw reply related
* [V5 05/11] x86, perf: Add conditional branch filtering support
From: Anshuman Khandual @ 2014-02-05 8:06 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel
Cc: mikey, ak, eranian, michael, acme, sukadev, mingo
In-Reply-To: <1391587582-32028-1-git-send-email-khandual@linux.vnet.ibm.com>
This patch adds conditional branch filtering support,
enabling it for PERF_SAMPLE_BRANCH_COND in perf branch
stack sampling framework by utilizing an available
software filter X86_BR_JCC.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Reviewed-by: Stephane Eranian <eranian@google.com>
---
arch/x86/kernel/cpu/perf_event_intel_lbr.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/x86/kernel/cpu/perf_event_intel_lbr.c b/arch/x86/kernel/cpu/perf_event_intel_lbr.c
index d82d155..9dd2459 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_lbr.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_lbr.c
@@ -384,6 +384,9 @@ static void intel_pmu_setup_sw_lbr_filter(struct perf_event *event)
if (br_type & PERF_SAMPLE_BRANCH_NO_TX)
mask |= X86_BR_NO_TX;
+ if (br_type & PERF_SAMPLE_BRANCH_COND)
+ mask |= X86_BR_JCC;
+
/*
* stash actual user request into reg, it may
* be used by fixup code for some CPU
@@ -678,6 +681,7 @@ static const int nhm_lbr_sel_map[PERF_SAMPLE_BRANCH_MAX] = {
* NHM/WSM erratum: must include IND_JMP to capture IND_CALL
*/
[PERF_SAMPLE_BRANCH_IND_CALL] = LBR_IND_CALL | LBR_IND_JMP,
+ [PERF_SAMPLE_BRANCH_COND] = LBR_JCC,
};
static const int snb_lbr_sel_map[PERF_SAMPLE_BRANCH_MAX] = {
@@ -689,6 +693,7 @@ static const int snb_lbr_sel_map[PERF_SAMPLE_BRANCH_MAX] = {
[PERF_SAMPLE_BRANCH_ANY_CALL] = LBR_REL_CALL | LBR_IND_CALL
| LBR_FAR,
[PERF_SAMPLE_BRANCH_IND_CALL] = LBR_IND_CALL,
+ [PERF_SAMPLE_BRANCH_COND] = LBR_JCC,
};
/* core */
--
1.7.11.7
^ permalink raw reply related
* [V5 06/11] perf, documentation: Description for conditional branch filter
From: Anshuman Khandual @ 2014-02-05 8:06 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel
Cc: mikey, ak, eranian, michael, acme, sukadev, mingo
In-Reply-To: <1391587582-32028-1-git-send-email-khandual@linux.vnet.ibm.com>
Adding documentation support for conditional branch filter.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Reviewed-by: Stephane Eranian <eranian@google.com>
---
tools/perf/Documentation/perf-record.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index c71b0f3..d460049 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -184,9 +184,10 @@ following filters are defined:
- in_tx: only when the target is in a hardware transaction
- no_tx: only when the target is not in a hardware transaction
- abort_tx: only when the target is a hardware transaction abort
+ - cond: conditional branches
+
-The option requires at least one branch type among any, any_call, any_ret, ind_call.
+The option requires at least one branch type among any, any_call, any_ret, ind_call, cond.
The privilege levels may be omitted, in which case, the privilege levels of the associated
event are applied to the branch filter. Both kernel (k) and hypervisor (hv) privilege
levels are subject to permissions. When sampling on multiple events, branch stack sampling
--
1.7.11.7
^ permalink raw reply related
* [V5 07/11] powerpc, perf: Change the name of HW PMU branch filter tracking variable
From: Anshuman Khandual @ 2014-02-05 8:06 UTC (permalink / raw)
To: linuxppc-dev, linux-kernel
Cc: mikey, ak, eranian, michael, acme, sukadev, mingo
In-Reply-To: <1391587582-32028-1-git-send-email-khandual@linux.vnet.ibm.com>
This patch simply changes the name of the variable from 'bhrb_filter' to
'bhrb_hw_filter' in order to add one more variable which will track SW
filters in generic powerpc book3s code which will be implemented in the
subsequent patch. This patch does not change any functionality.
Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
arch/powerpc/perf/core-book3s.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index 8a44dc1..468f58c 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -47,7 +47,7 @@ struct cpu_hw_events {
int n_txn_start;
/* BHRB bits */
- u64 bhrb_filter; /* BHRB HW branch filter */
+ u64 bhrb_hw_filter; /* BHRB HW branch filter */
int bhrb_users;
void *bhrb_context;
struct perf_branch_stack bhrb_stack;
@@ -1161,7 +1161,7 @@ static void power_pmu_enable(struct pmu *pmu)
out:
if (cpuhw->bhrb_users)
- ppmu->config_bhrb(cpuhw->bhrb_filter);
+ ppmu->config_bhrb(cpuhw->bhrb_hw_filter);
local_irq_restore(flags);
}
@@ -1256,7 +1256,7 @@ nocheck:
out:
if (has_branch_stack(event)) {
power_pmu_bhrb_enable(event);
- cpuhw->bhrb_filter = ppmu->bhrb_filter_map(
+ cpuhw->bhrb_hw_filter = ppmu->bhrb_filter_map(
event->attr.branch_sample_type);
}
@@ -1639,10 +1639,10 @@ static int power_pmu_event_init(struct perf_event *event)
err = power_check_constraints(cpuhw, events, cflags, n + 1);
if (has_branch_stack(event)) {
- cpuhw->bhrb_filter = ppmu->bhrb_filter_map(
+ cpuhw->bhrb_hw_filter = ppmu->bhrb_filter_map(
event->attr.branch_sample_type);
- if(cpuhw->bhrb_filter == -1)
+ if(cpuhw->bhrb_hw_filter == -1)
return -EOPNOTSUPP;
}
--
1.7.11.7
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox