Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1000445pxy; Wed, 5 May 2021 20:45:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxa40+3LpDQcWIZXS54MvWILwlgiD9rTJ/NsrJ80ah5E2M2hRDNfjxbWG1rAarLxPpHntPC X-Received: by 2002:a17:90a:6e5:: with SMTP id k92mr15445350pjk.198.1620272709254; Wed, 05 May 2021 20:45:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620272709; cv=none; d=google.com; s=arc-20160816; b=uK80gWPMPa9oziadogroJgwZV9JjyDKkSl1hUI0y8WxJuPyibGaBuOfwF53EKF2Z76 iq4oKb1+wpCx9c0m6/vWDjl9/BmApDYZJu5B+yqAP2WbN/Mnr8Vr9exuC4LeVCluRE3w Ph1L+NmnUjn7EFCkuZ6xJ3xTanXBqzd7lFsUPEGTnhGVlcbzvRZMAzgXTr1FtBNemitY dP3sgCoW6yowjhWbf3d7wWPeLFrUS1I0+udr9nVaFYof7L7Qg8sg8yPFiRCouEjPdIYn Ix6C1HB4BKSDIrJQPCNJ+ycnX1wTKCVzbUaZ+ujwg+D5Zvq/PiW5fk0mANnU+jO/I4Z+ Q0dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=LtI/qARrVtyRLv2Ko8RxYpnsY7rF6P5F3GoT8MWEYKc=; b=kxcUqcMeeogWAfeAPpAkAIcWRnePwnvmwbU09ucafaEcNrdIsEGtrnpDk5XIUdsrlO 7IMF+ar9F5srdbZTAirwiqxzSVD9vQc0Zrp6MjHtWE+kAVLOoRGZcVEBOIS3RU7XNa/S qYOsrwkUnNBua9HFGovYys6FkqeASjPut+XlW36NuuTqu7b6s0dL2q9ID9FlZwxIXo/O 2rwIrnbGR1fbNVU9C0nf5SLK3yHi+ij/UMpOpmw5oobBpRCyNAJ6VvElCtOHCz+RO9jg R1DTG0+FvXi2ZupAFVH0WXvlmn6J3DU1or8xdygnzLzF7gWWPpJcy7IpBQYPCcxatXgh 571g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o1si1441992pgr.518.2021.05.05.20.44.56; Wed, 05 May 2021 20:45:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230246AbhEFD2G (ORCPT + 99 others); Wed, 5 May 2021 23:28:06 -0400 Received: from mx2.suse.de ([195.135.220.15]:59932 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229725AbhEFD2F (ORCPT ); Wed, 5 May 2021 23:28:05 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 3DE47B01C; Thu, 6 May 2021 03:27:07 +0000 (UTC) Subject: Re: [PATCH -next v4] bcache: Use DEFINE_MUTEX() for mutex lock To: Zheng Yongjun Cc: Hulk Robot , kent.overstreet@gmail.com, linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210505110655.1461896-1-zhengyongjun3@huawei.com> From: Coly Li Message-ID: <8a60b85c-b4c3-5b4c-af1f-877980800ba7@suse.de> Date: Thu, 6 May 2021 11:27:03 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210505110655.1461896-1-zhengyongjun3@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/5/21 7:06 PM, Zheng Yongjun wrote: > Mutex lock can be initialized automatically with DEFINE_MUTEX() rather > than explicitly calling mutex_init(). > > This patch will reduce the size of bcache.ko about 16 bytes, the > reason as follows: > > Though this patch will increase the size of .data segment about 32 > bytes, it will also reduce the size of .init.text and > .rodata.str1.1(at x86_64), .rodata_str1.8(at arm64) total about 48 > bytes which reduce the size more than .data segment; > > Here is the statistics: > Sections: (arm64 platform) > Idx name size > -.init.text 00000240 > +.init.text 00000228 > > -.rodata.str1.8 000012cd > +.rodata.str1.8 000012b5 > > -.data 00000c60 > +.data 00000c80 > > Sections: (x86 platform) > Idx name size > -.init.text 000001d9 > +.init.text 000001bf > > -.rodata.str1.1 00000c80 > +.rodata.str1.1 00000c6d > > -.data 00000cc0 > +.data 00000ce0 > > Reported-by: Hulk Robot > Signed-off-by: Zheng Yongjun Added in my for-test queue. Thanks. Coly Li [snipped]