Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp821798rdb; Sat, 7 Oct 2023 00:07:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF4njkEm12JYEtdQxudhOrj0uVwFuNlfNYvTTYAXkdaXo522FLLLy0cCzNH/6N6cw4z6f2F X-Received: by 2002:a05:6808:2897:b0:3af:d1d6:8a59 with SMTP id eu23-20020a056808289700b003afd1d68a59mr2788598oib.38.1696662427955; Sat, 07 Oct 2023 00:07:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696662427; cv=none; d=google.com; s=arc-20160816; b=PgaBd3LrXD8gscwwTE21ezPjtvYudKGb4kLBHahyudiBSrAJNRH9q2NgE0ytjOY5OO r5vGQ9qWPdaeJd/gJqhUr94kz6Iesrh0ODJ1CHpUIgLBH6MuqFFlkDmII0mvbCUpVpNa DLyhfV3BJDamzQBKC+VYBpjIBe1NBtln8c+dgfTFNtc0MRxnmsLRKkgep9CXoMsMwa5V 2HvSRugDj1GbXJ017NUHo7qTy20Y2g3ZByMYcOtKNk8kZySF7Ea6Fk3ngP7IHXxUWeOX Qv2CBrchRTVgSwXu402nPhZkUq7Fi8CXj1y/6RupnQlm1jGvYheF2m+H/3mnhiEtPdiK Ps+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=Le2uEJkChO2HUGa5K2hUsEoIn2/h+RuIAwUyZABd/Fg=; fh=jj8zmoIRlph5y4buxvmZRp3No1PeGdZG1GoQpiCkfpc=; b=TftAI0M/ClG9XTZ9UmsbqduKX0aHiKg3Hu2YYmQT8XxfbAwj3Iel70aUXEpokUimpO B/pkII5VjrbDIV0YqYUECLNEmqvfR1scGD1cQY3t/L7GZJmzSfNOHtMSkwEjWC5xKKS6 L+AStv0AKxtf1N+Vb4BV5ZIrcytkIJyfkfDR/TnT+vsO2OaUoub7CrVkbkHMiSJDYJrT MPG+Fs7udCmUshVBUR5eFrMzxqgbR/5Qzb7dO3MxONVHxW6GJ7Tok7v+2BOebnT45W/B whk1J27N8hjhGYoWHCY96GWOaJMnL1yvkmiKBu4009uqSRm5cGuKNMKkpFawhp8sna5s Cf+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=WVvFhP66; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id b18-20020a656692000000b0056c297d163asi5364757pgw.523.2023.10.07.00.07.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 00:07:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=WVvFhP66; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id CB41E80873B4; Sat, 7 Oct 2023 00:06:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343601AbjJGHGJ (ORCPT + 99 others); Sat, 7 Oct 2023 03:06:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343618AbjJGHGI (ORCPT ); Sat, 7 Oct 2023 03:06:08 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC1DABF; Sat, 7 Oct 2023 00:06:03 -0700 (PDT) X-UUID: f6f2e95264df11eea33bb35ae8d461a2-20231007 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=Le2uEJkChO2HUGa5K2hUsEoIn2/h+RuIAwUyZABd/Fg=; b=WVvFhP66Bn09GC4ehoj3v7McO/7dAlm7FQtEoYyJGpz57+kyy9HntBI3tFKbr9fnXXhC1UXvcRpauw3fk464H9v2p/QJFmM8Dxl/x0bxWCdg0ITbuKVXbJHJePBNUML7jWG5UHG4IdQFhdcrph3qE7k7wvireaH3EL6hWmeQ4uE=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.32,REQID:9a829602-2bb3-4276-9fbe-0017bbb17f19,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:5f78ec9,CLOUDID:cd89c814-4929-4845-9571-38c601e9c3c9,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO, DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: f6f2e95264df11eea33bb35ae8d461a2-20231007 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1482502868; Sat, 07 Oct 2023 15:05:57 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by MTKMBS14N1.mediatek.inc (172.21.101.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Sat, 7 Oct 2023 15:05:56 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Sat, 7 Oct 2023 15:05:56 +0800 From: Mark-PK Tsai To: Minchan Kim , Sergey Senozhatsky , Jens Axboe , Matthias Brugger , AngeloGioacchino Del Regno CC: , Mark-PK Tsai , , , , Subject: [PATCH] zram: use copy_page for full page copy Date: Sat, 7 Oct 2023 15:05:53 +0800 Message-ID: <20231007070554.8657-1-mark-pk.tsai@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--5.565200-8.000000 X-TMASE-MatchedRID: 7599MfAx46VCTeJ8Ii+TOrhzZI/dfrdOQl/FdRYkUZLfUZT83lbkECpJ 3T68EJKPEwte8QHPZve6/wFvLeWXhqYpNU5HIIOKngIgpj8eDcBpkajQR5gb3savT21DsLD/UEh Wy9W70AEgBwKKRHe+r7RUJtZc0bvVaYlP96BGyA9Gf+arKp5f1G0XrKRZbupyMWoRxFL7SRo= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--5.565200-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: C9F30F95FEA5B0A71375788D323ADC74DC144382AC8BD65FBB276596CD102A452000:8 X-MTK: N X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sat, 07 Oct 2023 00:06:20 -0700 (PDT) X-Spam-Level: ** Some architectures, such as arm, have implemented optimized copy_page for full page copying. Replace the full page memcpy with copy_page to take advantage of the optimization. Signed-off-by: Mark-PK Tsai --- drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index d77d3664ca08..58700dd73d1d 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -1338,7 +1338,7 @@ static int zram_read_from_zspool(struct zram *zram, struct page *page, src = zs_map_object(zram->mem_pool, handle, ZS_MM_RO); if (size == PAGE_SIZE) { dst = kmap_atomic(page); - memcpy(dst, src, PAGE_SIZE); + copy_page(dst, src); kunmap_atomic(dst); ret = 0; } else { -- 2.18.0