Re: [RFC PATCH for 4.21 03/16] mm: Replace BUG_ON() by WARN_ON() in vm_unmap_ram()

2018-11-01 Thread Mathieu Desnoyers
- On Nov 1, 2018, at 11:00 PM, Linus Torvalds torva...@linux-foundation.org wrote: > On Thu, Nov 1, 2018 at 12:57 PM Mathieu Desnoyers > wrote: >> >> > I think the graceful recovery is to simply return: >> > >> > if (WARN_ON(cond)) >> > return; >> > >> > is better than ju

Re: [RFC PATCH for 4.21 03/16] mm: Replace BUG_ON() by WARN_ON() in vm_unmap_ram()

2018-11-01 Thread Linus Torvalds
On Thu, Nov 1, 2018 at 12:57 PM Mathieu Desnoyers wrote: > > > I think the graceful recovery is to simply return: > > > > if (WARN_ON(cond)) > > return; > > > > is better than just > > > > BUG_ON(cond); > > > > As that's what Linus made pretty clear at the Maintainer's Su

Re: [RFC PATCH for 4.21 03/16] mm: Replace BUG_ON() by WARN_ON() in vm_unmap_ram()

2018-11-01 Thread Mathieu Desnoyers
- On Nov 1, 2018, at 7:46 PM, rostedt rost...@goodmis.org wrote: > On Thu, 1 Nov 2018 13:21:12 +0100 (CET) > Thomas Gleixner wrote: > >> Mathieu, >> >> On Thu, 1 Nov 2018, Mathieu Desnoyers wrote: >> >> > It is encouraged to warn and return rather than use BUG_ON() when >> > the condition

Re: [RFC PATCH for 4.21 03/16] mm: Replace BUG_ON() by WARN_ON() in vm_unmap_ram()

2018-11-01 Thread Steven Rostedt
On Thu, 1 Nov 2018 13:21:12 +0100 (CET) Thomas Gleixner wrote: > Mathieu, > > On Thu, 1 Nov 2018, Mathieu Desnoyers wrote: > > > It is encouraged to warn and return rather than use BUG_ON() when > > the condition can be recovered from in ways that are more graceful than > > halting the whole sy

Re: [RFC PATCH for 4.21 03/16] mm: Replace BUG_ON() by WARN_ON() in vm_unmap_ram()

2018-11-01 Thread Thomas Gleixner
Mathieu, On Thu, 1 Nov 2018, Mathieu Desnoyers wrote: > It is encouraged to warn and return rather than use BUG_ON() when > the condition can be recovered from in ways that are more graceful than > halting the whole system. You're failing to desribe how that graceful recovery works. Thanks,

[RFC PATCH for 4.21 03/16] mm: Replace BUG_ON() by WARN_ON() in vm_unmap_ram()

2018-11-01 Thread Mathieu Desnoyers
It is encouraged to warn and return rather than use BUG_ON() when the condition can be recovered from in ways that are more graceful than halting the whole system. Signed-off-by: Mathieu Desnoyers Suggested-by: Steven Rostedt CC: Sergey Senozhatsky CC: Matthew Wilcox CC: "Paul E. McKenney" CC