Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp555588imm; Fri, 5 Oct 2018 08:06:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV63U1HhVXoz6QhRJo4LRNjdZ1VxgCTH0nnQ7HAwx+MiaTqVZ7NXtPSTIVCYEuBVSxy0fJvKA X-Received: by 2002:a62:21d1:: with SMTP id o78-v6mr12215712pfj.235.1538751992047; Fri, 05 Oct 2018 08:06:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538751992; cv=none; d=google.com; s=arc-20160816; b=ZoFP3LQ8fjHXMz3Vz479HoWvXUFHSh+bNuGID0cQ4gSJGNYZjgVU0GuiqBH1yg7FwH aDJpaHMHiZNJGBgO++gXi2hbFGvIJNN+ea9g4Sx9ZfzYL0Kdrja96mWr7VHcx8VTplto ggb2ABoQfOL4aP2RMd+wDzZEJ10nGWHZXKzcxk2oFKPzMzsTHZLXcSEF3jCCvnY83g0E jrHPfs67+ptHupPo2uj5ljPBc/iDlDlijO+IkHTdZbDTxUfUVwWetu9JYYaoXbujPZcr WPQj/iYZEZWszW/U/VF4ufEM72e5Oef0XCuflxdkc+tZSLUvhuUi996oQIZbaRldeAiW S7lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date; bh=8JtIbYEQKIyjlYo4fsMwQnCl2N6vXCJYCryPqQyjXTA=; b=JCFsA4LFu75nzmov+EcuYnkC8oSS44XoSo4Ai1xz/xgdmvtixQMASMFoUD6ByGFYJZ m/7EKfsAU0QYw9tbX5Iz+0BfuTh7vk0etn1neYRFIQDVlOITqXnx6Qtv+GMjjk4unqfC tF8ig4TtN/smwT7XlRL8aNcIgEFP/fP50sFvePr4EVh4RLVatE8zfzklpk02CohmLqRg Pa70ACRcgF+q877suqmYS3nm+E6LhVBQjyZyGRQzeCV8QaD6pBdAw2XLq1FwFH8q1WFX euMt8zyqFoWz0m5SGqUk0QsZbLocRh8ORy9QOTFiCjA5l6lSbs0SmHqKbYptCTuU3Jyu WroA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p18-v6si8212648pgb.217.2018.10.05.08.06.16; Fri, 05 Oct 2018 08:06:31 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728260AbeJEWFB convert rfc822-to-8bit (ORCPT + 99 others); Fri, 5 Oct 2018 18:05:01 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:60522 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726082AbeJEWFA (ORCPT ); Fri, 5 Oct 2018 18:05:00 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w95F4ecO016107 for ; Fri, 5 Oct 2018 11:05:53 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2mx9wr1eur-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 05 Oct 2018 11:05:53 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 5 Oct 2018 16:05:51 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 5 Oct 2018 16:05:44 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w95F5h3u63897732 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 5 Oct 2018 15:05:43 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1D453AE045; Fri, 5 Oct 2018 18:04:33 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C216EAE051; Fri, 5 Oct 2018 18:04:32 +0100 (BST) Received: from [9.148.204.169] (unknown [9.148.204.169]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 5 Oct 2018 18:04:32 +0100 (BST) Date: Fri, 05 Oct 2018 18:05:01 +0300 User-Agent: K-9 Mail for Android In-Reply-To: <8891277c7de92e93d3bfc409df95810ee6f103cd.camel@kernel.crashing.org> References: <1538687224-17535-1-git-send-email-rppt@linux.vnet.ibm.com> <8891277c7de92e93d3bfc409df95810ee6f103cd.camel@kernel.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH] memblock: stop using implicit alignement to SMP_CACHE_BYTES To: Benjamin Herrenschmidt , linux-mm@kvack.org CC: linux-mips@linux-mips.org, Michal Hocko , linux-ia64@vger.kernel.org, Catalin Marinas , Richard Weinberger , Russell King , Ingo Molnar , Geert Uytterhoeven , Matt Turner , linux-um@lists.infradead.org, linux-m68k@vger.kernel.org, Thomas Gleixner , Guan Xuetao , linux-arm-kernel@lists.infradead.org, Chris Zankel , Michal Simek , Tony Luck , linux-kernel@vger.kernel.org, Paul Burton , linux-alpha@vger.kernel.org, Andrew Morton , linuxppc-dev@lists.ozlabs.org From: Mike Rapoport X-TM-AS-GCONF: 00 x-cbid: 18100515-0020-0000-0000-000002D00A38 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18100515-0021-0000-0000-0000211E6102 Message-Id: <59C9470E-F718-4A11-BC65-FD68901723AC@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-10-05_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=694 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810050153 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On October 5, 2018 6:25:38 AM GMT+03:00, Benjamin Herrenschmidt wrote: >On Fri, 2018-10-05 at 00:07 +0300, Mike Rapoport wrote: >> When a memblock allocation APIs are called with align = 0, the >alignment is >> implicitly set to SMP_CACHE_BYTES. >> >> Replace all such uses of memblock APIs with the 'align' parameter >explicitly >> set to SMP_CACHE_BYTES and stop implicit alignment assignment in the >> memblock internal allocation functions. >> >> For the case when memblock APIs are used via helper functions, e.g. >like >> iommu_arena_new_node() in Alpha, the helper functions were detected >with >> Coccinelle's help and then manually examined and updated where >appropriate. >> >> The direct memblock APIs users were updated using the semantic patch >below: > >What is the purpose of this ? It sounds rather counter-intuitive... Why? I think it actually more intuitive to explicitly set alignment to SMP_CACHE_BYTES rather than use align = 0 because deeply inside allocator it will be implicitly reset to SMP_CACHE_BYTES... >Ben. -- Sincerely yours, Mike.