Re: [PATCH 1/2] ARC: show_regs: avoid page allocator

2018-12-20 Thread Vineet Gupta
On 12/20/18 4:57 AM, Michal Hocko wrote: >> Despite this, lockdep still barfs (see next change), but this patch >> still has merit as in we use smaller/localized buffers now and there's >> less instructoh trace to sift thru when debugging pesky issues. > But show_regs is called from contexts which

Re: [PATCH 1/2] ARC: show_regs: avoid page allocator

2018-12-20 Thread Vineet Gupta
On 12/20/18 5:30 AM, Tetsuo Handa wrote: >> | mmput+0x16/0xb8 > Then, does mmput_async() help? Probably, I can try. ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc

Re: [PATCH 1/2] ARC: show_regs: avoid page allocator

2018-12-20 Thread Tetsuo Handa
On 2018/12/20 10:16, Vineet Gupta wrote: > On 12/19/18 9:04 AM, Eugeniy Paltsev wrote: >> As I can see x86 use print_vma_addr() in their show_signal_msg() >> function which allocate page with __get_free_page(GFP_NOWAIT); > > Indeed with that the __get_free_page() lockdep splat is gone. > >

Re: [PATCH 1/2] ARC: show_regs: avoid page allocator

2018-12-20 Thread Michal Hocko
On Tue 18-12-18 10:53:58, Vineet Gupta wrote: > Use on-stack smaller buffers instead of dynamic pages. > > The motivation for this change was to address lockdep splat when > signal handling code calls show_regs (with preemption disabled) and > ARC show_regs calls into sleepable page allocator. >

Re: [PATCH 1/2] ARC: show_regs: avoid page allocator

2018-12-19 Thread Vineet Gupta
On 12/19/18 9:04 AM, Eugeniy Paltsev wrote: > As I can see x86 use print_vma_addr() in their show_signal_msg() > function which allocate page with __get_free_page(GFP_NOWAIT); Indeed with that the __get_free_page() lockdep splat is gone. There's a different one now hence my other patch. |

Re: [PATCH 1/2] ARC: show_regs: avoid page allocator

2018-12-19 Thread Vineet Gupta
On 12/19/18 12:46 PM, William Kucharski wrote: > I would rather see 256 as a #define somewhere rather than a magic number > sprinkled > around arch/arc/kernel/troubleshoot.c. That bothered me as well, but I was too lazy to define one and the existing ones don't apply. PATH_MAX is 4K which will

Re: [PATCH 1/2] ARC: show_regs: avoid page allocator

2018-12-19 Thread William Kucharski
> On Dec 18, 2018, at 11:53 AM, Vineet Gupta wrote: > > Use on-stack smaller buffers instead of dynamic pages. > > The motivation for this change was to address lockdep splat when > signal handling code calls show_regs (with preemption disabled) and > ARC show_regs calls into sleepable page

Re: [PATCH 1/2] ARC: show_regs: avoid page allocator

2018-12-19 Thread Vineet Gupta
On 12/19/18 9:04 AM, Eugeniy Paltsev wrote: > Just curious: isn't that enough to use GFP_NOWAIT instead > of GFP_KERNEL when we allocate page in show_regs()? > > As I can see x86 use print_vma_addr() in their show_signal_msg() > function which allocate page with __get_free_page(GFP_NOWAIT); I'm

Re: [PATCH 1/2] ARC: show_regs: avoid page allocator

2018-12-19 Thread Eugeniy Paltsev
Hi Vineet, Just curious: isn't that enough to use GFP_NOWAIT instead of GFP_KERNEL when we allocate page in show_regs()? As I can see x86 use print_vma_addr() in their show_signal_msg() function which allocate page with __get_free_page(GFP_NOWAIT); On Tue, 2018-12-18 at 10:53 -0800, Vineet

[PATCH 1/2] ARC: show_regs: avoid page allocator

2018-12-18 Thread Vineet Gupta
Use on-stack smaller buffers instead of dynamic pages. The motivation for this change was to address lockdep splat when signal handling code calls show_regs (with preemption disabled) and ARC show_regs calls into sleepable page allocator. | potentially unexpected fatal signal 11. | BUG: sleeping