Re: minidump size on amd64

From: Andriy Gapon <avg_at_freebsd.org>
Date: Tue, 09 Nov 2010 20:45:03 +0200
on 09/11/2010 10:02 Alan Cox said the following:
> The kernel portion of the patch looks correct.  If I were to make one stylistic
> suggestion, it would be to make the control flow of the outer and inner loops as
> similar as possible, that is,
> 
>    for (...
>       if ((pdp[i] & PG_V) == 0) {
>          ...
>          continue;
>       }
>       if ((pdp[i] & PG_PS) != 0) {
>          ...
>          continue;
>       }
>       for (...
>          if ((pd[j] & PG_V) == 0)
>             continue;
>          if ((pd[j] & PG_PS) != 0) {
>             ...
>             continue;
>          }
>          for (...
>             if ((pt[x] & PG_V) == 0)
>                continue;
>             ...
> 
> I think this would make the code a little easier to follow.

This is a very nice suggestion, thank you.
Besides the uniformity some horizontal space is saved too :-)
Updated patch (only kernel part) is here:
http://people.freebsd.org/~avg/amd64-minidump.5.diff

-- 
Andriy Gapon
Received on Tue Nov 09 2010 - 17:45:13 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:09 UTC