printk: Add monotonic, boottime, and realtime timestamps
Subsystems (32)
PATCH v4 1/1 printk: Add monotonic, boottime, and realtime timestamps
printk.time=1/CONFIG_PRINTK_TIME=1 adds a unmodified local hardware clock timestamp to printk messages. The local hardware clock loses time each day making it difficult to determine exactly when an issue has occurred in the kernel log, and making it difficult to determine how kernel and hardware issues relate to each other in real time.
Make printk output different timestampes by adding options for no timestamp, the local hardware clock, the monotonic clock, the boottime clock, and the real clock. Allow a user to pick one of the clocks by using the printk.time kernel parameter. Output the type of clock in /sys/module/printk/parameters/time so userspace programs can interpret the timestamp.
Real clock & 32-bit systems: Selecting the real clock printk timestamp may lead to unlikely situations where a timestamp is wrong because the real time offset is read without the protection of a sequence lock in the call to ktime_get_log_ts() in printk_get_ts().
v2: Use peterz's suggested Kconfig options. Merge patchset together. Fix i386 !CONFIG_PRINTK builds.
v3: Fixed x86_64_defconfig. Added printk_time_type enum and printk_time_str for better output. Added BOOTTIME clock functionality.
v4: Fix messages, add additional printk.time options, and fix configs.
--- Documentation/admin-guide/kernel-parameters.txt | 6 +- arch/arm/configs/aspeed_g4_defconfig | 2 +- arch/arm/configs/aspeed_g5_defconfig | 2 +- arch/arm/configs/axm55xx_defconfig | 2 +- arch/arm/configs/bcm2835_defconfig | 2 +- arch/arm/configs/colibri_pxa270_defconfig | 2 +- arch/arm/configs/colibri_pxa300_defconfig | 2 +- arch/arm/configs/dove_defconfig | 2 +- arch/arm/configs/efm32_defconfig | 2 +- arch/arm/configs/exynos_defconfig | 2 +- arch/arm/configs/ezx_defconfig | 2 +- arch/arm/configs/h5000_defconfig | 2 +- arch/arm/configs/hisi_defconfig | 2 +- arch/arm/configs/imote2_defconfig | 2 +- arch/arm/configs/imx_v6_v7_defconfig | 2 +- arch/arm/configs/keystone_defconfig | 2 +- arch/arm/configs/lpc18xx_defconfig | 2 +- arch/arm/configs/magician_defconfig | 2 +- arch/arm/configs/mmp2_defconfig | 2 +- arch/arm/configs/moxart_defconfig | 2 +- arch/arm/configs/mps2_defconfig | 2 +- arch/arm/configs/multi_v7_defconfig | 2 +- arch/arm/configs/mvebu_v7_defconfig | 2 +- arch/arm/configs/mxs_defconfig | 2 +- arch/arm/configs/omap2plus_defconfig | 2 +- arch/arm/configs/pxa168_defconfig | 2 +- arch/arm/configs/pxa3xx_defconfig | 2 +- arch/arm/configs/pxa910_defconfig | 2 +- arch/arm/configs/pxa_defconfig | 2 +- arch/arm/configs/qcom_defconfig | 2 +- arch/arm/configs/raumfeld_defconfig | 2 +- arch/arm/configs/shmobile_defconfig | 2 +- arch/arm/configs/socfpga_defconfig | 2 +- arch/arm/configs/stm32_defconfig | 2 +- arch/arm/configs/sunxi_defconfig | 2 +- arch/arm/configs/tango4_defconfig | 2 +- arch/arm/configs/tegra_defconfig | 2 +- arch/arm/configs/u300_defconfig | 2 +- arch/arm/configs/u8500_defconfig | 2 +- arch/arm/configs/vt8500_v6_v7_defconfig | 2 +- arch/arm/configs/xcep_defconfig | 2 +- arch/arm/configs/zx_defconfig | 2 +- arch/arm64/configs/defconfig | 2 +- arch/m68k/configs/amcore_defconfig | 2 +- arch/mips/configs/ath25_defconfig | 2 +- arch/mips/configs/bcm47xx_defconfig | 2 +- arch/mips/configs/bmips_be_defconfig | 2 +- arch/mips/configs/bmips_stb_defconfig | 2 +- arch/mips/configs/ci20_defconfig | 2 +- arch/mips/configs/generic_defconfig | 2 +- arch/mips/configs/lemote2f_defconfig | 2 +- arch/mips/configs/loongson3_defconfig | 2 +- arch/mips/configs/nlm_xlp_defconfig | 2 +- arch/mips/configs/nlm_xlr_defconfig | 2 +- arch/mips/configs/pistachio_defconfig | 2 +- arch/mips/configs/qi_lb60_defconfig | 2 +- arch/mips/configs/rt305x_defconfig | 2 +- arch/mips/configs/xway_defconfig | 2 +- arch/parisc/configs/generic-64bit_defconfig | 2 +- arch/powerpc/configs/40x/virtex_defconfig | 2 +- arch/powerpc/configs/44x/fsp2_defconfig | 2 +- arch/powerpc/configs/44x/virtex5_defconfig | 2 +- arch/powerpc/configs/44x/warp_defconfig | 2 +- arch/powerpc/configs/52xx/cm5200_defconfig | 2 +- arch/powerpc/configs/52xx/lite5200b_defconfig | 2 +- arch/powerpc/configs/52xx/motionpro_defconfig | 2 +- arch/powerpc/configs/52xx/tqm5200_defconfig | 2 +- arch/powerpc/configs/gamecube_defconfig | 2 +- arch/powerpc/configs/mpc5200_defconfig | 2 +- arch/powerpc/configs/pasemi_defconfig | 2 +- arch/powerpc/configs/wii_defconfig | 2 +- arch/s390/configs/default_defconfig | 2 +- arch/s390/configs/gcov_defconfig | 2 +- arch/s390/configs/performance_defconfig | 2 +- arch/s390/configs/zfcpdump_defconfig | 2 +- arch/sh/configs/edosk7760_defconfig | 2 +- arch/sh/configs/sdk7786_defconfig | 2 +- arch/sh/configs/se7722_defconfig | 2 +- arch/sh/configs/sh7785lcr_32bit_defconfig | 2 +- arch/sh/configs/urquell_defconfig | 2 +- arch/sparc/configs/sparc64_defconfig | 2 +- arch/x86/configs/i386_defconfig | 2 +- arch/x86/configs/x86_64_defconfig | 2 +- arch/xtensa/configs/audio_kc705_defconfig | 2 +- arch/xtensa/configs/cadence_csp_defconfig | 2 +- arch/xtensa/configs/generic_kc705_defconfig | 2 +- arch/xtensa/configs/nommu_kc705_defconfig | 2 +- arch/xtensa/configs/smp_lx200_defconfig | 2 +- include/linux/timekeeping.h | 2 + kernel/printk/printk.c | 121 ++++++++++++++++++++- kernel/time/timekeeping.c | 22 ++++ lib/Kconfig.debug | 43 +++++++- .../selftests/rcutorture/configs/lock/CFcommon | 2 +- .../selftests/rcutorture/configs/rcu/CFcommon | 2 +- .../selftests/rcutorture/configs/rcuperf/CFcommon | 2 +- 95 files changed, 276 insertions(+), 98 deletions(-)
Documentation/admin-guide/kernel-parameters.txt +4 -2
@@ -3188,8 +3188,10 @@ ratelimit - ratelimit the logging Default: ratelimit - printk.time= Show timing data prefixed to each printk message line - Format: <bool> (1/Y/y=enable, 0/N/n=disable) + printk.time= Show timestamp prefixed to each printk message line + Format: <string> + (0/N/n/disable, 1/Y/y/local, + b/boot, m/monotonic, r/realtime) processor.max_cstate= [HW,ACPI] Limit processor to maximum C-state
arch/arm/configs/aspeed_g4_defconfig +1 -1
@@ -162,7 +162,7 @@ CONFIG_JFFS2_FS_XATTR=y CONFIG_UBIFS_FS=y CONFIG_SQUASHFS=y CONFIG_SQUASHFS_XZ=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DYNAMIC_DEBUG=y CONFIG_STRIP_ASM_SYMS=y CONFIG_DEBUG_FS=y
arch/arm/configs/aspeed_g5_defconfig +1 -1
@@ -165,7 +165,7 @@ CONFIG_JFFS2_FS_XATTR=y CONFIG_UBIFS_FS=y CONFIG_SQUASHFS=y CONFIG_SQUASHFS_XZ=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DYNAMIC_DEBUG=y CONFIG_STRIP_ASM_SYMS=y CONFIG_DEBUG_FS=y
arch/arm/configs/axm55xx_defconfig +1 -1
@@ -231,7 +231,7 @@ CONFIG_NFS_FSCACHE=y CONFIG_SUNRPC_DEBUG=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y CONFIG_MAGIC_SYSRQ=y
arch/arm/configs/bcm2835_defconfig +1 -1
@@ -141,7 +141,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_BOOT_PRINTK_DELAY=y CONFIG_DYNAMIC_DEBUG=y CONFIG_DEBUG_INFO=y
arch/arm/configs/colibri_pxa270_defconfig +1 -1
@@ -144,7 +144,7 @@ CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=m CONFIG_NLS_ISO8859_15=m CONFIG_NLS_UTF8=m -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_FS=y CONFIG_DEBUG_KERNEL=y
arch/arm/configs/colibri_pxa300_defconfig +1 -1
@@ -51,7 +51,7 @@ CONFIG_EXT3_FS=y CONFIG_NFS_FS=y CONFIG_NFS_V3=y CONFIG_ROOT_NFS=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_USER=y
arch/arm/configs/dove_defconfig +1 -1
@@ -118,7 +118,7 @@ CONFIG_NLS_CODEPAGE_850=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_2=y CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_FS=y # CONFIG_SCHED_DEBUG is not set
arch/arm/configs/efm32_defconfig +1 -1
@@ -92,7 +92,7 @@ CONFIG_EXT2_FS=y CONFIG_ROMFS_FS=y CONFIG_ROMFS_BACKED_BY_MTD=y # CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set
arch/arm/configs/exynos_defconfig +1 -1
@@ -253,7 +253,7 @@ CONFIG_ROOT_NFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DYNAMIC_DEBUG=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y
arch/arm/configs/ezx_defconfig +1 -1
@@ -363,7 +363,7 @@ CONFIG_NLS_ISO8859_15=m CONFIG_NLS_KOI8_R=m CONFIG_NLS_KOI8_U=m CONFIG_NLS_UTF8=m -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_FS=y CONFIG_DEBUG_KERNEL=y # CONFIG_SCHED_DEBUG is not set
arch/arm/configs/h5000_defconfig +1 -1
@@ -61,7 +61,7 @@ CONFIG_TMPFS=y CONFIG_JFFS2_FS=y CONFIG_JFFS2_COMPRESSION_OPTIONS=y # CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_KERNEL=y # CONFIG_SCHED_DEBUG is not set # CONFIG_DEBUG_BUGVERBOSE is not set
arch/arm/configs/hisi_defconfig +1 -1
@@ -82,7 +82,7 @@ CONFIG_NFS_FS=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_FS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y
arch/arm/configs/imote2_defconfig +1 -1
@@ -336,7 +336,7 @@ CONFIG_NLS_ISO8859_15=m CONFIG_NLS_KOI8_R=m CONFIG_NLS_KOI8_U=m CONFIG_NLS_UTF8=m -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_FS=y CONFIG_DEBUG_KERNEL=y # CONFIG_SCHED_DEBUG is not set
arch/arm/configs/imx_v6_v7_defconfig +1 -1
@@ -382,7 +382,7 @@ CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_15=m CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_FS=y CONFIG_MAGIC_SYSRQ=y # CONFIG_SCHED_DEBUG is not set
arch/arm/configs/keystone_defconfig +1 -1
@@ -200,7 +200,7 @@ CONFIG_NFSD_V3=y CONFIG_NFSD_V3_ACL=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_SHIRQ=y CONFIG_DEBUG_USER=y
arch/arm/configs/lpc18xx_defconfig +1 -1
@@ -160,7 +160,7 @@ CONFIG_EXT2_FS=y # CONFIG_INOTIFY_USER is not set CONFIG_JFFS2_FS=y # CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set
arch/arm/configs/magician_defconfig +1 -1
@@ -154,7 +154,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_CODEPAGE_1251=m CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_KERNEL=y # CONFIG_SCHED_DEBUG is not set CONFIG_TIMER_STATS=y
arch/arm/configs/mmp2_defconfig +1 -1
@@ -74,7 +74,7 @@ CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_FS=y CONFIG_DEBUG_KERNEL=y
arch/arm/configs/moxart_defconfig +1 -1
@@ -123,7 +123,7 @@ CONFIG_EXT3_FS=y CONFIG_TMPFS=y CONFIG_CONFIGFS_FS=y CONFIG_JFFS2_FS=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set
arch/arm/configs/mps2_defconfig +1 -1
@@ -98,7 +98,7 @@ CONFIG_NFS_V4_1=y CONFIG_NFS_V4_2=y CONFIG_ROOT_NFS=y CONFIG_NLS=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set
arch/arm/configs/multi_v7_defconfig +1 -1
@@ -929,7 +929,7 @@ CONFIG_ROOT_NFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_FS=y CONFIG_MAGIC_SYSRQ=y CONFIG_LOCKUP_DETECTOR=y
arch/arm/configs/mvebu_v7_defconfig +1 -1
@@ -152,7 +152,7 @@ CONFIG_NLS_CODEPAGE_850=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_2=y CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y CONFIG_MAGIC_SYSRQ=y
arch/arm/configs/mxs_defconfig +1 -1
@@ -167,7 +167,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_CODEPAGE_850=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_15=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_FRAME_WARN=2048 CONFIG_UNUSED_SYMBOLS=y
arch/arm/configs/omap2plus_defconfig +1 -1
@@ -493,7 +493,7 @@ CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO_SPLIT=y CONFIG_DEBUG_INFO_DWARF4=y
arch/arm/configs/pxa168_defconfig +1 -1
@@ -50,7 +50,7 @@ CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_PREEMPT is not set
arch/arm/configs/pxa3xx_defconfig +1 -1
@@ -109,7 +109,7 @@ CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y CONFIG_NLS=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_SHIRQ=y
arch/arm/configs/pxa910_defconfig +1 -1
@@ -58,7 +58,7 @@ CONFIG_NFS_V3=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_PREEMPT is not set
arch/arm/configs/pxa_defconfig +1 -1
@@ -727,7 +727,7 @@ CONFIG_NLS_ASCII=m CONFIG_NLS_ISO8859_1=m CONFIG_NLS_ISO8859_15=m CONFIG_NLS_UTF8=m -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DYNAMIC_DEBUG=y CONFIG_DEBUG_INFO=y CONFIG_FRAME_WARN=0
arch/arm/configs/qcom_defconfig +1 -1
@@ -231,7 +231,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DYNAMIC_DEBUG=y CONFIG_DEBUG_INFO=y CONFIG_MAGIC_SYSRQ=y
arch/arm/configs/raumfeld_defconfig +1 -1
@@ -187,7 +187,7 @@ CONFIG_NLS_ISO8859_15=y CONFIG_NLS_KOI8_R=y CONFIG_NLS_KOI8_U=y CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_USER=y
arch/arm/configs/shmobile_defconfig +1 -1
@@ -218,7 +218,7 @@ CONFIG_NFS_V4_1=y CONFIG_ROOT_NFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set # CONFIG_ARM_UNWIND is not set
arch/arm/configs/socfpga_defconfig +1 -1
@@ -155,7 +155,7 @@ CONFIG_NFSD_V3_ACL=y CONFIG_NFSD_V4=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_MAGIC_SYSRQ=y CONFIG_DETECT_HUNG_TASK=y
arch/arm/configs/stm32_defconfig +1 -1
@@ -74,7 +74,7 @@ CONFIG_STM32_ADC=y # CONFIG_DNOTIFY is not set # CONFIG_INOTIFY_USER is not set CONFIG_NLS=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set
arch/arm/configs/sunxi_defconfig +1 -1
@@ -151,6 +151,6 @@ CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_FS=y CONFIG_CRYPTO_DEV_SUN4I_SS=y
arch/arm/configs/tango4_defconfig +1 -1
@@ -90,5 +90,5 @@ CONFIG_ROOT_NFS=y CONFIG_NLS_CODEPAGE_437=m CONFIG_NLS_ISO8859_1=m CONFIG_NLS_UTF8=m -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y # CONFIG_CRYPTO_ECHAINIV is not set
arch/arm/configs/tegra_defconfig +1 -1
@@ -286,7 +286,7 @@ CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y CONFIG_MAGIC_SYSRQ=y
arch/arm/configs/u300_defconfig +1 -1
@@ -62,7 +62,7 @@ CONFIG_VFAT_FS=y CONFIG_TMPFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y # CONFIG_SCHED_DEBUG is not set
arch/arm/configs/u8500_defconfig +1 -1
@@ -127,7 +127,7 @@ CONFIG_NFS_FS=y CONFIG_ROOT_NFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y CONFIG_MAGIC_SYSRQ=y
arch/arm/configs/vt8500_v6_v7_defconfig +1 -1
@@ -84,6 +84,6 @@ CONFIG_NFS_FS=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_KERNEL=y CONFIG_LOCKUP_DETECTOR=y
arch/arm/configs/xcep_defconfig +1 -1
@@ -79,7 +79,7 @@ CONFIG_NFS_V3=y CONFIG_NLS=m CONFIG_NLS_DEFAULT="utf8" CONFIG_NLS_UTF8=m -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_STRIP_ASM_SYMS=y CONFIG_DEBUG_KERNEL=y # CONFIG_SCHED_DEBUG is not set
arch/arm/configs/zx_defconfig +1 -1
@@ -95,7 +95,7 @@ CONFIG_TMPFS_POSIX_ACL=y CONFIG_NLS_CODEPAGE_936=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_INFO=y
arch/arm64/configs/defconfig +1 -1
@@ -549,7 +549,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_VIRTUALIZATION=y CONFIG_KVM=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y CONFIG_MAGIC_SYSRQ=y
arch/m68k/configs/amcore_defconfig +1 -1
@@ -107,7 +107,7 @@ CONFIG_JFFS2_FS=y CONFIG_ROMFS_FS=y CONFIG_ROMFS_BACKED_BY_BOTH=y # CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set # CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
arch/mips/configs/ath25_defconfig +1 -1
@@ -105,7 +105,7 @@ CONFIG_SQUASHFS_FILE_DIRECT=y CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y # CONFIG_SQUASHFS_ZLIB is not set CONFIG_SQUASHFS_XZ=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_STRIP_ASM_SYMS=y CONFIG_DEBUG_FS=y
arch/mips/configs/bcm47xx_defconfig +1 -1
@@ -74,7 +74,7 @@ CONFIG_USB_HCD_BCMA=y CONFIG_USB_HCD_SSB=y CONFIG_LEDS_TRIGGER_TIMER=y CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO_REDUCED=y CONFIG_STRIP_ASM_SYMS=y
arch/mips/configs/bmips_be_defconfig +1 -1
@@ -32,7 +32,7 @@ CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y # CONFIG_STANDALONE is not set # CONFIG_PREVENT_FIRMWARE_BUILD is not set -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_BRCMSTB_GISB_ARB=y CONFIG_MTD=y CONFIG_MTD_BCM63XX_PARTS=y
arch/mips/configs/bmips_stb_defconfig +1 -1
@@ -85,7 +85,7 @@ CONFIG_CIFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_FS=y CONFIG_MAGIC_SYSRQ=y CONFIG_CMDLINE_BOOL=y
arch/mips/configs/ci20_defconfig +1 -1
@@ -147,7 +147,7 @@ CONFIG_NLS_ISO8859_15=y CONFIG_NLS_KOI8_R=y CONFIG_NLS_KOI8_U=y CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_STRIP_ASM_SYMS=y CONFIG_DEBUG_FS=y
arch/mips/configs/generic_defconfig +1 -1
@@ -83,7 +83,7 @@ CONFIG_NFS_V4=y CONFIG_NFS_V4_1=y CONFIG_NFS_V4_2=y CONFIG_ROOT_NFS=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO_REDUCED=y CONFIG_DEBUG_FS=y
arch/mips/configs/lemote2f_defconfig +1 -1
@@ -394,7 +394,7 @@ CONFIG_NLS_ISO8859_15=m CONFIG_NLS_KOI8_R=m CONFIG_NLS_KOI8_U=m CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_FRAME_WARN=1024 CONFIG_STRIP_ASM_SYMS=y CONFIG_DEBUG_FS=y
arch/mips/configs/loongson3_defconfig +1 -1
@@ -327,7 +327,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_CODEPAGE_936=y CONFIG_NLS_ASCII=y CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_FRAME_WARN=1024 CONFIG_STRIP_ASM_SYMS=y CONFIG_MAGIC_SYSRQ=y
arch/mips/configs/nlm_xlp_defconfig +1 -1
@@ -549,7 +549,7 @@ CONFIG_NLS_ISO8859_14=m CONFIG_NLS_ISO8859_15=m CONFIG_NLS_KOI8_R=m CONFIG_NLS_KOI8_U=m -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_FRAME_WARN=1024
arch/mips/configs/nlm_xlr_defconfig +1 -1
@@ -506,7 +506,7 @@ CONFIG_NLS_ISO8859_14=m CONFIG_NLS_ISO8859_15=m CONFIG_NLS_KOI8_R=m CONFIG_NLS_KOI8_U=m -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_UNUSED_SYMBOLS=y
arch/mips/configs/pistachio_defconfig +1 -1
@@ -297,7 +297,7 @@ CONFIG_NLS_DEFAULT="utf8" CONFIG_NLS_CODEPAGE_437=m CONFIG_NLS_ASCII=m CONFIG_NLS_ISO8859_1=m -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0
arch/mips/configs/qi_lb60_defconfig +1 -1
@@ -170,7 +170,7 @@ CONFIG_NLS_ISO8859_15=y CONFIG_NLS_KOI8_R=y CONFIG_NLS_KOI8_U=y CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_STRIP_ASM_SYMS=y CONFIG_READABLE_ASM=y
arch/mips/configs/rt305x_defconfig +1 -1
@@ -143,7 +143,7 @@ CONFIG_JFFS2_COMPRESSION_OPTIONS=y CONFIG_SQUASHFS=y # CONFIG_SQUASHFS_ZLIB is not set CONFIG_SQUASHFS_XZ=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_MAGIC_SYSRQ=y CONFIG_STRIP_ASM_SYMS=y
arch/mips/configs/xway_defconfig +1 -1
@@ -151,7 +151,7 @@ CONFIG_JFFS2_COMPRESSION_OPTIONS=y CONFIG_SQUASHFS=y # CONFIG_SQUASHFS_ZLIB is not set CONFIG_SQUASHFS_XZ=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_STRIP_ASM_SYMS=y CONFIG_DEBUG_FS=y
arch/parisc/configs/generic-64bit_defconfig +1 -1
@@ -272,7 +272,7 @@ CONFIG_NLS_ASCII=m CONFIG_NLS_ISO8859_1=m CONFIG_NLS_ISO8859_2=m CONFIG_NLS_UTF8=m -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_STRIP_ASM_SYMS=y CONFIG_UNUSED_SYMBOLS=y CONFIG_DEBUG_FS=y
arch/powerpc/configs/40x/virtex_defconfig +1 -1
@@ -71,7 +71,7 @@ CONFIG_CRC_CCITT=y CONFIG_FONTS=y CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_KERNEL=y # CONFIG_CRYPTO_ANSI_CPRNG is not set
arch/powerpc/configs/44x/fsp2_defconfig +1 -1
@@ -111,7 +111,7 @@ CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y CONFIG_NLS_DEFAULT="n" CONFIG_XZ_DEC=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_MESSAGE_LOGLEVEL_DEFAULT=3 CONFIG_DYNAMIC_DEBUG=y CONFIG_DEBUG_INFO=y
arch/powerpc/configs/44x/virtex5_defconfig +1 -1
@@ -70,7 +70,7 @@ CONFIG_CRC_CCITT=y CONFIG_FONTS=y CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_KERNEL=y # CONFIG_CRYPTO_ANSI_CPRNG is not set
arch/powerpc/configs/44x/warp_defconfig +1 -1
@@ -90,7 +90,7 @@ CONFIG_NLS_ISO8859_15=y CONFIG_NLS_UTF8=y CONFIG_CRC_CCITT=y CONFIG_CRC_T10DIF=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FS=y CONFIG_MAGIC_SYSRQ=y
arch/powerpc/configs/52xx/cm5200_defconfig +1 -1
@@ -72,7 +72,7 @@ CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DETECT_HUNG_TASK=y # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_CRYPTO_ECB=y
arch/powerpc/configs/52xx/lite5200b_defconfig +1 -1
@@ -58,7 +58,7 @@ CONFIG_TMPFS=y CONFIG_NFS_FS=y CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DETECT_HUNG_TASK=y # CONFIG_DEBUG_BUGVERBOSE is not set
arch/powerpc/configs/52xx/motionpro_defconfig +1 -1
@@ -84,7 +84,7 @@ CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DETECT_HUNG_TASK=y # CONFIG_DEBUG_BUGVERBOSE is not set
arch/powerpc/configs/52xx/tqm5200_defconfig +1 -1
@@ -86,7 +86,7 @@ CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DETECT_HUNG_TASK=y # CONFIG_DEBUG_BUGVERBOSE is not set
arch/powerpc/configs/gamecube_defconfig +1 -1
@@ -89,7 +89,7 @@ CONFIG_CIFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_CRC_CCITT=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_SPINLOCK=y CONFIG_DEBUG_MUTEXES=y CONFIG_LATENCYTOP=y
arch/powerpc/configs/mpc5200_defconfig +1 -1
@@ -126,7 +126,7 @@ CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_KERNEL=y CONFIG_DETECT_HUNG_TASK=y
arch/powerpc/configs/pasemi_defconfig +1 -1
@@ -166,7 +166,7 @@ CONFIG_NFSD_V4=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_CRC_CCITT=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_FS=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_KERNEL=y
arch/powerpc/configs/wii_defconfig +1 -1
@@ -110,7 +110,7 @@ CONFIG_CIFS=m CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_CRC_CCITT=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_SPINLOCK=y CONFIG_DEBUG_MUTEXES=y
arch/s390/configs/default_defconfig +1 -1
@@ -564,7 +564,7 @@ CONFIG_NLS_ISO8859_1=m CONFIG_NLS_ISO8859_15=m CONFIG_NLS_UTF8=m CONFIG_DLM=m -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DYNAMIC_DEBUG=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO_DWARF4=y
arch/s390/configs/gcov_defconfig +1 -1
@@ -558,7 +558,7 @@ CONFIG_NLS_ISO8859_1=m CONFIG_NLS_ISO8859_15=m CONFIG_NLS_UTF8=m CONFIG_DLM=m -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO_DWARF4=y CONFIG_GDB_SCRIPTS=y
arch/s390/configs/performance_defconfig +1 -1
@@ -556,7 +556,7 @@ CONFIG_NLS_ISO8859_1=m CONFIG_NLS_ISO8859_15=m CONFIG_NLS_UTF8=m CONFIG_DLM=m -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO_DWARF4=y CONFIG_GDB_SCRIPTS=y
arch/s390/configs/zfcpdump_defconfig +1 -1
@@ -57,7 +57,7 @@ CONFIG_RAW_DRIVER=y CONFIG_CONFIGFS_FS=y # CONFIG_MISC_FILESYSTEMS is not set # CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_KERNEL=y CONFIG_PANIC_ON_OOPS=y
arch/sh/configs/edosk7760_defconfig +1 -1
@@ -109,7 +109,7 @@ CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_15=y CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_MAGIC_SYSRQ=y CONFIG_UNUSED_SYMBOLS=y
arch/sh/configs/sdk7786_defconfig +1 -1
@@ -215,7 +215,7 @@ CONFIG_NLS_ASCII=m CONFIG_NLS_ISO8859_1=y CONFIG_NLS_ISO8859_15=m CONFIG_NLS_UTF8=m -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_MAGIC_SYSRQ=y
arch/sh/configs/se7722_defconfig +1 -1
@@ -53,7 +53,7 @@ CONFIG_EXT3_FS=y CONFIG_PROC_KCORE=y CONFIG_TMPFS=y CONFIG_HUGETLBFS=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_FS=y
arch/sh/configs/sh7785lcr_32bit_defconfig +1 -1
@@ -144,7 +144,7 @@ CONFIG_NFSD_V3=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_CODEPAGE_932=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_KERNEL=y
arch/sh/configs/urquell_defconfig +1 -1
@@ -142,7 +142,7 @@ CONFIG_ROOT_NFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_CODEPAGE_932=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y # CONFIG_ENABLE_WARN_DEPRECATED is not set # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_DEBUG_FS=y
arch/sparc/configs/sparc64_defconfig +1 -1
@@ -200,7 +200,7 @@ CONFIG_EXT3_FS_SECURITY=y CONFIG_PROC_KCORE=y CONFIG_TMPFS=y CONFIG_HUGETLBFS=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y # CONFIG_ENABLE_WARN_DEPRECATED is not set CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_KERNEL=y
arch/x86/configs/i386_defconfig +1 -1
@@ -284,7 +284,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y # CONFIG_ENABLE_WARN_DEPRECATED is not set CONFIG_FRAME_WARN=1024 CONFIG_MAGIC_SYSRQ=y
arch/x86/configs/x86_64_defconfig +1 -1
@@ -283,7 +283,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y # CONFIG_ENABLE_WARN_DEPRECATED is not set CONFIG_MAGIC_SYSRQ=y # CONFIG_UNUSED_SYMBOLS is not set
arch/xtensa/configs/audio_kc705_defconfig +1 -1
@@ -123,7 +123,7 @@ CONFIG_ROOT_NFS=y CONFIG_SUNRPC_DEBUG=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DYNAMIC_DEBUG=y CONFIG_DEBUG_INFO=y CONFIG_MAGIC_SYSRQ=y
arch/xtensa/configs/cadence_csp_defconfig +1 -1
@@ -102,7 +102,7 @@ CONFIG_ROOT_NFS=y CONFIG_SUNRPC_DEBUG=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DYNAMIC_DEBUG=y CONFIG_DEBUG_INFO=y CONFIG_MAGIC_SYSRQ=y
arch/xtensa/configs/generic_kc705_defconfig +1 -1
@@ -110,7 +110,7 @@ CONFIG_ROOT_NFS=y CONFIG_SUNRPC_DEBUG=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DYNAMIC_DEBUG=y CONFIG_DEBUG_INFO=y CONFIG_MAGIC_SYSRQ=y
arch/xtensa/configs/nommu_kc705_defconfig +1 -1
@@ -107,7 +107,7 @@ CONFIG_ROOT_NFS=y CONFIG_SUNRPC_DEBUG=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DYNAMIC_DEBUG=y CONFIG_DEBUG_INFO=y # CONFIG_FRAME_POINTER is not set
arch/xtensa/configs/smp_lx200_defconfig +1 -1
@@ -114,7 +114,7 @@ CONFIG_ROOT_NFS=y CONFIG_SUNRPC_DEBUG=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DYNAMIC_DEBUG=y CONFIG_DEBUG_INFO=y CONFIG_MAGIC_SYSRQ=y
include/linux/timekeeping.h +2 -0
@@ -239,6 +239,8 @@ static inline u64 ktime_get_raw_ns(void)extern u64 ktime_get_mono_fast_ns (void );extern u64 ktime_get_raw_fast_ns (void );extern u64 ktime_get_boot_fast_ns (void ); +extern u64 ktime_get_real_log_ts (u64 *offset_real); +extern u64 ktime_get_boot_log_ts (void );/* * Timespec interfaces utilizing the ktime based ones
kernel/printk/printk.c +117 -4
157 lines not on this page · raw message
kernel/time/timekeeping.c +22 -0
@@ -25,6 +25,7 @@#include <linux/stop_machine.h> #include <linux/pvclock_gtod.h> #include <linux/compiler.h> +#include <linux/sched/clock.h> #include "tick-internal.h" #include "ntp_internal.h"
@@ -45,6 +46,7 @@static DEFINE_RAW_SPINLOCK (timekeeper_lock);static struct timekeeper shadow_timekeeper; +static int timekeeping_active;/** * struct tk_fast - NMI safe timekeeper
@@ -477,6 +479,24 @@ u64 notrace ktime_get_boot_fast_ns(void) }EXPORT_SYMBOL_GPL (ktime_get_boot_fast_ns); +u64 ktime_get_real_log_ts (u64 *offset_real) +{ + *offset_real =ktime_to_ns (tk_core.timekeeper.offs_real); + +if (timekeeping_active) +return ktime_get_mono_fast_ns (); +else +return local_clock (); +} + +u64 ktime_get_boot_log_ts (void ) +{ +if (timekeeping_active) +return ktime_get_boot_fast_ns (); +else +return local_clock (); +} +/* Suspend-time cycles value for halted fast timekeeper. */ static u64 cycles_at_suspend;
@@ -1530,6 +1550,8 @@ void __init timekeeping_init(void)write_seqcount_end (&tk_core.seq);raw_spin_unlock_irqrestore (&timekeeper_lock, flags); + + timekeeping_active =1 ; }/* time in seconds when suspend began for persistent clock */
lib/Kconfig.debug +41 -2
56 lines not on this page · raw message
tools/testing/selftests/rcutorture/configs/lock/CFcommon +1 -1
@@ -1,2 +1,2 @@ CONFIG_LOCK_TORTURE_TEST=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y
tools/testing/selftests/rcutorture/configs/rcu/CFcommon +1 -1
@@ -1,2 +1,2 @@ CONFIG_RCU_TORTURE_TEST=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y
tools/testing/selftests/rcutorture/configs/rcuperf/CFcommon +1 -1
@@ -1,2 +1,2 @@ CONFIG_RCU_PERF_TEST=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y
Signature · 1 line
1.8.5.5
Quoted 133 lines · Prarit Bhargava
printk.time=1/CONFIG_PRINTK_TIME=1 adds a unmodified local hardware clock timestamp to printk messages. The local hardware clock loses time each day making it difficult to determine exactly when an issue has occurred in the kernel log, and making it difficult to determine how kernel and hardware issues relate to each other in real time.
Make printk output different timestampes by adding options for no timestamp, the local hardware clock, the monotonic clock, the boottime clock, and the real clock. Allow a user to pick one of the clocks by using the printk.time kernel parameter. Output the type of clock in
/sys/module/printk/parameters/timeso userspace programs can interpret the timestamp.Real clock & 32-bit systems: Selecting the real clock printk timestamp may lead to unlikely situations where a timestamp is wrong because the real time offset is read without the protection of a sequence lock in the call to
ktime_get_log_ts()inprintk_get_ts().v2: Use peterz's suggested
Kconfigoptions. Merge patchset together. Fix i386 !CONFIG_PRINTK builds.v3: Fixed
x86_64_defconfig. Addedprintk_time_typeenum andprintk_time_strfor better output. Added BOOTTIME clock functionality.v4: Fix messages, add additional printk.time options, and fix configs.
Signed-off-by Prarit Bhargava <[email protected]>Cc Mark Salyzyn <[email protected]>Cc Jonathan Corbet <[email protected]>Cc Petr Mladek <[email protected]>Cc Sergey Senozhatsky <[email protected]>Cc Steven Rostedt <[email protected]>Cc John Stultz <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Stephen Boyd <[email protected]>Cc Andrew Morton <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc "Paul E. McKenney" <[email protected]>Cc Christoffer Dall <[email protected]>Cc Deepa Dinamani <[email protected]>Cc Ingo Molnar <[email protected]>Cc Joel Fernandes <[email protected]>Cc Prarit Bhargava <[email protected]>Cc Kees Cook <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Geert Uytterhoeven <[email protected]>Cc "Luis R. Rodriguez" <[email protected]>Cc Nicholas Piggin <[email protected]>Cc "Jason A. Donenfeld" <[email protected]>Cc Olof Johansson <[email protected]>Cc Josh Poimboeuf <[email protected]>--- Documentation/admin-guide/kernel-parameters.txt | 6 +- arch/arm/configs/aspeed_g4_defconfig | 2 +- arch/arm/configs/aspeed_g5_defconfig | 2 +- arch/arm/configs/axm55xx_defconfig | 2 +- arch/arm/configs/bcm2835_defconfig | 2 +- arch/arm/configs/colibri_pxa270_defconfig | 2 +- arch/arm/configs/colibri_pxa300_defconfig | 2 +- arch/arm/configs/dove_defconfig | 2 +- arch/arm/configs/efm32_defconfig | 2 +- arch/arm/configs/exynos_defconfig | 2 +- arch/arm/configs/ezx_defconfig | 2 +- arch/arm/configs/h5000_defconfig | 2 +- arch/arm/configs/hisi_defconfig | 2 +- arch/arm/configs/imote2_defconfig | 2 +- arch/arm/configs/imx_v6_v7_defconfig | 2 +- arch/arm/configs/keystone_defconfig | 2 +- arch/arm/configs/lpc18xx_defconfig | 2 +- arch/arm/configs/magician_defconfig | 2 +- arch/arm/configs/mmp2_defconfig | 2 +- arch/arm/configs/moxart_defconfig | 2 +- arch/arm/configs/mps2_defconfig | 2 +- arch/arm/configs/multi_v7_defconfig | 2 +- arch/arm/configs/mvebu_v7_defconfig | 2 +- arch/arm/configs/mxs_defconfig | 2 +- arch/arm/configs/omap2plus_defconfig | 2 +- arch/arm/configs/pxa168_defconfig | 2 +- arch/arm/configs/pxa3xx_defconfig | 2 +- arch/arm/configs/pxa910_defconfig | 2 +- arch/arm/configs/pxa_defconfig | 2 +- arch/arm/configs/qcom_defconfig | 2 +- arch/arm/configs/raumfeld_defconfig | 2 +- arch/arm/configs/shmobile_defconfig | 2 +- arch/arm/configs/socfpga_defconfig | 2 +- arch/arm/configs/stm32_defconfig | 2 +- arch/arm/configs/sunxi_defconfig | 2 +- arch/arm/configs/tango4_defconfig | 2 +- arch/arm/configs/tegra_defconfig | 2 +- arch/arm/configs/u300_defconfig | 2 +- arch/arm/configs/u8500_defconfig | 2 +- arch/arm/configs/vt8500_v6_v7_defconfig | 2 +- arch/arm/configs/xcep_defconfig | 2 +- arch/arm/configs/zx_defconfig | 2 +- arch/arm64/configs/defconfig | 2 +- arch/m68k/configs/amcore_defconfig | 2 +- arch/mips/configs/ath25_defconfig | 2 +- arch/mips/configs/bcm47xx_defconfig | 2 +- arch/mips/configs/bmips_be_defconfig | 2 +- arch/mips/configs/bmips_stb_defconfig | 2 +- arch/mips/configs/ci20_defconfig | 2 +- arch/mips/configs/generic_defconfig | 2 +- arch/mips/configs/lemote2f_defconfig | 2 +- arch/mips/configs/loongson3_defconfig | 2 +- arch/mips/configs/nlm_xlp_defconfig | 2 +- arch/mips/configs/nlm_xlr_defconfig | 2 +- arch/mips/configs/pistachio_defconfig | 2 +- arch/mips/configs/qi_lb60_defconfig | 2 +- arch/mips/configs/rt305x_defconfig | 2 +- arch/mips/configs/xway_defconfig | 2 +- arch/parisc/configs/generic-64bit_defconfig | 2 +- arch/powerpc/configs/40x/virtex_defconfig | 2 +- arch/powerpc/configs/44x/fsp2_defconfig | 2 +- arch/powerpc/configs/44x/virtex5_defconfig | 2 +- arch/powerpc/configs/44x/warp_defconfig | 2 +- arch/powerpc/configs/52xx/cm5200_defconfig | 2 +- arch/powerpc/configs/52xx/lite5200b_defconfig | 2 +- arch/powerpc/configs/52xx/motionpro_defconfig | 2 +- arch/powerpc/configs/52xx/tqm5200_defconfig | 2 +- arch/powerpc/configs/gamecube_defconfig | 2 +- arch/powerpc/configs/mpc5200_defconfig | 2 +- arch/powerpc/configs/pasemi_defconfig | 2 +- arch/powerpc/configs/wii_defconfig | 2 +- arch/s390/configs/default_defconfig | 2 +- arch/s390/configs/gcov_defconfig | 2 +- arch/s390/configs/performance_defconfig | 2 +- arch/s390/configs/zfcpdump_defconfig | 2 +- arch/sh/configs/edosk7760_defconfig | 2 +- arch/sh/configs/sdk7786_defconfig | 2 +- arch/sh/configs/se7722_defconfig | 2 +- arch/sh/configs/sh7785lcr_32bit_defconfig | 2 +- arch/sh/configs/urquell_defconfig | 2 +-
Quoted 8 lines
arch/sparc/configs/sparc64_defconfig | 2 +- arch/x86/configs/i386_defconfig | 2 +- arch/x86/configs/x86_64_defconfig | 2 +- arch/xtensa/configs/audio_kc705_defconfig | 2 +- arch/xtensa/configs/cadence_csp_defconfig | 2 +- arch/xtensa/configs/generic_kc705_defconfig | 2 +- arch/xtensa/configs/nommu_kc705_defconfig | 2 +- arch/xtensa/configs/smp_lx200_defconfig | 2 +-
Still not quite following why you're updating all the defconfigs. I'd make sure the Kconfig default settings are right, and leave updating the defconfig to arch/device maintainers. It adds a lot of noise to the patch.
Quoted 7 lines
kernel/time/timekeeping.c +7
-0+u64 ktime_get_real_log_ts (u64 *offset_real) +{ + *offset_real =ktime_to_ns (tk_core.timekeeper.offs_real); + +if (timekeeping_active) +return ktime_get_mono_fast_ns (); +else
kernel/time/timekeeping.c u64 notrace ktime_get_boot_fast_ns(void) · line 498
Quoted 10 lines
kernel/time/timekeeping.c +10
-0+return local_clock (); +} + +u64 ktime_get_boot_log_ts (void ) +{ +if (timekeeping_active) +return ktime_get_boot_fast_ns (); +else +return local_clock (); +}
This feels a little tacked on and duplicative. I'd suggest having one function that returns the offset_real and offset_boot or have a
separate get_mono_log_ts() so its at least consistent. Additionally,
in the commit message, you call out the lack of locking between grabing the offs_real and calling get_mono_fast_ns(), but I worry it may be particularly problematic on 32bit systems, and you don't have any notes in the actual code about it (it looks like an oversight).
Also, when timekeeping_active flips over, and we change from local clock to the specified clock, do we see a discontinuity in the log? I know folks use to gripe about that back in the day.
thanks
-john
Quoted 27 lines · John Stultz
Quoted 7 lines · Prarit Bhargava
(quoted diff) +7
-0+u64 ktime_get_real_log_ts(u64 *offset_real) +{ + *offset_real = ktime_to_ns(tk_core.timekeeper.offs_real); + + if (timekeeping_active) + return ktime_get_mono_fast_ns(); + elseReview
Quoted 10 lines
(quoted diff) +10
-0+ return local_clock(); +} + +u64 ktime_get_boot_log_ts(void) +{ + if (timekeeping_active) + return ktime_get_boot_fast_ns(); + else + return local_clock(); +}This feels a little tacked on and duplicative. I'd suggest having one function that returns the
offset_realandoffset_bootor have a
separateget_mono_log_ts()so its at least consistent. Additionally,
in the commit message, you call out the lack of locking between grabing theoffs_realand callingget_mono_fast_ns(), but I worry it may be particularly problematic on 32bit systems, and you don't have any notes in the actual code about it (it looks like an oversight).
Quoted 3 lines
Also, when
timekeeping_activeflips over, and we change from local clock to the specified clock, do we see a discontinuity in the log? I know folks use to gripe about that back in the day.
Yeah, yuck, this smells. Please don't mix clocks like this.
I expect all you want is to avoid the explosion you get from calling the fast things too early, right? Please use the below, which should result in it returning 0.
--- kernel/time/timekeeping.c | 47 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 14 deletions(-)
kernel/time/timekeeping.c +33 -14
@@ -60,8 +60,39 @@ struct tk_fast {struct tk_read_base base[2 ]; }; -static struct tk_fast tk_fast_mono____cacheline_aligned ; -static struct tk_fast tk_fast_raw____cacheline_aligned ; +/* Suspend-time cycles value for halted fast timekeeper. */ +static u64 cycles_at_suspend; + +static u64 dummy_clock_read (struct clocksource *cs) +{ +return cycles_at_suspend; +} + +static struct clocksource dummy_clock = { + .read = dummy_clock_read, +}; + +static struct tk_fast tk_fast_mono____cacheline_aligned = { + .base = { + (struct tk_read_base ){ + .clock = &dummy_clock, + }, + (struct tk_read_base ){ + .clock = &dummy_clock, + }, + }, +}; + +static struct tk_fast tk_fast_raw____cacheline_aligned = { + .base = { + (struct tk_read_base ){ + .clock = &dummy_clock, + }, + (struct tk_read_base ){ + .clock = &dummy_clock, + }, + }, +};/* flag for if timekeeping is suspended */ int __read_mostly timekeeping_suspended;
@@ -477,18 +508,6 @@ u64 notrace ktime_get_boot_fast_ns(void) }EXPORT_SYMBOL_GPL (ktime_get_boot_fast_ns); -/* Suspend-time cycles value for halted fast timekeeper. */ -static u64 cycles_at_suspend; - -static u64 dummy_clock_read (struct clocksource *cs) -{ -return cycles_at_suspend; -} - -static struct clocksource dummy_clock = { - .read = dummy_clock_read, -}; -/** * halt_fast_timekeeper - Prevent fast timekeeper from accessing clocksource. * @tk: Timekeeper to snapshot.
Quoted 143 lines · John Stultz
Quoted 133 lines · Prarit Bhargava
printk.time=1/CONFIG_PRINTK_TIME=1 adds a unmodified local hardware clock timestamp to printk messages. The local hardware clock loses time each day making it difficult to determine exactly when an issue has occurred in the kernel log, and making it difficult to determine how kernel and hardware issues relate to each other in real time.
Make printk output different timestampes by adding options for no timestamp, the local hardware clock, the monotonic clock, the boottime clock, and the real clock. Allow a user to pick one of the clocks by using the printk.time kernel parameter. Output the type of clock in
/sys/module/printk/parameters/timeso userspace programs can interpret the timestamp.Real clock & 32-bit systems: Selecting the real clock printk timestamp may lead to unlikely situations where a timestamp is wrong because the real time offset is read without the protection of a sequence lock in the call to
ktime_get_log_ts()inprintk_get_ts().v2: Use peterz's suggested
Kconfigoptions. Merge patchset together. Fix i386 !CONFIG_PRINTK builds.v3: Fixed
x86_64_defconfig. Addedprintk_time_typeenum andprintk_time_strfor better output. Added BOOTTIME clock functionality.v4: Fix messages, add additional printk.time options, and fix configs.
Signed-off-by Prarit Bhargava <[email protected]>Cc Mark Salyzyn <[email protected]>Cc Jonathan Corbet <[email protected]>Cc Petr Mladek <[email protected]>Cc Sergey Senozhatsky <[email protected]>Cc Steven Rostedt <[email protected]>Cc John Stultz <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Stephen Boyd <[email protected]>Cc Andrew Morton <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc "Paul E. McKenney" <[email protected]>Cc Christoffer Dall <[email protected]>Cc Deepa Dinamani <[email protected]>Cc Ingo Molnar <[email protected]>Cc Joel Fernandes <[email protected]>Cc Prarit Bhargava <[email protected]>Cc Kees Cook <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Geert Uytterhoeven <[email protected]>Cc "Luis R. Rodriguez" <[email protected]>Cc Nicholas Piggin <[email protected]>Cc "Jason A. Donenfeld" <[email protected]>Cc Olof Johansson <[email protected]>Cc Josh Poimboeuf <[email protected]>--- Documentation/admin-guide/kernel-parameters.txt | 6 +- arch/arm/configs/aspeed_g4_defconfig | 2 +- arch/arm/configs/aspeed_g5_defconfig | 2 +- arch/arm/configs/axm55xx_defconfig | 2 +- arch/arm/configs/bcm2835_defconfig | 2 +- arch/arm/configs/colibri_pxa270_defconfig | 2 +- arch/arm/configs/colibri_pxa300_defconfig | 2 +- arch/arm/configs/dove_defconfig | 2 +- arch/arm/configs/efm32_defconfig | 2 +- arch/arm/configs/exynos_defconfig | 2 +- arch/arm/configs/ezx_defconfig | 2 +- arch/arm/configs/h5000_defconfig | 2 +- arch/arm/configs/hisi_defconfig | 2 +- arch/arm/configs/imote2_defconfig | 2 +- arch/arm/configs/imx_v6_v7_defconfig | 2 +- arch/arm/configs/keystone_defconfig | 2 +- arch/arm/configs/lpc18xx_defconfig | 2 +- arch/arm/configs/magician_defconfig | 2 +- arch/arm/configs/mmp2_defconfig | 2 +- arch/arm/configs/moxart_defconfig | 2 +- arch/arm/configs/mps2_defconfig | 2 +- arch/arm/configs/multi_v7_defconfig | 2 +- arch/arm/configs/mvebu_v7_defconfig | 2 +- arch/arm/configs/mxs_defconfig | 2 +- arch/arm/configs/omap2plus_defconfig | 2 +- arch/arm/configs/pxa168_defconfig | 2 +- arch/arm/configs/pxa3xx_defconfig | 2 +- arch/arm/configs/pxa910_defconfig | 2 +- arch/arm/configs/pxa_defconfig | 2 +- arch/arm/configs/qcom_defconfig | 2 +- arch/arm/configs/raumfeld_defconfig | 2 +- arch/arm/configs/shmobile_defconfig | 2 +- arch/arm/configs/socfpga_defconfig | 2 +- arch/arm/configs/stm32_defconfig | 2 +- arch/arm/configs/sunxi_defconfig | 2 +- arch/arm/configs/tango4_defconfig | 2 +- arch/arm/configs/tegra_defconfig | 2 +- arch/arm/configs/u300_defconfig | 2 +- arch/arm/configs/u8500_defconfig | 2 +- arch/arm/configs/vt8500_v6_v7_defconfig | 2 +- arch/arm/configs/xcep_defconfig | 2 +- arch/arm/configs/zx_defconfig | 2 +- arch/arm64/configs/defconfig | 2 +- arch/m68k/configs/amcore_defconfig | 2 +- arch/mips/configs/ath25_defconfig | 2 +- arch/mips/configs/bcm47xx_defconfig | 2 +- arch/mips/configs/bmips_be_defconfig | 2 +- arch/mips/configs/bmips_stb_defconfig | 2 +- arch/mips/configs/ci20_defconfig | 2 +- arch/mips/configs/generic_defconfig | 2 +- arch/mips/configs/lemote2f_defconfig | 2 +- arch/mips/configs/loongson3_defconfig | 2 +- arch/mips/configs/nlm_xlp_defconfig | 2 +- arch/mips/configs/nlm_xlr_defconfig | 2 +- arch/mips/configs/pistachio_defconfig | 2 +- arch/mips/configs/qi_lb60_defconfig | 2 +- arch/mips/configs/rt305x_defconfig | 2 +- arch/mips/configs/xway_defconfig | 2 +- arch/parisc/configs/generic-64bit_defconfig | 2 +- arch/powerpc/configs/40x/virtex_defconfig | 2 +- arch/powerpc/configs/44x/fsp2_defconfig | 2 +- arch/powerpc/configs/44x/virtex5_defconfig | 2 +- arch/powerpc/configs/44x/warp_defconfig | 2 +- arch/powerpc/configs/52xx/cm5200_defconfig | 2 +- arch/powerpc/configs/52xx/lite5200b_defconfig | 2 +- arch/powerpc/configs/52xx/motionpro_defconfig | 2 +- arch/powerpc/configs/52xx/tqm5200_defconfig | 2 +- arch/powerpc/configs/gamecube_defconfig | 2 +- arch/powerpc/configs/mpc5200_defconfig | 2 +- arch/powerpc/configs/pasemi_defconfig | 2 +- arch/powerpc/configs/wii_defconfig | 2 +- arch/s390/configs/default_defconfig | 2 +- arch/s390/configs/gcov_defconfig | 2 +- arch/s390/configs/performance_defconfig | 2 +- arch/s390/configs/zfcpdump_defconfig | 2 +- arch/sh/configs/edosk7760_defconfig | 2 +- arch/sh/configs/sdk7786_defconfig | 2 +- arch/sh/configs/se7722_defconfig | 2 +- arch/sh/configs/sh7785lcr_32bit_defconfig | 2 +- arch/sh/configs/urquell_defconfig | 2 +-Quoted 8 lines
arch/sparc/configs/sparc64_defconfig | 2 +- arch/x86/configs/i386_defconfig | 2 +- arch/x86/configs/x86_64_defconfig | 2 +- arch/xtensa/configs/audio_kc705_defconfig | 2 +- arch/xtensa/configs/cadence_csp_defconfig | 2 +- arch/xtensa/configs/generic_kc705_defconfig | 2 +- arch/xtensa/configs/nommu_kc705_defconfig | 2 +- arch/xtensa/configs/smp_lx200_defconfig | 2 +-
Quoted 4 lines
Still not quite following why you're updating all the defconfigs. I'd make sure the
Kconfigdefault settings are right, and leave updating the defconfig toarch/devicemaintainers. It adds a lot of noise to the patch.
Hmm ... I thought it was up to the patch submitter to make sure that 'make defconfig' still worked? Are you sure I can leave that broken?
/me *really* doesn't want to get yelled at by every arch maintainer.
Quoted 15 lines
Quoted 15 lines
kernel/time/timekeeping.c +13
-0+u64 ktime_get_real_log_ts (u64 *offset_real) +{ + *offset_real =ktime_to_ns (tk_core.timekeeper.offs_real); + +if (timekeeping_active) +return ktime_get_mono_fast_ns (); +else +return local_clock (); +} + +u64 ktime_get_boot_log_ts (void ) +{ +if (timekeeping_active)
Quoted 8 lines
kernel/time/timekeeping.c u64 notrace ktime_get_boot_fast_ns(void) · line 498
Quoted 4 lines
kernel/time/timekeeping.c +4
-0+return ktime_get_boot_fast_ns (); + else + return local_clock(); +}This feels a little tacked on and duplicative. I'd suggest having one function that returns the
offset_realandoffset_bootor have a separateget_mono_log_ts()so its at least consistent.
I have a better suggestion that I was toying with -- exporting timekeeping_active and using the existing ktime_get_mono|boot|real|_fast_ns() functions with a function pointer would simplify this code.
Quoted 6 lines
Additionally,
in the commit message, you call out the lack of locking between grabing theoffs_realand callingget_mono_fast_ns(), but I worry it may be particularly problematic on 32bit systems, and you don't have any notes in the actual code about it (it looks like an oversight).
I was told to move that comment to the kdoc description by Luis R. Rodriguez.
Quoted 4 lines
Also, when
timekeeping_activeflips over, and we change from local clock to the specified clock, do we see a discontinuity in the log? I know folks use to gripe about that back in the day.
I have tested this across many systems and haven't seen a discontinunity yet. I've done both large and small cpu footprint systems and haven't seen anything like that.
P.
Quoted 3 lines
thanks
-john
Quoted 10 lines · Prarit Bhargava
Quoted 4 lines · John Stultz
Still not quite following why you're updating all the defconfigs. I'd make sure the
Kconfigdefault settings are right, and leave updating the defconfig toarch/devicemaintainers. It adds a lot of noise to the patch.Hmm ... I thought it was up to the patch submitter to make sure that 'make defconfig' still worked? Are you sure I can leave that broken?
/me *really* doesn't want to get yelled at by every arch maintainer.
No. Don't break systems, but at the same time, can't you use the default value in Kconfig to set it properly so the old defconfig settings don't really matter?
Apologies if I've not followed the issue properly, but it is odd, as I'm not sure I can think of a patch I've seen before that had so much defconfig noise in it. Again, I've not looked into it closely, so it may just be my own ignorance, but it makes me suspect there is a better way.
Quoted 22 lines
Quoted 13 lines
Quoted 13 lines
kernel/time/timekeeping.c +13
-0+u64 ktime_get_real_log_ts (u64 *offset_real) +{ + *offset_real =ktime_to_ns (tk_core.timekeeper.offs_real); + +if (timekeeping_active) +return ktime_get_mono_fast_ns (); +else +return local_clock (); +} + +u64 ktime_get_boot_log_ts (void ) +{ +if (timekeeping_active)Quoted 8 lines
kernel/time/timekeeping.c u64 notrace ktime_get_boot_fast_ns(void) · line 498
Quoted 4 lines
kernel/time/timekeeping.c +4
-0+return ktime_get_boot_fast_ns (); + else + return local_clock(); +}This feels a little tacked on and duplicative. I'd suggest having one function that returns the
offset_realandoffset_bootor have a separateget_mono_log_ts()so its at least consistent.
Quoted 3 lines
I have a better suggestion that I was toying with -- exporting
timekeeping_activeand using the existing ktime_get_mono|boot|real|_fast_ns() functions with a function pointer would simplify this code.
Yea. That sounds cleaner.
Quoted 8 lines
Quoted 6 lines
Additionally,
in the commit message, you call out the lack of locking between grabing theoffs_realand callingget_mono_fast_ns(), but I worry it may be particularly problematic on 32bit systems, and you don't have any notes in the actual code about it (it looks like an oversight).I was told to move that comment to the kdoc description by Luis R. Rodriguez.
You can have it both ways. :) Its just without any mention near the function, it just looks buggy (well, because it technically is), so either we should fix it properly or at least document that its intentionally buggy (which again, doesn't feel great here - we already have lots of caveats around the _fast_ns() accessors, so this is layering subtle breakage on top of other subtle behavior).
Quoted 8 lines
Quoted 4 lines
Also, when
timekeeping_activeflips over, and we change from local clock to the specified clock, do we see a discontinuity in the log? I know folks use to gripe about that back in the day.I have tested this across many systems and haven't seen a discontinunity yet. I've done both large and small cpu footprint systems and haven't seen anything like that.
Ok.
thanks
-john
Quoted 16 lines · John Stultz
Quoted 10 lines · Prarit Bhargava
Quoted 4 lines · John Stultz
Still not quite following why you're updating all the defconfigs. I'd make sure the
Kconfigdefault settings are right, and leave updating the defconfig toarch/devicemaintainers. It adds a lot of noise to the patch.Hmm ... I thought it was up to the patch submitter to make sure that 'make defconfig' still worked? Are you sure I can leave that broken?
/me *really* doesn't want to get yelled at by every arch maintainer.
No. Don't break systems, but at the same time, can't you use the default value in
Kconfigto set it properly so the old defconfig settings don't really matter?
Quoted 6 lines
Apologies if I've not followed the issue properly, but it is odd, as I'm not sure I can think of a patch I've seen before that had so much defconfig noise in it. Again, I've not looked into it closely, so it may just be my own ignorance, but it makes me suspect there is a better way.
peterz? Want to offer a suggestion? The issue is that I'm changing a bool config option to an int and that impacts all the arch's defconfigs. John points out that this is a lot of churn and we're both wondering if there's a better way to do the configs.
P.
Quoted 26 lines · Prarit Bhargava
Quoted 16 lines · John Stultz
Quoted 10 lines · Prarit Bhargava
Quoted 4 lines · John Stultz
Still not quite following why you're updating all the defconfigs. I'd make sure the
Kconfigdefault settings are right, and leave updating the defconfig toarch/devicemaintainers. It adds a lot of noise to the patch.Hmm ... I thought it was up to the patch submitter to make sure that 'make defconfig' still worked? Are you sure I can leave that broken?
/me *really* doesn't want to get yelled at by every arch maintainer.
No. Don't break systems, but at the same time, can't you use the default value in
Kconfigto set it properly so the old defconfig settings don't really matter?Quoted 6 lines
Apologies if I've not followed the issue properly, but it is odd, as I'm not sure I can think of a patch I've seen before that had so much defconfig noise in it. Again, I've not looked into it closely, so it may just be my own ignorance, but it makes me suspect there is a better way.
Quoted 4 lines
peterz? Want to offer a suggestion? The issue is that I'm changing a bool config option to an int and that impacts all the arch's defconfigs. John points out that this is a lot of churn and we're both wondering if there's a better way to do the configs.
The usual approach is to keep the old bool Kconfig option, and add another int Kconfig option that depends on the original one. The tests for the int value get a bit more complex, but one way to handle this is to define a cpp macro something like the following:
#ifdef CONFIG_OLD_OPTION
#define CPP_NEW_OPTION 0
#else
#define CPP_NEW_OPTION CONFIG_NEW_OPTION
#endif
Then use CPP_NEW_OPTION, where zero means disabled and other numbers select the available options.
Adjust to suit depending on what values mean what.
Another approach is to make the range of the new Kconfig option depend on the old option:
config NEW_OPTION
int "your description here"
range 1 5 if OLD_OPTION
range 0 0 if !OLD_OPTION
default 0
help
your help here
Again, adjust to suit depending on what values mean what.
Thanx, Paul
Quoted 34 lines · Paul E. McKenney
Quoted 4 lines · Prarit Bhargava
peterz? Want to offer a suggestion? The issue is that I'm changing a bool config option to an int and that impacts all the arch's defconfigs. John points out that this is a lot of churn and we're both wondering if there's a better way to do the configs.
The usual approach is to keep the old bool
Kconfigoption, and add another intKconfigoption that depends on the original one. The tests for the int value get a bit more complex, but one way to handle this is to define a cpp macro something like the following:#ifdef
CONFIG_OLD_OPTION
#defineCPP_NEW_OPTION0
#else
#defineCPP_NEW_OPTIONCONFIG_NEW_OPTION
#endifThen use
CPP_NEW_OPTION, where zero means disabled and other numbers select the available options.Adjust to suit depending on what values mean what.
Another approach is to make the range of the new
Kconfigoption depend on the old option:config
NEW_OPTION
int "your description here"
range 1 5 ifOLD_OPTION
range 0 0 if !OLD_OPTION
default 0
help
your help here
Quoted 1 line
Again, adjust to suit depending on what values mean what.
Right this. Except I don't see the !OLD_OPTION working as expected. A 'new' config will not include the old one, so the !OLD_OPTION thing will 'always' be true.
So your:
Quoted 27 lines
lib/Kconfig.debug +24
-0@@ -1,8 +1,46 @@ menu "printk and dmesg options" +choice + prompt "printk default clock" + config PRINTK_TIME_DISABLE + bool "Disabled" + help + Selecting this option disables the time stamps of printk(). + + config PRINTK_TIME_LOCAL + bool "Local Clock" + help + Selecting this option causes the time stamps of printk() to be + stamped with the unadjusted hardware clock. + + config PRINTK_TIME_BOOT + bool "CLOCK_BOOTTIME" + help + Selecting this option causes the time stamps of printk() to be + stamped with the adjusted boottime clock. + + config PRINTK_TIME_MONO + bool "CLOCK_MONOTONIC" + help + Selecting this option causes the time stamps of printk() to be + stamped with the adjusted monotonic clock.
lib/Kconfig.debug line 36
Quoted 10 lines
lib/Kconfig.debug +9
-0+ + config PRINTK_TIME_REAL + bool "CLOCK_REALTIME" + help + Selecting this option causes the time stamps of printk() to be + stamped with the adjusted realtime clock. + +endchoice + config PRINTK_TIME
Change that into something like:
config PRINTK_CLOCK
lib/Kconfig.debug line 40
Quoted 5 lines
lib/Kconfig.debug +3
-1- bool "Show timing information on printks" + int "Show time stamp information on printks" depends on PRINTK + default 0 if PRINTK_TIME_DISABLE + default 1 if PRINTK_TIME_LOCAL
And that into:
default 1 if PRINTK_TIME_LOCAL || PRINTK_TIME
lib/Kconfig.debug line 45
Quoted 5 lines
lib/Kconfig.debug +3
-0+ default 2 if PRINTK_TIME_BOOT + default 3 if PRINTK_TIME_MONO + default 4 if PRINTK_TIME_REAL help Selecting this option causes time stamps of the printk()
Then the old PRINTK_TIME symbol will auto-convert into the new equivalent.
Quoted 96 lines · Peter Zijlstra
Quoted 34 lines · Paul E. McKenney
Quoted 4 lines · Prarit Bhargava
peterz? Want to offer a suggestion? The issue is that I'm changing a bool config option to an int and that impacts all the arch's defconfigs. John points out that this is a lot of churn and we're both wondering if there's a better way to do the configs.
The usual approach is to keep the old bool
Kconfigoption, and add another intKconfigoption that depends on the original one. The tests for the int value get a bit more complex, but one way to handle this is to define a cpp macro something like the following:#ifdef
CONFIG_OLD_OPTION
#defineCPP_NEW_OPTION0
#else
#defineCPP_NEW_OPTIONCONFIG_NEW_OPTION
#endifThen use
CPP_NEW_OPTION, where zero means disabled and other numbers select the available options.Adjust to suit depending on what values mean what.
Another approach is to make the range of the new
Kconfigoption depend on the old option:config
NEW_OPTION
int "your description here"
range 1 5 ifOLD_OPTION
range 0 0 if !OLD_OPTION
default 0
help
your help hereQuoted 1 line
Again, adjust to suit depending on what values mean what.
Right this. Except I don't see the !OLD_OPTION working as expected. A 'new' config will not include the old one, so the !OLD_OPTION thing will 'always' be true.
So your:
Quoted 27 lines
(quoted diff) +24
-0@@ -1,8 +1,46 @@ menu "printk and dmesg options" +choice + prompt "printk default clock" + config PRINTK_TIME_DISABLE + bool "Disabled" + help + Selecting this option disables the time stamps of printk(). + + config PRINTK_TIME_LOCAL + bool "Local Clock" + help + Selecting this option causes the time stamps of printk() to be + stamped with the unadjusted hardware clock. + + config PRINTK_TIME_BOOT + bool "CLOCK_BOOTTIME" + help + Selecting this option causes the time stamps of printk() to be + stamped with the adjusted boottime clock. + + config PRINTK_TIME_MONO + bool "CLOCK_MONOTONIC" + help + Selecting this option causes the time stamps of printk() to be + stamped with the adjusted monotonic clock.Review line 36
Quoted 10 lines
(quoted diff) +9
-0+ + config PRINTK_TIME_REAL + bool "CLOCK_REALTIME" + help + Selecting this option causes the time stamps of printk() to be + stamped with the adjusted realtime clock. + +endchoice + config PRINTK_TIMEChange that into something like:
config
PRINTK_CLOCKReview line 40
Quoted 5 lines
(quoted diff) +3
-1- bool "Show timing information on printks" + int "Show time stamp information on printks" depends on PRINTK + default 0 if PRINTK_TIME_DISABLE + default 1 if PRINTK_TIME_LOCALAnd that into:
default 1 if PRINTK_TIME_LOCAL || PRINTK_TIME
Quoted 9 lines
Review line 45
Quoted 5 lines
(quoted diff) +3
-0+ default 2 if PRINTK_TIME_BOOT + default 3 if PRINTK_TIME_MONO + default 4 if PRINTK_TIME_REAL help Selecting this option causes time stamps of the printk()Then the old
PRINTK_TIMEsymbol will auto-convert into the new equivalent.
I don't think there's an easy code way around this. Essentially this Kconfig code boils down to properly evaluating
config PRINTK_CLOCK
default 1 if PRINTK_TIME
default 0
where there is no Kconfig entry for PRINTK_TIME.
If undefined CONFIG_PRINTK_TIME is used in a config, it is immediately scrubbed by the kconfig script so it doesn't "exist" when CONFIG_PRINTK_CLOCK is evaluated. The result of that is CONFIG_PRINT_CLOCK=0.
I tried
config PRINTK_TIME
bool "old config option"
then I end up with both a CONFIG_PRINTK_CLOCK=1 and a CONFIG_PRINTK_TIME=y in the resulting config which is confusing.
I've debated using the other suggestion that Paul made but TBH (sorry Paul) it seems like I'm avoiding the real but noisy solution of
s/PRINTK_TIME=y/PRINTK_TIME=1/g
I'm obviously open to other suggestions...
P.
Quoted 130 lines · Prarit Bhargava
Quoted 96 lines · Peter Zijlstra
Quoted 34 lines · Paul E. McKenney
Quoted 4 lines · Prarit Bhargava
peterz? Want to offer a suggestion? The issue is that I'm changing a bool config option to an int and that impacts all the arch's defconfigs. John points out that this is a lot of churn and we're both wondering if there's a better way to do the configs.
The usual approach is to keep the old bool
Kconfigoption, and add another intKconfigoption that depends on the original one. The tests for the int value get a bit more complex, but one way to handle this is to define a cpp macro something like the following:#ifdef
CONFIG_OLD_OPTION
#defineCPP_NEW_OPTION0
#else
#defineCPP_NEW_OPTIONCONFIG_NEW_OPTION
#endifThen use
CPP_NEW_OPTION, where zero means disabled and other numbers select the available options.Adjust to suit depending on what values mean what.
Another approach is to make the range of the new
Kconfigoption depend on the old option:config
NEW_OPTION
int "your description here"
range 1 5 ifOLD_OPTION
range 0 0 if !OLD_OPTION
default 0
help
your help hereQuoted 1 line
Again, adjust to suit depending on what values mean what.
Right this. Except I don't see the !OLD_OPTION working as expected. A 'new' config will not include the old one, so the !OLD_OPTION thing will 'always' be true.
So your:
Quoted 27 lines
(quoted diff) +24
-0@@ -1,8 +1,46 @@ menu "printk and dmesg options" +choice + prompt "printk default clock" + config PRINTK_TIME_DISABLE + bool "Disabled" + help + Selecting this option disables the time stamps of printk(). + + config PRINTK_TIME_LOCAL + bool "Local Clock" + help + Selecting this option causes the time stamps of printk() to be + stamped with the unadjusted hardware clock. + + config PRINTK_TIME_BOOT + bool "CLOCK_BOOTTIME" + help + Selecting this option causes the time stamps of printk() to be + stamped with the adjusted boottime clock. + + config PRINTK_TIME_MONO + bool "CLOCK_MONOTONIC" + help + Selecting this option causes the time stamps of printk() to be + stamped with the adjusted monotonic clock.Review line 36
Quoted 10 lines
(quoted diff) +9
-0+ + config PRINTK_TIME_REAL + bool "CLOCK_REALTIME" + help + Selecting this option causes the time stamps of printk() to be + stamped with the adjusted realtime clock. + +endchoice + config PRINTK_TIMEChange that into something like:
config
PRINTK_CLOCKReview line 40
Quoted 5 lines
(quoted diff) +3
-1- bool "Show timing information on printks" + int "Show time stamp information on printks" depends on PRINTK + default 0 if PRINTK_TIME_DISABLE + default 1 if PRINTK_TIME_LOCALAnd that into:
default 1 if PRINTK_TIME_LOCAL || PRINTK_TIMEQuoted 9 lines
Review line 45
Quoted 5 lines
(quoted diff) +3
-0+ default 2 if PRINTK_TIME_BOOT + default 3 if PRINTK_TIME_MONO + default 4 if PRINTK_TIME_REAL help Selecting this option causes time stamps of the printk()Then the old
PRINTK_TIMEsymbol will auto-convert into the new equivalent.I don't think there's an easy code way around this. Essentially this
Kconfigcode boils down to properly evaluatingconfig
PRINTK_CLOCK
default 1 ifPRINTK_TIME
default 0where there is no
Kconfigentry forPRINTK_TIME.If undefined
CONFIG_PRINTK_TIMEis used in a config, it is immediately scrubbed by the kconfig script so it doesn't "exist" whenCONFIG_PRINTK_CLOCKis evaluated. The result of that isCONFIG_PRINT_CLOCK=0.I tried
config
PRINTK_TIME
bool "old config option"then I end up with both a
CONFIG_PRINTK_CLOCK=1and aCONFIG_PRINTK_TIME=yin the resulting config which is confusing.
Quoted 6 lines
I've debated using the other suggestion that Paul made but TBH (sorry Paul) it seems like I'm avoiding the real but noisy solution of
s/PRINTK_TIME=y/PRINTK_TIME=1/gI'm obviously open to other suggestions...
It is someone else's turn to provide a suggestion. ;-)
Thanx, Paul
arch/arm/configs/aspeed_g4_defconfig CONFIG_JFFS2_FS_XATTR=y · line 168
Quoted 13 lines · Prarit Bhargava
arch/arm/configs/aspeed_g4_defconfig +1
-1@@ -162,7 +162,7 @@ CONFIG_JFFS2_FS_XATTR=y CONFIG_UBIFS_FS=y CONFIG_SQUASHFS=y CONFIG_SQUASHFS_XZ=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DYNAMIC_DEBUG=y CONFIG_STRIP_ASM_SYMS=y CONFIG_DEBUG_FS=y
Many have had misgivings, let me try another pass at this.
We (royal we) should really look into adjusting configuration parsing to allow an easy transition from boolean to selection ... I am sure this is not the first time bistate/tristate was moved to a number.
An idea? Maybe look into a way to deal with this to use something _other_ than CONFIG_PRINTK_TIME to hold the selection, and keep a (hidden/legacy?) CONFIG_PRINTK_TIME that when selected sets CONFIG_PRINTK_TIME_LOCAL, and switch to _not_ CONFIG_PRINTK_TIME_DISABLE as the internal mechanical replacement for it. I do not know how disruptive this will be, but is worth it if the codebase supports it, and legacy config retained?
arch/arm/configs/aspeed_g4_defconfig
Quoted 10 lines
arch/arm/configs/aspeed_g4_defconfig +10
-0+ +static int printk_time_set(const char *val, const struct kernel_param *kp) +{ + char *param = strstrip((char *)val); + int _printk_time = -1; + int stamp; + + if (strlen(param) == 1) { + /* Preserve legacy boolean settings */ + if (!strcmp("0", param) || !strcmp("n", param) ||
if strlen(param) == 1, then param[0] == '0' etc works fine and is KISS.
arch/arm/configs/aspeed_g4_defconfig
Quoted 13 lines
arch/arm/configs/aspeed_g4_defconfig +13
-0+ /* + * Only allow enabling and disabling of the current printk_time + * setting. Changing it from one setting to another confuses + * userspace. + */ + if (printk_time_setting == PRINTK_TIME_DISABLE) { + printk_time_setting = _printk_time; + } else if ((printk_time_setting != _printk_time) && + (_printk_time != 0)) { + pr_warn("printk: timestamp can only be set to 0(disabled) or %s\n", + printk_time_str[printk_time_setting]); + return -EINVAL; + }
I agree with the restriction in the general case. However (as hinted at before() #ifdef CONFIG_PRINTK_TIME_RESTRICT (default y, or #ifndef CONFIG_PRINTK_TIME_DEBUG default n) around this will allow us users to choose if we are confused or not. I can see being able to change it on the fly as an option. Especially since we have /sys/module/printk/parameters/time.
-- Mark
Quoted 21 lines · Mark Salyzyn
Quoted 6 lines · Prarit Bhargava
arch/arm/configs/aspeed_g4_defconfig +0
-0arch/arm/configs/aspeed_g4_defconfig CONFIG_JFFS2_FS_XATTR=y · line 168
Quoted 8 lines
arch/arm/configs/aspeed_g4_defconfig +1
-1@@ -162,7 +162,7 @@ CONFIG_JFFS2_FS_XATTR=y CONFIG_UBIFS_FS=y CONFIG_SQUASHFS=y CONFIG_SQUASHFS_XZ=y -CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_TIME_LOCAL=y CONFIG_DYNAMIC_DEBUG=y CONFIG_STRIP_ASM_SYMS=y CONFIG_DEBUG_FS=yMany have had misgivings, let me try another pass at this.
We (royal we) should really look into adjusting configuration parsing to allow an easy transition from boolean to selection ... I am sure this is not the first time bistate/tristate was moved to a number.
Quoted 6 lines
An idea? Maybe look into a way to deal with this to use something _other_ than
CONFIG_PRINTK_TIMEto hold the selection, and keep a (hidden/legacy?)CONFIG_PRINTK_TIMEthat when selected setsCONFIG_PRINTK_TIME_LOCAL, and switch to _not_CONFIG_PRINTK_TIME_DISABLEas the internal mechanical replacement for it. I do not know how disruptive this will be, but is worth it if the codebase supports it, and legacy config retained?
I looked for one but couldn't find one. The kernel is a big place, though, and perhaps it already exists :/.
Quoted 24 lines
arch/arm/configs/aspeed_g4_defconfig
Quoted 10 lines
arch/arm/configs/aspeed_g4_defconfig +10
-0+ +static int printk_time_set(const char *val, const struct kernel_param *kp) +{ + char *param = strstrip((char *)val); + int _printk_time = -1; + int stamp; + + if (strlen(param) == 1) { + /* Preserve legacy boolean settings */ + if (!strcmp("0", param) || !strcmp("n", param) ||if strlen(param) == 1, then param[0] == '0' etc works fine and is KISS.
arch/arm/configs/aspeed_g4_defconfig
Quoted 13 lines
arch/arm/configs/aspeed_g4_defconfig +13
-0+ /* + * Only allow enabling and disabling of the current printk_time + * setting. Changing it from one setting to another confuses + * userspace. + */ + if (printk_time_setting == PRINTK_TIME_DISABLE) { + printk_time_setting = _printk_time; + } else if ((printk_time_setting != _printk_time) && + (_printk_time != 0)) { + pr_warn("printk: timestamp can only be set to 0(disabled) or %s\n", + printk_time_str[printk_time_setting]); + return -EINVAL; + }
Quoted 5 lines
I agree with the restriction in the general case. However (as hinted at
before()#ifdefCONFIG_PRINTK_TIME_RESTRICT(default y, or #ifndefCONFIG_PRINTK_TIME_DEBUGdefault n) around this will allow us users to choose if we are confused or not. I can see being able to change it on the fly as an option. Especially since we have/sys/module/printk/parameters/time.
Yeah, but I think that should be a later enhancement.
P.
Quoted 2 lines
-- Mark
Quoted 21 lines · Prarit Bhargava
kernel/printk/printk.c +17
-0+static u64 printk_get_ts (void ) +{ +u64 mono, offset_real; + +if (printk_time <=PRINTK_TIME_LOCAL ) +return local_clock (); + +if (printk_time ==PRINTK_TIME_BOOT ) +return ktime_get_boot_log_ts (); + + mono =ktime_get_real_log_ts (&offset_real); + +if (printk_time ==PRINTK_TIME_MONO ) +return mono; + +return mono + offset_real; +}static size_t print_time (u64 ts,char *buf) {
kernel/printk/printk.c static bool cont_add(int facility, int level, enum log_flags flags, const char * · line 1756
Quoted 8 lines
kernel/printk/printk.c +1
-1@@ -1643,7 +1750,7 @@ static bool cont_add(int facility, int level, enum log_flags flags, const char * cont.facility = facility; cont.level = level; cont.owner = current; - cont.ts_nsec =local_clock (); + cont.ts_nsec =printk_get_ts (); cont.flags = flags; }
So you really want to do all those branches every single time you printk() ? I know printk() is somewhat of a slow path, but shees that's ugly.
Why not have that setup function of yours set a function pointer?
On (08/07/17 11:52), Prarit Bhargava wrote:
[..]
Quoted 9 lines
kernel/printk/printk.c +9
-0+/** +* enum printk_time_type - Timestamp types for printk() messages. +* @PRINTK_TIME_DISABLE: No time stamp. +* @PRINTK_TIME_LOCAL: Local hardware clock timestamp. +* @PRINTK_TIME_BOOT: Boottime clock timestamp. +* @PRINTK_TIME_MONO: Monotonic clock timestamp. +* @PRINTK_TIME_REAL: Realtime clock timestamp. On 32-bit +* systems selecting the real clock printk timestamp may lead to unlikely +* situations where a timestamp is wrong because the real time offset is read
kernel/printk/printk.c static inline void boot_delay_msec(int level) · line 1228
Quoted 10 lines
kernel/printk/printk.c +10
-0+* without the protection of a sequence lock in the call to ktime_get_log_ts() +* in printk_get_ts() below. +*/ +enum printk_time_type { +PRINTK_TIME_DISABLE =0 , +PRINTK_TIME_LOCAL =1 , +PRINTK_TIME_BOOT =2 , +PRINTK_TIME_MONO =3 , +PRINTK_TIME_REAL =4 , +};
may be call the entire thing 'timestamp surces' or something?
[..]
Quoted 8 lines
kernel/printk/printk.c +8
-0+if (strlen (param) ==1 ) { +/* Preserve legacy boolean settings */ +if (!strcmp ("0" , param) || !strcmp ("n" , param) || + !strcmp ("N" , param)) + _printk_time =PRINTK_TIME_DISABLE ; +if (!strcmp ("1" , param) || !strcmp ("y" , param) || + !strcmp ("Y" , param)) + _printk_time =PRINTK_TIME_LOCAL ;
kernel/printk/printk.c static inline void boot_delay_msec(int level) · line 1261
Quoted 10 lines
kernel/printk/printk.c +10
-0+ } +if (_printk_time ==-1 ) { +for (stamp =0 ; stamp <=4 ; stamp++) { +if (!strncmp (printk_time_str[stamp], param, +strlen (param))) { + _printk_time = stamp; +break ; + } + } + }
you can use match_string() here.
kernel/printk/printk.c static inline void boot_delay_msec(int level) · line 1265
Quoted 4 lines
kernel/printk/printk.c +4
-0+if (_printk_time ==-1 ) { +pr_warn ("printk: invalid timestamp value %s\n" , param); +return -EINVAL ; + }
`invalid timestamp value' is confusing.
kernel/printk/printk.c static inline void boot_delay_msec(int level) · line 1277
Quoted 4 lines
kernel/printk/printk.c +4
-0+ }else if ((printk_time_setting != _printk_time) && + (_printk_time !=0 )) { +pr_warn ("printk: timestamp can only be set to 0(disabled) or %s\n" , + printk_time_str[printk_time_setting]);
ditto.
kernel/printk/printk.c static inline void boot_delay_msec(int level) · line 1282
Quoted 5 lines
kernel/printk/printk.c +5
-0+return -EINVAL ; + } + + printk_time = _printk_time; +pr_info ("printk: timestamp set to %s\n" , printk_time_str[printk_time]);
ditto.
[..]
Quoted 7 lines
kernel/printk/printk.c +7
-0+static u64 printk_get_ts (void ) +{ +u64 mono, offset_real; + +if (printk_time <=PRINTK_TIME_LOCAL ) +return local_clock (); +
kernel/printk/printk.c static inline void boot_delay_msec(int level) · line 1313
Quoted 10 lines
kernel/printk/printk.c +10
-0+if (printk_time ==PRINTK_TIME_BOOT ) +return ktime_get_boot_log_ts (); + + mono =ktime_get_real_log_ts (&offset_real); + +if (printk_time ==PRINTK_TIME_MONO ) +return mono; + +return mono + offset_real; +}
this looks hard...
kernel/printk/printk.c static size_t msg_print_text(const struct printk_log *msg, · line 1984
Quoted 2 lines
kernel/printk/printk.c +2
-0+static int printk_time; +static int printk_time_setting;
how about s/printk_time_setting/printk_time_source/? or something similar?
-ss
Quoted 15 lines · Sergey Senozhatsky
On (08/07/17 11:52), Prarit Bhargava wrote:
[..]Quoted 13 lines
kernel/printk/printk.c +13
-0+/** +* enum printk_time_type - Timestamp types for printk() messages. +* @PRINTK_TIME_DISABLE: No time stamp. +* @PRINTK_TIME_LOCAL: Local hardware clock timestamp. +* @PRINTK_TIME_BOOT: Boottime clock timestamp. +* @PRINTK_TIME_MONO: Monotonic clock timestamp. +* @PRINTK_TIME_REAL: Realtime clock timestamp. On 32-bit +* systems selecting the real clock printk timestamp may lead to unlikely +* situations where a timestamp is wrong because the real time offset is read +* without the protection of a sequence lock in the call to ktime_get_log_ts() +* in printk_get_ts() below. +*/ +enum printk_time_type {
Quoted 8 lines
kernel/printk/printk.c static inline void boot_delay_msec(int level) · line 1228
Quoted 6 lines
kernel/printk/printk.c +6
-0+PRINTK_TIME_DISABLE =0 , +PRINTK_TIME_LOCAL =1 , +PRINTK_TIME_BOOT =2 , +PRINTK_TIME_MONO =3 , + PRINTK_TIME_REAL = 4, +};may be call the entire thing 'timestamp surces' or something?
Done.
Quoted 23 lines
[..]
Quoted 8 lines
kernel/printk/printk.c +8
-0+if (strlen (param) ==1 ) { +/* Preserve legacy boolean settings */ +if (!strcmp ("0" , param) || !strcmp ("n" , param) || + !strcmp ("N" , param)) + _printk_time =PRINTK_TIME_DISABLE ; +if (!strcmp ("1" , param) || !strcmp ("y" , param) || + !strcmp ("Y" , param)) + _printk_time =PRINTK_TIME_LOCAL ;kernel/printk/printk.c static inline void boot_delay_msec(int level) · line 1261
Quoted 10 lines
kernel/printk/printk.c +10
-0+ } +if (_printk_time ==-1 ) { +for (stamp =0 ; stamp <=4 ; stamp++) { +if (!strncmp (printk_time_str[stamp], param, +strlen (param))) { + _printk_time = stamp; +break ; + } + } + }you can use
match_string()here.
Quoted 6 lines
kernel/printk/printk.c static inline void boot_delay_msec(int level) · line 1265
Quoted 4 lines
kernel/printk/printk.c +4
-0+if (_printk_time ==-1 ) { +pr_warn ("printk: invalid timestamp value %s\n" , param); +return -EINVAL ; + }`invalid timestamp value' is confusing.
I can't think of anything better than 'invalid timestamp option'. If you find that confusing, please explain why.
Quoted 8 lines
kernel/printk/printk.c static inline void boot_delay_msec(int level) · line 1277
Quoted 6 lines
kernel/printk/printk.c +4
-0+ }else if ((printk_time_setting != _printk_time) && + (_printk_time !=0 )) { +pr_warn ("printk: timestamp can only be set to 0(disabled) or %s\n" , + printk_time_str[printk_time_setting]);ditto.
Changed to 'timestamp can only e set to 0, disabled, or <string>'.
Quoted 9 lines
kernel/printk/printk.c static inline void boot_delay_msec(int level) · line 1282
Quoted 7 lines
kernel/printk/printk.c +5
-0+return -EINVAL ; + } + + printk_time = _printk_time; +pr_info ("printk: timestamp set to %s\n" , printk_time_str[printk_time]);ditto.
I don't find this confusing _at all_. Please offer an explanation of why you think that message is confusing.
Quoted 15 lines
[..]
Quoted 11 lines
kernel/printk/printk.c +11
-0+static u64 printk_get_ts (void ) +{ +u64 mono, offset_real; + +if (printk_time <=PRINTK_TIME_LOCAL ) +return local_clock (); + +if (printk_time ==PRINTK_TIME_BOOT ) +return ktime_get_boot_log_ts (); + + mono =ktime_get_real_log_ts (&offset_real);
Quoted 8 lines
kernel/printk/printk.c static inline void boot_delay_msec(int level) · line 1313
Quoted 6 lines
kernel/printk/printk.c +6
-0+ +if (printk_time ==PRINTK_TIME_MONO ) +return mono; + +return mono + offset_real; +}this looks hard...
See previous suggestion from peterz to switch to a fn ptr.
Quoted 5 lines
kernel/printk/printk.c static size_t msg_print_text(const struct printk_log *msg, · line 1984
Quoted 3 lines
kernel/printk/printk.c +2
-0+static int printk_time; +static int printk_time_setting;how about s/printk_time_setting/printk_time_source/? or something similar?
Sure.
P.
Quoted 3 lines
-ss
Quoted 1 line · Sergey Senozhatsky
On (08/07/17 11:52), Prarit Bhargava wrote:
<snip>
Quoted 13 lines
[..]
Quoted 12 lines
kernel/printk/printk.c +12
-0+ if (strlen(param) == 1) { + /* Preserve legacy boolean settings */ + if (!strcmp("0", param) || !strcmp("n", param) || + !strcmp("N", param)) + _printk_time = PRINTK_TIME_DISABLE; + if (!strcmp("1", param) || !strcmp("y", param) || + !strcmp("Y", param)) + _printk_time = PRINTK_TIME_LOCAL; + } + if (_printk_time == -1) { + for (stamp = 0; stamp <= 4; stamp++) { + if (!strncmp(printk_time_str[stamp], param,
Quoted 8 lines
kernel/printk/printk.c static inline void boot_delay_msec(int level) · line 1261
Quoted 6 lines
kernel/printk/printk.c +6
-0+ strlen(param))) { + _printk_time = stamp; +break ; + } + } + }you can use
match_string()here.
match_string doesn't match correctly. Others have made requests for, for example, printk.time=r printk.time=real, etc. Instead of butchering the code for a bunch of strings I chose to allow partial matching and simplify the code.
P.