Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp295497ybi; Fri, 31 May 2019 01:25:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxu2CaAjKGx7XxkBIRBP1SMIR3HxgJ0xoMqVzllWGHyblq3DgefoFL5IX2WhbsnuPUotqBz X-Received: by 2002:a62:5b81:: with SMTP id p123mr8285430pfb.158.1559291147392; Fri, 31 May 2019 01:25:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559291147; cv=none; d=google.com; s=arc-20160816; b=hYZj5BJ4LChyYhWNLFbV9guBiH8MsySDJnG5brKoqXXnhOkitw+a5KNBGrNQUdsL8i uFay6cA7zY0IFOLEOUHb0E54BAMQelnJVIW0gCnbNK7IphI6hqUlhZlZVMJno1kKhGb2 my+b8kYtb+HXkXGJFl29GqcspoEzRX0Ci155RJgNcE6KBcCZY5j6MZZxDqQTypbzYcba RZLM7x69NqNVJeE7BKv3uZHGV4Wq8A3uR26sXrP7RdinIjq4AUA6IHO0SlnbIOGG62PE kngYT7uaZqJTZOoS9NjQuGgoiWtWSGF3F74WPPUDoTPQsQpx1VGzqHXDp1MQnd6EJM3R /A1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type:message-id :date:subject:cc:to:from:dkim-signature:dkim-filter; bh=4tYbzE7Ki9DPqfpIW+vy46QOWGXK8VI9QeBr4xi3Kdc=; b=b8B5WJQ/wyARd5CxU9IqPtFZuYHVe6MgbRvFo3PqGFzYkFx23wBuc8/Ik2yEhJdqHb Q1YD0tDAOwt4YCejgE5mk0KCvqGxFWO/A7IViFCNeLmiKrG8ECuH8tdygW6hQefraYt3 h370P8/+ickCQ7HdDpo8jzUk34im0oJ88YuhtEmkeHSEm3xYru4aEs5iqgozyO1dEOKw nLYlapQtOw+XUCRZNYNCC0BD6qmgbQP5XvhuGsT0z9LmuhzQeLndG32LhLNoNFi2d2/D GFwYxpJp08xh/E956orosTYOSYpZzfBh7kbNLlmiXpNkZArbE8J3NDik9kTv8QgSVnq2 EI+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=NeSFVLFt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si5035526pgm.568.2019.05.31.01.25.31; Fri, 31 May 2019 01:25:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=NeSFVLFt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726887AbfEaIYQ (ORCPT + 99 others); Fri, 31 May 2019 04:24:16 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:47259 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725963AbfEaIYQ (ORCPT ); Fri, 31 May 2019 04:24:16 -0400 Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190531082413epoutp033532fad3b74d884369534436552f3414~jtvOJXPEu3231732317epoutp03h for ; Fri, 31 May 2019 08:24:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190531082413epoutp033532fad3b74d884369534436552f3414~jtvOJXPEu3231732317epoutp03h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1559291053; bh=4tYbzE7Ki9DPqfpIW+vy46QOWGXK8VI9QeBr4xi3Kdc=; h=From:To:Cc:Subject:Date:References:From; b=NeSFVLFtWmrHuqVvzUedgY+lq35XKIiohnKXlpYm0jkD1BdDBXDqOMzyTh+lBGmVV fh8T10IiZ+bcPcllVQaBgDTNmBeYls2RQsV1P35PUqIg0DIaVgOomnyhqRhJqyO7BU 7KIFOb188tBnhRsyB2q99U6q4oQlgf4/+xy8d+Hg= Received: from epsmges5p1new.samsung.com (unknown [182.195.40.194]) by epcas5p4.samsung.com (KnoxPortal) with ESMTP id 20190531082411epcas5p456a7664a7686cdfdd5019b999357bc1b~jtvMRq4lr1577915779epcas5p4H; Fri, 31 May 2019 08:24:11 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 11.39.04071.BA4E0FC5; Fri, 31 May 2019 17:24:11 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas5p3.samsung.com (KnoxPortal) with ESMTPA id 20190531082344epcas5p394e519d5940ca1642007f7e594e2917c~jtuzIatyX1734317343epcas5p3P; Fri, 31 May 2019 08:23:44 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190531082344epsmtrp12741d4f14b627a83abaa2fbd0d7c9516~jtuzFDA8Q1141211412epsmtrp13; Fri, 31 May 2019 08:23:44 +0000 (GMT) X-AuditID: b6c32a49-5b7ff70000000fe7-c1-5cf0e4abd260 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id DF.A4.03662.F84E0FC5; Fri, 31 May 2019 17:23:43 +0900 (KST) Received: from localhost.localdomain (unknown [107.109.224.135]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190531082342epsmtip185b96dd89f745f4817e51d9b63b4c7ea~jtuxxsLku1923719237epsmtip1o; Fri, 31 May 2019 08:23:42 +0000 (GMT) From: Maninder Singh To: viro@zeniv.linux.org.uk, jens.axboe@oracle.com Cc: v.narang@samsung.com, a.sahrawat@samsung.com, pankaj.m@samsung.com, linux-kernel@vger.kernel.org, Maninder Singh Subject: [PATCH 1/1] splice: Reduce stack usage by reducing structure partial_page Date: Fri, 31 May 2019 13:53:32 +0530 Message-Id: <1559291012-19269-1-git-send-email-maninder1.s@samsung.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrLKsWRmVeSWpSXmKPExsWy7bCmlu7qJx9iDJY3s1hc3J1qsa95A6vF 5V1z2CwOz29jsbj3ZiuTxaGTcxktzv89zurA7vHx6S0Wj74tqxg9Pm+S89j05C1TAEtUjk1G amJKapFCal5yfkpmXrqtkndwvHO8qZmBoa6hpYW5kkJeYm6qrZKLT4CuW2YO0AFKCmWJOaVA oYDE4mIlfTubovzSklSFjPziElul1IKUnAJDowK94sTc4tK8dL3k/FwrQwMDI1OgyoScjH1z J7IWtPBU/F/6l7mBcSVHFyMnh4SAiUTrj3esXYxcHEICuxkl5mx9xgzhfGKUeLN1DzuE841R YuuLG8wwLUsO72ODSOxllNj54hWU85VRYurpbWBVbAJ6Eqt27WHpYuTgEBEwkng1mQekhllg AqPE/t3zwGqEBUIkPr78BlbDIqAqcW+TFkiYV8Bd4tnn31DL5CRunusEO0lC4CerxNzuvSwQ CReJBef/QtnCEq+Ob2GHsKUkXva3sUM0tDNKXJ95jQXCmcIo0fl+JVSVvcSDG0fZQTYzC2hK rN+lDxGWlZh6ah0TiM0swCfR+/sJE0ScV2LHPBhbVaLl5gZWCFta4vPHj1BHeEjMbm0Hu1pI IFZi45xWtgmMsrMQNixgZFzFKJlaUJybnlpsWmCYl1qOHFWbGMFJS8tzB+Oscz6HGAU4GJV4 eAUOvo8RYk0sK67MPcQowcGsJMLrfQEoxJuSWFmVWp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2917c X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20190531082344epcas5p394e519d5940ca1642007f7e594e2917c References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org u16 can be used to store Page offset and page len for partial page for page size upto 65K. page size is fixed at compilation time so size of partial page can be reduced to reduce stack usage of functions using partial_page structure on stack. : e16d42f4 strd r4, [sp, #-36]! ; 0xffffffdc ... e24ddf4d sub sp, sp, #308 ; 0x134 : e16d42f4 strd r4, [sp, #-36]! ; 0xffffffdc ... e24ddf53 sub sp, sp, #332 ; 0x14c After: ====== : e16d42f4 strd r4, [sp, #-36]! ; 0xffffffdc ... e24dd0f4 sub sp, sp, #244 ; 0xf4 : e16d42f4 strd r4, [sp, #-36]! ; 0xffffffdc ... e24ddf45 sub sp, sp, #276 ; 0x114 Tested on ARM. Signed-off-by: Vaneet Narang Signed-off-by: Maninder Singh --- include/linux/splice.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/splice.h b/include/linux/splice.h index 74b4911..d2b1814 100644 --- a/include/linux/splice.h +++ b/include/linux/splice.h @@ -45,8 +45,13 @@ struct splice_desc { }; struct partial_page { +#if PAGE_SHIFT < 16 + unsigned short offset; + unsigned short len; +#else unsigned int offset; unsigned int len; +#endif unsigned long private; }; -- 2.7.4