From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4005C33CB1 for ; Thu, 16 Jan 2020 08:33:56 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 738A02176D for ; Thu, 16 Jan 2020 08:33:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 738A02176D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0DD138E0053; Thu, 16 Jan 2020 03:33:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 08DAD8E003F; Thu, 16 Jan 2020 03:33:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE53E8E0053; Thu, 16 Jan 2020 03:33:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0104.hostedemail.com [216.40.44.104]) by kanga.kvack.org (Postfix) with ESMTP id D8C558E003F for ; Thu, 16 Jan 2020 03:33:55 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 846CD8248047 for ; Thu, 16 Jan 2020 08:33:55 +0000 (UTC) X-FDA: 76382834430.08.point28_5c705707d3208 X-HE-Tag: point28_5c705707d3208 X-Filterd-Recvd-Size: 4753 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Thu, 16 Jan 2020 08:33:55 +0000 (UTC) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00G8Xh17025572 for ; Thu, 16 Jan 2020 03:33:54 -0500 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0b-001b2d01.pphosted.com with ESMTP id 2xhgs7mfcc-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 16 Jan 2020 03:33:54 -0500 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 16 Jan 2020 08:33:52 -0000 Received: from b06avi18878370.portsmouth.uk.ibm.com (9.149.26.194) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 16 Jan 2020 08:33:47 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 00G8XkE138404580 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 Jan 2020 08:33:46 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2F830AE051; Thu, 16 Jan 2020 08:33:46 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CA152AE056; Thu, 16 Jan 2020 08:33:43 +0000 (GMT) Received: from [9.124.35.38] (unknown [9.124.35.38]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 16 Jan 2020 08:33:43 +0000 (GMT) Subject: Re: [PATCH v15 23/23] selftests: vm: pkeys: Use the correct page size on powerpc To: Michael Ellerman , shuahkh@osg.samsung.com, linux-kselftest@vger.kernel.org Cc: linux-arch@vger.kernel.org, fweimer@redhat.com, linux-mm@kvack.org, aneesh.kumar@linux.ibm.com, x86@kernel.org, linuxram@us.ibm.com, mhocko@kernel.org, dave.hansen@intel.com, mingo@redhat.com, msuchanek@suse.de, linuxppc-dev@lists.ozlabs.org, bauerman@linux.ibm.com References: <87h80x9ozr.fsf@mpe.ellerman.id.au> From: Sandipan Das Date: Thu, 16 Jan 2020 14:03:43 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <87h80x9ozr.fsf@mpe.ellerman.id.au> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 20011608-0016-0000-0000-000002DDC834 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20011608-0017-0000-0000-000033405ED1 Message-Id: <375ed2cc-22ea-ddbf-33d3-febed65eefc6@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-01-16_02:2020-01-16,2020-01-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 impostorscore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001160072 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Michael, On 15/01/20 12:37 pm, Michael Ellerman wrote: > Sandipan Das writes: >> Both 4K and 64K pages are supported on powerpc. Parts of >> the selftest code perform alignment computations based on >> the PAGE_SIZE macro which is currently hardcoded to 64K >> for powerpc. This causes some test failures on kernels >> configured with 4K page size. >> >> This problem is solved by determining the correct page >> size during the build process rather than hardcoding it >> in the header file. > > Doing it at build time is wrong, the test could be built on a 4K system > and then run on a 64K system, or vice versa. > > You should just use getpagesize() at runtime. > > cheers > The reason I chose to do it this way was because PAGE_SIZE also determines the alignment for the function "lots_o_noops_around_write" (which is used by some of the test cases). Since __attribute__((__aligned__(X))) requires X to be a constant, I am not sure if there a way around this. - Sandipan