Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1810792rdb; Tue, 3 Oct 2023 01:21:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEZnm2NsXMctkRLUeYaQz9jCqEdixuRLFkoqlC0DCS5UQgGIu7EIiAo9kcju3A6kfeR2gmO X-Received: by 2002:a05:6358:2820:b0:134:e4fe:e162 with SMTP id k32-20020a056358282000b00134e4fee162mr12023916rwb.13.1696321261829; Tue, 03 Oct 2023 01:21:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696321261; cv=none; d=google.com; s=arc-20160816; b=YUzixit33YJ6bpWMiYhRiZOL4gFwjD4fUQJNE49LvyWYlJAnBb2d9+ZpBJLR7D2ppX hxBcN8BjSrxj5Oh/WL8Ogp7ov1RkbE8EsmTcJxhjoLtUG/KQWt7pk5mBi+K63NjIxhM1 DAzJd8xm4JVhwzTGLK/rKi/Q4agfchkXUHoJUUUUHXlfj5G/43pdKWUeDkK5t7W2I2iI fnHqx0ElVRtLgsVuY3hS4vjH1C6XZn535vjXuK2WZ7QyL1eikdmHCyvjga+KaX3ueOLh 0eL24OptH20OGITGMyKTnVf9AfffgBcfhnR4z0FSW4oXAMSHtmMGNoIa2ZuHSw9ttjyp Zcmw== 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=TcTNHIkQ4u7p4BAUZJiauYpzglJBMjfppSZlDSU/BEs=; fh=QavXAaLJ2zDG6nhEQ1vNtf9P43VDIGR9Bj95o9TpfMc=; b=g+gYdXSlLhjLMR4elKJ7Am+dh8gsuSGH8nclU3BOXnh3I8sfMi9n4AzjjLCWIemM/r Pf4oafUDb3TevY8mB63Y+HCgUrZ+BukCe0ww108AQaCWNbymt85PF2X9YZJKnJ9R9+yP 7k2KylzNiv/wIjOLUGGY5jXxD3Lo8th4EbZRddOj2nISKhbtOJit+2dj5hYcZtqYurSU akNKGVrG4rS4+N5puLua0z7O+Y9lhdHrQNv7118iFL1bYXxn8Uq8o/9ootg7KVErVkrw Ww71P4J1fQtdLVPKeBw0hSLc7AmD1tkqCkFzMy8xq3cVieGSN6o1lvpaD6hKQa4ZvLXa GYOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oHJiWFNg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id w64-20020a638243000000b0054fdfd26dffsi942677pgd.337.2023.10.03.01.21.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 01:21:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oHJiWFNg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 4972D80A97C0; Tue, 3 Oct 2023 01:20:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239254AbjJCIUB (ORCPT + 99 others); Tue, 3 Oct 2023 04:20:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231169AbjJCIT7 (ORCPT ); Tue, 3 Oct 2023 04:19:59 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 207E79B; Tue, 3 Oct 2023 01:19:56 -0700 (PDT) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3936IMQB006279; Tue, 3 Oct 2023 08:19:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=qcppdkim1; bh=TcTNHIkQ4u7p4BAUZJiauYpzglJBMjfppSZlDSU/BEs=; b=oHJiWFNg6t5Ubk5u9+3JUmnKliT7XK3vX+clNZUkabl5fLO3rkCM+/UooqvYaDnUZBgm rQLGBXcxjnRfqM78RRDMzk1sKAfnby6sA1zr4P4Gml8MLEefm0PeGpfg4N4/kO38WhMD LWTSBst9O2vgpkWxw+doh4veN9KKDdCV4zCV1fGrKkxIS9wHBubD+/lKHq4X1HJKfD+P 3XGI//1y252OxCoSfyCD0JYCpEdc4p0tlXza8QWupBMuqWE7pWcK2cN76lt9b8u37wdS CliLgCJMjL9G8Nm48XMRM4i8+/44P09rKLtEpzLknUHrxvjr7E+bdz78GDYyNpHmr99/ GA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3teb0sdfmn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Oct 2023 08:19:41 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3938JdPG028623 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 3 Oct 2023 08:19:39 GMT Received: from hu-pkondeti-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.36; Tue, 3 Oct 2023 01:19:33 -0700 Date: Tue, 3 Oct 2023 13:49:31 +0530 From: Pavan Kondeti To: Nikhil V CC: Len Brown , Pavel Machek , "Jonathan Corbet" , "Rafael J. Wysocki" , "Catalin Marinas" , Randy Dunlap , Peter Zijlstra , "Steven Rostedt (Google)" , "Paul E. McKenney" , Tejun Heo , , , , , , , , , Subject: Re: [RFC PATCH 4/4] PM: hibernate: Support to select compression algorithm Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: u0CueN4UH5JRGEfWEM-_T2cJQeyN29GJ X-Proofpoint-ORIG-GUID: u0CueN4UH5JRGEfWEM-_T2cJQeyN29GJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-03_05,2023-10-02_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 impostorscore=0 bulkscore=0 suspectscore=0 adultscore=0 mlxscore=0 clxscore=1015 phishscore=0 malwarescore=0 lowpriorityscore=0 spamscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310030056 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Tue, 03 Oct 2023 01:20:21 -0700 (PDT) On Tue, Sep 26, 2023 at 02:27:14PM +0530, Nikhil V wrote: > +static const char * const comp_alg_enabled[] = { > +#if IS_ENABLED(CONFIG_CRYPTO_LZO) > + COMPRESSION_ALGO_LZO, > +#endif > +#if IS_ENABLED(CONFIG_CRYPTO_LZ4) > + COMPRESSION_ALGO_LZ4, > +#endif > +}; > + > +static int __init compression_setup(char *str) > +{ > + int i; > + > + for (i = 0; i < ARRAY_SIZE(comp_alg_enabled); i++) { > + if (!strcmp(str, comp_alg_enabled[i])) { > + strscpy(hib_comp_algo, str, sizeof(hib_comp_algo)); > + goto setup_done; > + } > + } > + strscpy(hib_comp_algo, default_compressor, sizeof(hib_comp_algo)); > + > +setup_done: > + return 1; > +} > + > __setup("noresume", noresume_setup); > __setup("resume_offset=", resume_offset_setup); > __setup("resume=", resume_setup); > @@ -1423,3 +1449,4 @@ __setup("hibernate=", hibernate_setup); > __setup("resumewait", resumewait_setup); > __setup("resumedelay=", resumedelay_setup); > __setup("nohibernate", nohibernate_setup); > +__setup("hib_compression=", compression_setup); > -- If I pass hib_compression=lz4 without enabling CONFIG_CRYPTO_LZ4, It silently makes the compression to lzo which is expected from this code. It would be good if an error/info message is printed in compression_setup() which this happens. Thanks, Pavan