From: Joe Perches <joe@perches.com>
To: Konstantin Khlebnikov <koct9i@gmail.com>,
Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Sam Varshavchik <mrsam@courier-mta.com>,
Ingo Molnar <mingo@kernel.org>, Laura Abbott <labbott@redhat.com>,
Brent <fix@bitrealm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Christian Borntraeger <borntraeger@de.ibm.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [REGRESSION] RLIMIT_DATA crashes named
Date: Sat, 17 Sep 2016 14:52:31 -0700 [thread overview]
Message-ID: <1474149151.1954.4.camel@perches.com> (raw)
In-Reply-To: <CALYGNiN-ELbwSV0X2_FeKvGSOfRuHMsBnBDj86NHZxQKnZgVsQ@mail.gmail.com>
On Sun, 2016-09-18 at 00:40 +0300, Konstantin Khlebnikov wrote:
> #define printk_periodic(period, fmt, ...)
> ({
> static unsigned long __prev __read_mostly = INITIAL_JIFFIES - (period);
> unsigned long __now = jiffies;
> bool __print = !time_in_range_open(__now, __prev, __prev + (period));
>
> if (__print) {
> __prev = __now;
> printk(fmt, ##__VA_ARGS__);
> }
> unlikely(__print);
> })
printk_periodic reads like a thing that would create a
thread to printk a message every period.
And trivially, period should be copied to a temporary
and not be reused (use your choice of # of underscores)
unsigned long _period = period;
unsigned long _now = now;
static unsigned long _prev __read_mostly = etc...
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Joe Perches <joe@perches.com>
To: Konstantin Khlebnikov <koct9i@gmail.com>,
Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Sam Varshavchik <mrsam@courier-mta.com>,
Ingo Molnar <mingo@kernel.org>, Laura Abbott <labbott@redhat.com>,
Brent <fix@bitrealm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Christian Borntraeger <borntraeger@de.ibm.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [REGRESSION] RLIMIT_DATA crashes named
Date: Sat, 17 Sep 2016 14:52:31 -0700 [thread overview]
Message-ID: <1474149151.1954.4.camel@perches.com> (raw)
In-Reply-To: <CALYGNiN-ELbwSV0X2_FeKvGSOfRuHMsBnBDj86NHZxQKnZgVsQ@mail.gmail.com>
On Sun, 2016-09-18 at 00:40 +0300, Konstantin Khlebnikov wrote:
> #define printk_periodic(period, fmt, ...)
> ({
> static unsigned long __prev __read_mostly = INITIAL_JIFFIES - (period);
> unsigned long __now = jiffies;
> bool __print = !time_in_range_open(__now, __prev, __prev + (period));
>
> if (__print) {
> __prev = __now;
> printk(fmt, ##__VA_ARGS__);
> }
> unlikely(__print);
> })
printk_periodic reads like a thing that would create a
thread to printk a message every period.
And trivially, period should be copied to a temporary
and not be reused (use your choice of # of underscores)
unsigned long _period = period;
unsigned long _now = now;
static unsigned long _prev __read_mostly = etc...
next prev parent reply other threads:[~2016-09-17 21:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-16 15:16 [REGRESSION] RLIMIT_DATA crashes named Laura Abbott
2016-09-16 15:16 ` Laura Abbott
2016-09-16 17:46 ` Linus Torvalds
2016-09-16 17:46 ` Linus Torvalds
2016-09-16 20:10 ` Laura Abbott
2016-09-16 20:10 ` Laura Abbott
2016-09-16 20:32 ` Linus Torvalds
2016-09-16 20:32 ` Linus Torvalds
2016-09-16 22:30 ` Sam Varshavchik
2016-09-16 22:30 ` Sam Varshavchik
2016-09-16 23:58 ` Linus Torvalds
2016-09-17 0:04 ` Linus Torvalds
2016-09-17 0:04 ` Linus Torvalds
2016-09-17 4:08 ` Joe Perches
2016-09-17 4:08 ` Joe Perches
2016-09-17 8:33 ` Konstantin Khlebnikov
2016-09-17 9:09 ` Cyrill Gorcunov
2016-09-17 9:09 ` Cyrill Gorcunov
2016-09-17 12:09 ` Konstantin Khlebnikov
2016-09-17 12:09 ` Konstantin Khlebnikov
2016-09-17 12:20 ` Cyrill Gorcunov
2016-09-17 12:20 ` Cyrill Gorcunov
2016-09-17 21:40 ` Konstantin Khlebnikov
2016-09-17 21:52 ` Joe Perches [this message]
2016-09-17 21:52 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1474149151.1954.4.camel@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=borntraeger@de.ibm.com \
--cc=fix@bitrealm.com \
--cc=gorcunov@gmail.com \
--cc=koct9i@gmail.com \
--cc=labbott@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@kernel.org \
--cc=mrsam@courier-mta.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.