isolate ratelimit from printk.c for other use