Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp427792iob; Wed, 18 May 2022 05:24:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+fEV6NTLhTwgYrUFZVSNOqQUb+HyOr2cwKjHx2ECDAk4/5bTK8p6jG/ECGa80TgkrGuDA X-Received: by 2002:a05:6a00:228d:b0:510:7594:a73c with SMTP id f13-20020a056a00228d00b005107594a73cmr27715436pfe.17.1652876691542; Wed, 18 May 2022 05:24:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652876691; cv=none; d=google.com; s=arc-20160816; b=jl3Qy5g2MR2dXGBJNOIfWeRWg2QAfJ295h6sNLdR7KZ3JAzU1al6ukUv9Lo5YAO720 4EjsHjRtHIAimfS/vqhI3R7syBTNWLt7DjnwzJUQq5Lc5hDm/KSwJS+7jmKYygB0DiSa xs99SOxwVHdFQmDzo7mVeR/lh5Ok2VUMBXvmPRfHUef+AT34xU5xfUDoZG7HV+n5bQ/Y y00hgM6HRzYwmnWXCdqM3+O+OKNG2Bd1rlYv6DeCcMn9cw64s1THU8W22DR4aGTbEexO EwbXBX+OcWdeLP4eCNQ7I74A9a0rktYZKchQKZ2+TZRNp3M41b34S2tjKAo+ZK7+18Dk onFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kQKtiTZ0LH/w5S3uWV2zXb3ODADItlkkeofFb+AnfrE=; b=x3k08bvXBGUsA4AvJ4+p5CgjVB8pabFy1kSqfzxezxvz6c63IXl6NvOWdxcH5HpGMo mYMISOKB3pjXSS79cY2M7nK/WVjrGv2zWUtMQbJxLQ8E447yxs5+dNKdec7q+NUpMRLu GtjVLuQL3VmeEl8EPp9yFMUj22x/dxZATPot7qTx8Nn1NEXJoifF3PvGqGOgaPOUeqLC TYAuTrzQnloOOPB9D6xHym+4FFXejBcwqckHnA44OeQY5QcDAOyl2EexqQZEBuo8ZC3c 6z1woQV/1xmA7r+0zdvFfBoRmLYoWRFDpE8flHDgH0ClEiv5XJwHiE4G9Cm0JjDPilX7 2ELg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Wv5U2pmu; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id om4-20020a17090b3a8400b001dc443e79a2si7136770pjb.8.2022.05.18.05.24.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 05:24:51 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Wv5U2pmu; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 28E9814B665; Wed, 18 May 2022 05:19:55 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236359AbiERMTu (ORCPT + 99 others); Wed, 18 May 2022 08:19:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236253AbiERMTs (ORCPT ); Wed, 18 May 2022 08:19:48 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7409A5B88B; Wed, 18 May 2022 05:19:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=kQKtiTZ0LH/w5S3uWV2zXb3ODADItlkkeofFb+AnfrE=; b=Wv5U2pmuhaGCoLOzHzJK+Nq6cQ EGJBrHRoJFiP/8QEBn6R+hA6bbpRr8oLNh5EVEtnLyyKpJePXmTEnVYtGLqGDlyKTwfy0WSbgi6My iSvOJjjGqikleFr50AmwdM1qnWFvIi3QyjQ786H9g1LQOYSReGILeRYHV25ojKWRg7h4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nrIeB-003K0L-QZ; Wed, 18 May 2022 14:19:23 +0200 Date: Wed, 18 May 2022 14:19:23 +0200 From: Andrew Lunn To: Vivek Kumar Cc: corbet@lwn.net, catalin.marinas@arm.com, will@kernel.org, tglx@linutronix.de, maz@kernel.org, axboe@kernel.dk, rafael@kernel.org, akpm@linux-foundation.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-block@vger.kernel.org, linux-pm@vger.kernel.org, linux-mm@kvack.org, len.brown@intel.com, pavel@ucw.cz, paulmck@kernel.org, bp@suse.de, keescook@chromium.org, songmuchun@bytedance.com, rdunlap@infradead.org, damien.lemoal@opensource.wdc.com, pasha.tatashin@soleen.com, tabba@google.com, ardb@kernel.org, tsoni@quicinc.com, quic_psodagud@quicinc.com, quic_svaddagi@quicinc.com, Prasanna Kumar Subject: Re: [RFC 2/6] PM: Hibernate: Add option to disable disk offset randomization Message-ID: References: <1652860121-24092-1-git-send-email-quic_vivekuma@quicinc.com> <1652860121-24092-3-git-send-email-quic_vivekuma@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1652860121-24092-3-git-send-email-quic_vivekuma@quicinc.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 18, 2022 at 01:18:37PM +0530, Vivek Kumar wrote: > Add a kernel parameter to disable the disk offset randomization > for SSD devices in which such feature is available at the > firmware level. This is helpful in improving hibernation > resume time. > > Signed-off-by: Vivek Kumar > Signed-off-by: Prasanna Kumar > --- > Documentation/admin-guide/kernel-parameters.txt | 11 +++++++++++ > kernel/power/swap.c | 9 +++++++++ > 2 files changed, 20 insertions(+) > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > index 666ade9..06b4f10 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++ b/Documentation/admin-guide/kernel-parameters.txt > @@ -5192,6 +5192,17 @@ > Useful for devices that are detected asynchronously > (e.g. USB and MMC devices). > > + noswap_randomize > + Kernel uses random disk offsets to help with wear-levelling > + of SSD devices, while saving the hibernation snapshot image to > + disk. Use this parameter to disable this feature for SSD > + devices in scenarios when, such randomization is addressed at > + the firmware level and hibenration image is not re-generated > + frequently. > + (Useful for improving hibernation resume time as snapshot pages > + are available in disk serially and can be read in bigger chunks > + without seeking) Seeking is a NOP for SSD, so it seems odd you mentioned that. Is the real problem here that the bootloader driver is very simple, it does not queue multiple reads to the hardware, but does it one block at a time? Do you have performance numbers for both the bootloader and Linux? Does Linux performance reading the snapshot increase as much as for the bootloader? Andrew