[Crash-utility] [PATCH 0/5] Add Brent algorithm as an option for the 'list' command

Dave Anderson anderson at redhat.com
Wed Jul 11 20:29:02 UTC 2018


Dave,

Just an awesome job man...

Queued for crash-7.2.4:

  https://github.com/crash-utility/crash/commit/6596f1121b89162f96d1e1825c2905b83b59bec1

Thanks,
  Dave

  
----- Original Message -----
> The list command by default uses a hash table for loop detection, and thus
> uses an increasing amount of memory as each list entry is traversed.  For
> larger lists, this can be a significant problem.  We have even seen where
> crash commands run for days iterating lists, mostly due to the fact that
> the ever-increasing memory causes crash to slow down.  There is an option
> to avoid the overhead of the hash table, "hash off", but then you lose the
> ability to detect a loop.
> 
> This patchset adds an alternative algorithm for loop detection while only
> using a fixed amount of memory.  The '-B' option is added to the 'list'
> command which invokes this new algorithm rather than the hash table.
> In addition to the low memory usage, the output of the list command is
> slightly different when a loop is detected.  In addition to printing
> the first duplicate, the length of the loop and the distance to the
> loops is output.
> 
> Dave Wysochanski (6):
>   Add do_list_no_hash() function similar to do_list() but without hash.
>   do_list_no_hash: factor out all the debug statements at entry into
>     do_list_debug_entry
>   do_list_no_hash: factor out structure output into static function
>   do_list_no_hash: factor out a small readmem function
>   Implement R. P. Brent's algorithm for loop detection for 'list'
>     command.
>   Add a '-B' flag to the list command to call the brent algorithm.
> 
>  defs.h  |   2 +
>  help.c  |   6 ++
>  tools.c | 288
>  +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  3 files changed, 292 insertions(+), 4 deletions(-)
> 
> --
> 1.8.3.1
> 
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
> 




More information about the Crash-utility mailing list