Re: [PATCH] btrfs: tree-check: reduce stack consumption in check_dir_item

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 10, 2018 at 03:28:51PM +0100, David Sterba wrote:
> I've noticed that the updated item checker stack consumption increased
> dramatically in 542f5385e20cf97447 ("btrfs: tree-checker: Add checker
> for dir item")
> 
> tree-checker.c:check_leaf                    +552 (176 -> 728)
> 
> The array is 255 bytes long, dynamic allocation would slow down the
> sanity checks so it's more reasonable to keep it on-stack. Moving the
> variable to the scope of use reduces the stack usage again
> 
> tree-checker.c:check_leaf                    -264 (728 -> 464)
> 
> Signed-off-by: David Sterba <dsterba@xxxxxxxx>

Reviewed-by: Josef Bacik <jbacik@xxxxxx>

Thanks,

Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux