Re: [PATCH] printk: Ratelimit messages printed by console drivers

From: Sergey Senozhatsky
Date: Wed Feb 27 2019 - 23:45:28 EST


On (02/26/19 19:24), Tetsuo Handa wrote:
> Does memory allocation by network stack / driver while trying to emit
> the messages include __GFP_DIRECT_RECLAIM flag (e.g. GFP_KERNEL) ?
> Commit 400e22499dd92613821 handles only memory allocations with
> __GFP_DIRECT_RECLAIM flag. If memory allocation when trying to emit
> the messages does not include __GFP_DIRECT_RECLAIM flag (e.g.
> GFP_ATOMIC / GFP_NOWAIT), doesn't this particular problem still exist?

Console drivers are always called from atomic contexts (including
IRQ->printk->console_driver paths); if any console driver does a
GFP_KERNEL allocation then it should be fixed.

-ss