* [folded] kernelh-add-printk_ratelimited-and-pr_level_rl-rename.patch removed from -mm tree
@ 2009-12-15 1:08 akpm
2009-12-15 10:28 ` Peter Zijlstra
0 siblings, 1 reply; 5+ messages in thread
From: akpm @ 2009-12-15 1:08 UTC (permalink / raw)
To: akpm, a.p.zijlstra, h-shimamoto, joe, mingo, nooiwa, mm-commits
The patch titled
kernelh-add-printk_ratelimited-and-pr_level_rl-rename
has been removed from the -mm tree. Its filename was
kernelh-add-printk_ratelimited-and-pr_level_rl-rename.patch
This patch was dropped because it was folded into kernelh-add-printk_ratelimited-and-pr_level_rl.patch
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: kernelh-add-printk_ratelimited-and-pr_level_rl-rename
From: Andrew Morton <akpm@linux-foundation.org>
s/_rl/_ratelimited/g
Cc: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Joe Perches <joe@perches.com>
Cc: Naohiro Ooiwa <nooiwa@miraclelinux.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
diff -puN include/linux/kernel.h~kernelh-add-printk_ratelimited-and-pr_level_rl-rename include/linux/kernel.h
--- a/include/linux/kernel.h~kernelh-add-printk_ratelimited-and-pr_level_rl-rename
+++ a/include/linux/kernel.h
@@ -423,27 +423,27 @@ static inline char *pack_hex_byte(char *
#define printk_ratelimited printk
#endif
-#define pr_emerg_rl(fmt, ...) \
+#define pr_emerg_ratelimited(fmt, ...) \
printk_ratelimited(KERN_EMERG pr_fmt(fmt), ##__VA_ARGS__)
-#define pr_alert_rl(fmt, ...) \
+#define pr_alert_ratelimited(fmt, ...) \
printk_ratelimited(KERN_ALERT pr_fmt(fmt), ##__VA_ARGS__)
-#define pr_crit_rl(fmt, ...) \
+#define pr_crit_ratelimited(fmt, ...) \
printk_ratelimited(KERN_CRIT pr_fmt(fmt), ##__VA_ARGS__)
-#define pr_err_rl(fmt, ...) \
+#define pr_err_ratelimited(fmt, ...) \
printk_ratelimited(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
-#define pr_warning_rl(fmt, ...) \
+#define pr_warning_ratelimited(fmt, ...) \
printk_ratelimited(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
-#define pr_notice_rl(fmt, ...) \
+#define pr_notice_ratelimited(fmt, ...) \
printk_ratelimited(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
-#define pr_info_rl(fmt, ...) \
+#define pr_info_ratelimited(fmt, ...) \
printk_ratelimited(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
-/* no pr_cont_rl, don't do that... */
+/* no pr_cont_ratelimited, don't do that... */
/* If you are writing a driver, please use dev_dbg instead */
#if defined(DEBUG)
-#define pr_debug_rl(fmt, ...) \
+#define pr_debug_ratelimited(fmt, ...) \
printk_ratelimited(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#else
-#define pr_debug_rl(fmt, ...) \
+#define pr_debug_ratelimited(fmt, ...) \
({ if (0) printk_ratelimited(KERN_DEBUG pr_fmt(fmt), \
##__VA_ARGS__); 0; })
#endif
_
Patches currently in -mm which might be from akpm@linux-foundation.org are
origin.patch
mmap-dont-return-enomem-when-mapcount-is-temporarily-exceeded-in-munmap.patch
dev-mem-cleanup-unxlate_dev_mem_ptr-calls.patch
oom-kill-fix-numa-consraint-check-with-nodemask-v42.patch
mm-mlocking-in-try_to_unmap_one.patch
mm-memory_hotplug-make-offline_pages-static.patch
mm-hugetlb-fix-hugepage-memory-leak-in-mincore.patch
mm-hugetlb-add-hugepage-support-to-pagemap.patch
procfs-allow-threads-to-rename-siblings-via-proc-pid-tasks-tid-comm.patch
floppy-add-an-extra-bound-check-on-ioctl-arguments.patch
rwsem-fix-rwsem_is_locked-bugs.patch
kernelh-add-printk_ratelimited-and-pr_level_rl.patch
kernelh-add-printk_ratelimited-and-pr_level_rl-rename.patch
errh-add-helper-function-to-simplify-pointer-error-checking-fix.patch
cs5535-add-a-generic-mfgpt-driver-fix.patch
cs5535-add-a-generic-clock-event-mfgpt-driver-fix.patch
drivers-scsi-sym53c8xx_2-sym_gluec-rename-skip_spaces-to-sym_skip_spaces.patch
lib-introduce-strim-checkpatch-fixes.patch
blackfin-sd-host-controller-driver-fix.patch
blackfin-sd-host-controller-driver-fix-fix.patch
blackfin-sd-host-controller-driver-fix-fix-fix.patch
crc32-minor-optimizations-and-cleanup-checkpatch-fixes.patch
hwmon-w83627ehf-updates-checkpatch-fixes.patch
lis3-update-documentation-to-match-latest-changes-fix.patch
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [folded] kernelh-add-printk_ratelimited-and-pr_level_rl-rename.patch removed from -mm tree
2009-12-15 1:08 [folded] kernelh-add-printk_ratelimited-and-pr_level_rl-rename.patch removed from -mm tree akpm
@ 2009-12-15 10:28 ` Peter Zijlstra
2009-12-15 21:28 ` Andrew Morton
2009-12-15 22:44 ` Valdis.Kletnieks
0 siblings, 2 replies; 5+ messages in thread
From: Peter Zijlstra @ 2009-12-15 10:28 UTC (permalink / raw)
To: akpm; +Cc: h-shimamoto, joe, mingo, nooiwa, mm-commits, LKML
On Mon, 2009-12-14 at 17:08 -0800, akpm@linux-foundation.org wrote:
> s/_rl/_ratelimited/g
do we feel this pr_* wankery is worth the hassle? I'd as soon send a
patch removing all this crap.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [folded] kernelh-add-printk_ratelimited-and-pr_level_rl-rename.patch removed from -mm tree
2009-12-15 10:28 ` Peter Zijlstra
@ 2009-12-15 21:28 ` Andrew Morton
2009-12-15 22:44 ` Valdis.Kletnieks
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Morton @ 2009-12-15 21:28 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: h-shimamoto, joe, mingo, nooiwa, LKML
On Tue, 15 Dec 2009 11:28:02 +0100
Peter Zijlstra <peterz@infradead.org> wrote:
> On Mon, 2009-12-14 at 17:08 -0800, akpm@linux-foundation.org wrote:
> > s/_rl/_ratelimited/g
>
> do we feel this pr_* wankery is worth the hassle? I'd as soon send a
> patch removing all this crap.
I thought it was just me. No, I find it a net negative, but I don't
work on drivers all day.
otoh, every second driver seems to find it necessary to invent its own
handy printk wrappers, so being able to point people at standardized
ones does offer some improvement over that.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [folded] kernelh-add-printk_ratelimited-and-pr_level_rl-rename.patch removed from -mm tree
2009-12-15 10:28 ` Peter Zijlstra
2009-12-15 21:28 ` Andrew Morton
@ 2009-12-15 22:44 ` Valdis.Kletnieks
2009-12-16 10:48 ` Peter Zijlstra
1 sibling, 1 reply; 5+ messages in thread
From: Valdis.Kletnieks @ 2009-12-15 22:44 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: akpm, h-shimamoto, joe, mingo, nooiwa, mm-commits, LKML
[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]
On Tue, 15 Dec 2009 11:28:02 +0100, Peter Zijlstra said:
> On Mon, 2009-12-14 at 17:08 -0800, akpm@linux-foundation.org wrote:
> > s/_rl/_ratelimited/g
>
> do we feel this pr_* wankery is worth the hassle? I'd as soon send a
> patch removing all this crap.
pr_foo() instead of printk(KERN_FOO) is probably worth the hassle, as it
allows more selective inclusion of messages if you're trying to build an
embedded kernel. It's easy to say "I want pr_warning() to stay in, but
lower levels compile to nothing". Trying to keep a 'printk(KERN_WARNING'
while making a printk(KERN_DEBUG go away is just asking for some truly
astounding pre-processor gyrations.
Not an issue for my laptop with 4G of RAM - byt my cell phone says it has
26M of memory, 7M used (presumably all the software, my contact list isn't
*that* big). No idea what the actual kernel is, but I know whatever it is,
the coders were using that kernel's equivalent of CONFIG_EMBEDDED and tossing
stuff over the side if they didn't need it. ;)
[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [folded] kernelh-add-printk_ratelimited-and-pr_level_rl-rename.patch removed from -mm tree
2009-12-15 22:44 ` Valdis.Kletnieks
@ 2009-12-16 10:48 ` Peter Zijlstra
0 siblings, 0 replies; 5+ messages in thread
From: Peter Zijlstra @ 2009-12-16 10:48 UTC (permalink / raw)
To: Valdis.Kletnieks; +Cc: akpm, h-shimamoto, joe, mingo, nooiwa, mm-commits, LKML
On Tue, 2009-12-15 at 17:44 -0500, Valdis.Kletnieks@vt.edu wrote:
> On Tue, 15 Dec 2009 11:28:02 +0100, Peter Zijlstra said:
> > On Mon, 2009-12-14 at 17:08 -0800, akpm@linux-foundation.org wrote:
> > > s/_rl/_ratelimited/g
> >
> > do we feel this pr_* wankery is worth the hassle? I'd as soon send a
> > patch removing all this crap.
>
> pr_foo() instead of printk(KERN_FOO) is probably worth the hassle, as it
> allows more selective inclusion of messages if you're trying to build an
> embedded kernel. It's easy to say "I want pr_warning() to stay in, but
> lower levels compile to nothing". Trying to keep a 'printk(KERN_WARNING'
> while making a printk(KERN_DEBUG go away is just asking for some truly
> astounding pre-processor gyrations.
So we are depricating printk()?
Last time I asked that the answer was no, at which point there is
absolutely no point in using pr_* wankery.
And I much prefer the printk() thing, because
1) my fingers know it
2) it looks like the userspace printf thing
3) its an easier pattern to grep for
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-12-16 10:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-15 1:08 [folded] kernelh-add-printk_ratelimited-and-pr_level_rl-rename.patch removed from -mm tree akpm
2009-12-15 10:28 ` Peter Zijlstra
2009-12-15 21:28 ` Andrew Morton
2009-12-15 22:44 ` Valdis.Kletnieks
2009-12-16 10:48 ` Peter Zijlstra
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.