+ zstd-use-u16-data-type-for-rankpos.patch added to -mm tree

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

 



The patch titled
     Subject: zstd: use U16 data type for rankPos
has been added to the -mm tree.  Its filename is
     zstd-use-u16-data-type-for-rankpos.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/zstd-use-u16-data-type-for-rankpos.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/zstd-use-u16-data-type-for-rankpos.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Maninder Singh <maninder1.s@xxxxxxxxxxx>
Subject: zstd: use U16 data type for rankPos

rankPos structure variables value can not be more than 512.  So it can
easily be declared as U16 rather than U32.

It will reduce stack usage of HUF_sort from 256 bytes to 128 bytes

original:
e92ddbf0        push    {r4, r5, r6, r7, r8, r9, fp, ip, lr, pc}
e24cb004        sub     fp, ip, #4
e24ddc01        sub     sp, sp, #256    ; 0x100

changed:
e92ddbf0        push    {r4, r5, r6, r7, r8, r9, fp, ip, lr, pc}
e24cb004        sub     fp, ip, #4
e24dd080        sub     sp, sp, #128    ; 0x80

Link: http://lkml.kernel.org/r/1559552526-4317-3-git-send-email-maninder1.s@xxxxxxxxxxx
Signed-off-by: Maninder Singh <maninder1.s@xxxxxxxxxxx>
Signed-off-by: Vaneet Narang <v.narang@xxxxxxxxxxx>
Cc: Amit Sahrawat <a.sahrawat@xxxxxxxxxxx>
Cc: David S. Miller <davem@xxxxxxxxxxxxx>
Cc: Gustavo A. R. Silva <gustavo@xxxxxxxxxxxxxx>
Cc: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Cc: Joe Perches <joe@xxxxxxxxxxx>
Cc: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: <pankaj.m@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/zstd/huf_compress.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/lib/zstd/huf_compress.c~zstd-use-u16-data-type-for-rankpos
+++ a/lib/zstd/huf_compress.c
@@ -382,8 +382,8 @@ static U32 HUF_setMaxHeight(nodeElt *huf
 }
 
 typedef struct {
-	U32 base;
-	U32 curr;
+	U16 base;
+	U16 curr;
 } rankPos;
 
 static void HUF_sort(nodeElt *huffNode, const U32 *count, U32 maxSymbolValue)
_

Patches currently in -mm which might be from maninder1.s@xxxxxxxxxxx are

zstd-pass-pointer-rathen-than-structure-to-functions.patch
zstd-use-u16-data-type-for-rankpos.patch
zstd-move-params-structure-to-global-variable-to-reduce-stack-usage.patch
zstd-change-structure-variable-from-int-to-char.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux