Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/831043/?format=api
{ "id": 831043, "url": "http://patchwork.ozlabs.org/api/1.2/patches/831043/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20171027040833.3644-2-aneesh.kumar@linux.vnet.ibm.com/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/1.2/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<20171027040833.3644-2-aneesh.kumar@linux.vnet.ibm.com>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20171027040833.3644-2-aneesh.kumar@linux.vnet.ibm.com/", "date": "2017-10-27T04:08:18", "name": "[01/16] powerpc/mm/hash: Remove the superfluous bitwise operation when find hpte group", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "b4d4c3f280843c8ef8db86d798efc7216372a91e", "submitter": { "id": 664, "url": "http://patchwork.ozlabs.org/api/1.2/people/664/?format=api", "name": "Aneesh Kumar K.V", "email": "aneesh.kumar@linux.vnet.ibm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20171027040833.3644-2-aneesh.kumar@linux.vnet.ibm.com/mbox/", "series": [ { "id": 10486, "url": "http://patchwork.ozlabs.org/api/1.2/series/10486/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=10486", "date": "2017-10-27T04:08:17", "name": "Remove hash page table slot tracking from linux PTE", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/10486/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/831043/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/831043/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yNVnZ4xYnz9t0F\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 27 Oct 2017 15:12:02 +1100 (AEDT)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3yNVnZ46BwzDrcc\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 27 Oct 2017 15:12:02 +1100 (AEDT)", "from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n\t[148.163.156.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3yNVk10KMrzDrbl\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 27 Oct 2017 15:08:56 +1100 (AEDT)", "from pps.filterd (m0098409.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv9R48Us8020629\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 27 Oct 2017 00:08:55 -0400", "from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2dur20nm4c-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <linuxppc-dev@lists.ozlabs.org>; Fri, 27 Oct 2017 00:08:54 -0400", "from localhost\n\tby e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <linuxppc-dev@lists.ozlabs.org> from\n\t<aneesh.kumar@linux.vnet.ibm.com>; Thu, 26 Oct 2017 22:08:53 -0600", "from b03cxnp08027.gho.boulder.ibm.com (9.17.130.19)\n\tby e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tThu, 26 Oct 2017 22:08:51 -0600", "from b03ledav001.gho.boulder.ibm.com\n\t(b03ledav001.gho.boulder.ibm.com [9.17.130.232])\n\tby b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v9R48ooc61931528; Thu, 26 Oct 2017 21:08:50 -0700", "from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 9AD5B6E177;\n\tThu, 26 Oct 2017 22:08:50 -0600 (MDT)", "from skywalker.ibmmodules.com (unknown [9.85.199.61])\n\tby b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP id 210516E121;\n\tThu, 26 Oct 2017 22:08:47 -0600 (MDT)" ], "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com\n\t(client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com;\n\tenvelope-from=aneesh.kumar@linux.vnet.ibm.com; receiver=<UNKNOWN>)", "From": "\"Aneesh Kumar K.V\" <aneesh.kumar@linux.vnet.ibm.com>", "To": "benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au", "Subject": "[PATCH 01/16] powerpc/mm/hash: Remove the superfluous bitwise\n\toperation when find hpte group", "Date": "Fri, 27 Oct 2017 09:38:18 +0530", "X-Mailer": "git-send-email 2.13.6", "In-Reply-To": "<20171027040833.3644-1-aneesh.kumar@linux.vnet.ibm.com>", "References": "<20171027040833.3644-1-aneesh.kumar@linux.vnet.ibm.com>", "X-TM-AS-GCONF": "00", "x-cbid": "17102704-0016-0000-0000-000007B76F64", "X-IBM-SpamModules-Scores": "", "X-IBM-SpamModules-Versions": "BY=3.00007958; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000239; SDB=6.00937034; UDB=6.00472245;\n\tIPR=6.00717297; \n\tBA=6.00005660; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017735;\n\tXFM=3.00000015; UTC=2017-10-27 04:08:52", "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused", "x-cbparentid": "17102704-0017-0000-0000-00003C048A7F", "Message-Id": "<20171027040833.3644-2-aneesh.kumar@linux.vnet.ibm.com>", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-10-27_02:, , signatures=0", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tpriorityscore=1501\n\tmalwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0\n\tclxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0\n\tclassifier=spam adjust=0 reason=mlx scancount=1\n\tengine=8.0.1-1707230000\n\tdefinitions=main-1710270052", "X-BeenThere": "linuxppc-dev@lists.ozlabs.org", "X-Mailman-Version": "2.1.24", "Precedence": "list", "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>", "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>", "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>", "Cc": "linuxppc-dev@lists.ozlabs.org,\n\t\"Aneesh Kumar K.V\" <aneesh.kumar@linux.vnet.ibm.com>", "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org", "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>" }, "content": "When computing the starting slot number for a hash page table group we used\nto do this\nhpte_group = ((hash & htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL;\n\nMultiplying with 8 (HPTES_PER_GROUP) imply the last three bits are 0. Hence we\nreally don't need to clear then separately.\n\nSigned-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>\n---\n arch/powerpc/mm/dump_hashpagetable.c | 2 +-\n arch/powerpc/mm/hash64_4k.c | 8 ++++----\n arch/powerpc/mm/hash64_64k.c | 16 ++++++++--------\n arch/powerpc/mm/hash_utils_64.c | 10 ++++------\n arch/powerpc/mm/hugepage-hash64.c | 9 ++++-----\n 5 files changed, 21 insertions(+), 24 deletions(-)", "diff": "diff --git a/arch/powerpc/mm/dump_hashpagetable.c b/arch/powerpc/mm/dump_hashpagetable.c\nindex 5c4c93dcff19..2384d40bfcf4 100644\n--- a/arch/powerpc/mm/dump_hashpagetable.c\n+++ b/arch/powerpc/mm/dump_hashpagetable.c\n@@ -260,7 +260,7 @@ static int pseries_find(unsigned long ea, int psize, bool primary, u64 *v, u64 *\n \t/* to check in the secondary hash table, we invert the hash */\n \tif (!primary)\n \t\thash = ~hash;\n-\thpte_group = ((hash & htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL;\n+\thpte_group = (hash & htab_hash_mask) * HPTES_PER_GROUP;\n \t/* see if we can find an entry in the hpte with this hash */\n \tfor (i = 0; i < HPTES_PER_GROUP; i += 4, hpte_group += 4) {\n \t\tlpar_rc = plpar_pte_read_4(0, hpte_group, (void *)ptes);\ndiff --git a/arch/powerpc/mm/hash64_4k.c b/arch/powerpc/mm/hash64_4k.c\nindex 6fa450c12d6d..975793de0914 100644\n--- a/arch/powerpc/mm/hash64_4k.c\n+++ b/arch/powerpc/mm/hash64_4k.c\n@@ -81,7 +81,7 @@ int __hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid,\n \t\thash = hpt_hash(vpn, shift, ssize);\n \n repeat:\n-\t\thpte_group = ((hash & htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL;\n+\t\thpte_group = (hash & htab_hash_mask) * HPTES_PER_GROUP;\n \n \t\t/* Insert into the hash table, primary slot */\n \t\tslot = mmu_hash_ops.hpte_insert(hpte_group, vpn, pa, rflags, 0,\n@@ -90,7 +90,7 @@ int __hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid,\n \t\t * Primary is full, try the secondary\n \t\t */\n \t\tif (unlikely(slot == -1)) {\n-\t\t\thpte_group = ((~hash & htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL;\n+\t\t\thpte_group = (~hash & htab_hash_mask) * HPTES_PER_GROUP;\n \t\t\tslot = mmu_hash_ops.hpte_insert(hpte_group, vpn, pa,\n \t\t\t\t\t\t\trflags,\n \t\t\t\t\t\t\tHPTE_V_SECONDARY,\n@@ -98,8 +98,8 @@ int __hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid,\n \t\t\t\t\t\t\tMMU_PAGE_4K, ssize);\n \t\t\tif (slot == -1) {\n \t\t\t\tif (mftb() & 0x1)\n-\t\t\t\t\thpte_group = ((hash & htab_hash_mask) *\n-\t\t\t\t\t\t HPTES_PER_GROUP) & ~0x7UL;\n+\t\t\t\t\thpte_group = (hash & htab_hash_mask) *\n+\t\t\t\t\t\t\tHPTES_PER_GROUP;\n \t\t\t\tmmu_hash_ops.hpte_remove(hpte_group);\n \t\t\t\t/*\n \t\t\t\t * FIXME!! Should be try the group from which we removed ?\ndiff --git a/arch/powerpc/mm/hash64_64k.c b/arch/powerpc/mm/hash64_64k.c\nindex 1a68cb19b0e3..f1eb538721fc 100644\n--- a/arch/powerpc/mm/hash64_64k.c\n+++ b/arch/powerpc/mm/hash64_64k.c\n@@ -163,7 +163,7 @@ int __hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid,\n \t}\n \thash = hpt_hash(vpn, shift, ssize);\n repeat:\n-\thpte_group = ((hash & htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL;\n+\thpte_group = (hash & htab_hash_mask) * HPTES_PER_GROUP;\n \n \t/* Insert into the hash table, primary slot */\n \tslot = mmu_hash_ops.hpte_insert(hpte_group, vpn, pa, rflags, 0,\n@@ -172,15 +172,15 @@ int __hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid,\n \t * Primary is full, try the secondary\n \t */\n \tif (unlikely(slot == -1)) {\n-\t\thpte_group = ((~hash & htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL;\n+\t\thpte_group = (~hash & htab_hash_mask) * HPTES_PER_GROUP;\n \t\tslot = mmu_hash_ops.hpte_insert(hpte_group, vpn, pa,\n \t\t\t\t\t\trflags, HPTE_V_SECONDARY,\n \t\t\t\t\t\tMMU_PAGE_4K, MMU_PAGE_4K,\n \t\t\t\t\t\tssize);\n \t\tif (slot == -1) {\n \t\t\tif (mftb() & 0x1)\n-\t\t\t\thpte_group = ((hash & htab_hash_mask) *\n-\t\t\t\t\t HPTES_PER_GROUP) & ~0x7UL;\n+\t\t\t\thpte_group = (hash & htab_hash_mask) *\n+\t\t\t\t\t\tHPTES_PER_GROUP;\n \t\t\tmmu_hash_ops.hpte_remove(hpte_group);\n \t\t\t/*\n \t\t\t * FIXME!! Should be try the group from which we removed ?\n@@ -285,7 +285,7 @@ int __hash_page_64K(unsigned long ea, unsigned long access,\n \t\thash = hpt_hash(vpn, shift, ssize);\n \n repeat:\n-\t\thpte_group = ((hash & htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL;\n+\t\thpte_group = (hash & htab_hash_mask) * HPTES_PER_GROUP;\n \n \t\t/* Insert into the hash table, primary slot */\n \t\tslot = mmu_hash_ops.hpte_insert(hpte_group, vpn, pa, rflags, 0,\n@@ -295,7 +295,7 @@ int __hash_page_64K(unsigned long ea, unsigned long access,\n \t\t * Primary is full, try the secondary\n \t\t */\n \t\tif (unlikely(slot == -1)) {\n-\t\t\thpte_group = ((~hash & htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL;\n+\t\t\thpte_group = (~hash & htab_hash_mask) * HPTES_PER_GROUP;\n \t\t\tslot = mmu_hash_ops.hpte_insert(hpte_group, vpn, pa,\n \t\t\t\t\t\t\trflags,\n \t\t\t\t\t\t\tHPTE_V_SECONDARY,\n@@ -303,8 +303,8 @@ int __hash_page_64K(unsigned long ea, unsigned long access,\n \t\t\t\t\t\t\tMMU_PAGE_64K, ssize);\n \t\t\tif (slot == -1) {\n \t\t\t\tif (mftb() & 0x1)\n-\t\t\t\t\thpte_group = ((hash & htab_hash_mask) *\n-\t\t\t\t\t\t HPTES_PER_GROUP) & ~0x7UL;\n+\t\t\t\t\thpte_group = (hash & htab_hash_mask) *\n+\t\t\t\t\t\t\tHPTES_PER_GROUP;\n \t\t\t\tmmu_hash_ops.hpte_remove(hpte_group);\n \t\t\t\t/*\n \t\t\t\t * FIXME!! Should be try the group from which we removed ?\ndiff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c\nindex 655a5a9a183d..4d4662a77c14 100644\n--- a/arch/powerpc/mm/hash_utils_64.c\n+++ b/arch/powerpc/mm/hash_utils_64.c\n@@ -1723,8 +1723,7 @@ long hpte_insert_repeating(unsigned long hash, unsigned long vpn,\n \tlong slot;\n \n repeat:\n-\thpte_group = ((hash & htab_hash_mask) *\n-\t\t HPTES_PER_GROUP) & ~0x7UL;\n+\thpte_group = (hash & htab_hash_mask) * HPTES_PER_GROUP;\n \n \t/* Insert into the hash table, primary slot */\n \tslot = mmu_hash_ops.hpte_insert(hpte_group, vpn, pa, rflags, vflags,\n@@ -1732,15 +1731,14 @@ long hpte_insert_repeating(unsigned long hash, unsigned long vpn,\n \n \t/* Primary is full, try the secondary */\n \tif (unlikely(slot == -1)) {\n-\t\thpte_group = ((~hash & htab_hash_mask) *\n-\t\t\t HPTES_PER_GROUP) & ~0x7UL;\n+\t\thpte_group = (~hash & htab_hash_mask) * HPTES_PER_GROUP;\n \t\tslot = mmu_hash_ops.hpte_insert(hpte_group, vpn, pa, rflags,\n \t\t\t\t\t\tvflags | HPTE_V_SECONDARY,\n \t\t\t\t\t\tpsize, psize, ssize);\n \t\tif (slot == -1) {\n \t\t\tif (mftb() & 0x1)\n-\t\t\t\thpte_group = ((hash & htab_hash_mask) *\n-\t\t\t\t\t HPTES_PER_GROUP)&~0x7UL;\n+\t\t\t\thpte_group = (hash & htab_hash_mask) *\n+\t\t\t\t\t\tHPTES_PER_GROUP;\n \n \t\t\tmmu_hash_ops.hpte_remove(hpte_group);\n \t\t\tgoto repeat;\ndiff --git a/arch/powerpc/mm/hugepage-hash64.c b/arch/powerpc/mm/hugepage-hash64.c\nindex f20d16f849c5..01f213d2bcb9 100644\n--- a/arch/powerpc/mm/hugepage-hash64.c\n+++ b/arch/powerpc/mm/hugepage-hash64.c\n@@ -128,7 +128,7 @@ int __hash_page_thp(unsigned long ea, unsigned long access, unsigned long vsid,\n \t\tnew_pmd |= H_PAGE_HASHPTE;\n \n repeat:\n-\t\thpte_group = ((hash & htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL;\n+\t\thpte_group = (hash & htab_hash_mask) * HPTES_PER_GROUP;\n \n \t\t/* Insert into the hash table, primary slot */\n \t\tslot = mmu_hash_ops.hpte_insert(hpte_group, vpn, pa, rflags, 0,\n@@ -137,16 +137,15 @@ int __hash_page_thp(unsigned long ea, unsigned long access, unsigned long vsid,\n \t\t * Primary is full, try the secondary\n \t\t */\n \t\tif (unlikely(slot == -1)) {\n-\t\t\thpte_group = ((~hash & htab_hash_mask) *\n-\t\t\t\t HPTES_PER_GROUP) & ~0x7UL;\n+\t\t\thpte_group = (~hash & htab_hash_mask) * HPTES_PER_GROUP;\n \t\t\tslot = mmu_hash_ops.hpte_insert(hpte_group, vpn, pa,\n \t\t\t\t\t\t\trflags,\n \t\t\t\t\t\t\tHPTE_V_SECONDARY,\n \t\t\t\t\t\t\tpsize, lpsize, ssize);\n \t\t\tif (slot == -1) {\n \t\t\t\tif (mftb() & 0x1)\n-\t\t\t\t\thpte_group = ((hash & htab_hash_mask) *\n-\t\t\t\t\t\t HPTES_PER_GROUP) & ~0x7UL;\n+\t\t\t\t\thpte_group = (hash & htab_hash_mask) *\n+\t\t\t\t\t\t\tHPTES_PER_GROUP;\n \n \t\t\t\tmmu_hash_ops.hpte_remove(hpte_group);\n \t\t\t\tgoto repeat;\n", "prefixes": [ "01/16" ] }