From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755214AbcEXJVx (ORCPT ); Tue, 24 May 2016 05:21:53 -0400 Received: from mail-db3on0148.outbound.protection.outlook.com ([157.55.234.148]:30866 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751602AbcEXJVu (ORCPT ); Tue, 24 May 2016 05:21:50 -0400 X-Greylist: delayed 5116 seconds by postgrey-1.27 at vger.kernel.org; Tue, 24 May 2016 05:21:49 EDT Authentication-Results: linux-foundation.org; dkim=none (message not signed) header.d=none;linux-foundation.org; dmarc=none action=none header.from=virtuozzo.com; From: Vladimir Davydov To: Andrew Morton CC: Johannes Weiner , Michal Hocko , , , , , Subject: [PATCH RESEND 1/8] mm: remove pointless struct in struct page definition Date: Tue, 24 May 2016 11:49:23 +0300 Message-ID: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [195.214.232.10] X-ClientProxiedBy: VI1PR0901CA0081.eurprd09.prod.outlook.com (10.167.203.177) To VI1PR08MB0592.eurprd08.prod.outlook.com (10.163.169.22) X-MS-Office365-Filtering-Correlation-Id: a8b76e6b-d1fa-4e22-b479-08d383b0566d X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0592;2:E4KSVXidy2DTgsJ/Ig6P6cke6y+cfolvJJnLi5Tm0yo3IzPVSjokyhSJqOcsHicveAEDBOXvwWiIEp/wiAkbcqAkvfN8hHYFS6EJq1dJeGYfmrY80EV45dJFtAE4BYdwzKRwNmmgDvBmHcMrdVmer4AqafIHkLyKAsUvY352WhbwBmojjaOar0L70bNRQfRz;3:s6ltmPBTX/YatpGYoQwRWO7QUAimzv8Hl6pNq/xJ6MuoD4H02yLiS2NCK+zqMCHHaIocOP0mKjzTkE49uI33o4CxCs/M9NaVOttpTQYXG9qLB5FkZ9Vi/CWoeo/a3a9D X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR08MB0592; X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0592;25:ywrm07Y2r3A78sPn/+zookJIdk/wgICJDM530Jrb5ZQyqUJqJHbrBFf52bHjLqneguKGd62nqs6hU7J1dt9nXppHf8XHk4Deh4axY0Vk/wUEltz2bgSN1HKUjhsye6IMi0RKrQlVSaTOCl1RIT/YeuuMdtTkhTLrw541stlH0jWfXGm3RF8vsuAOTnrG9b7O0w82KOAFI9D43TyJV+qT6Cy9u1LAKa0ojhVtRN6o8uFEF1p7LSekPrQTw97SGMyH4PqGb0W4eSwpvNBeazM3rcMebXdQTMEG0wJ9l/PmpuUr13WdHgTk1cT3E/zotaBCYH+cZRtpPgTtYfRY7jE3P9riv/cja5lbdRGYz1vn8hw+WhDa5nndRGcXj0841f5XAkZSFXxNTq1RTKlJ9u+OWA7TuXu8XjHYapMu2aq3V7CMW4gCw0e5OHWCf6IMACp+i7B8GtTjzsAnVfiR3tvYvbiRlJu9VhWvwehKCJUTEE7211v1KCzXJYfRgAwvctpu49asSY8G8scFEwohFMWmQFmyVEpYk+eOpL/7372DmnZeDWtAHtrdVWkN5X/BXwFn5K40iUh/VJ5YmXkbDItsJXKAhTEM2T/9249kDhq+98yX+hr5SdFTJDtVHO6eYEx6+Hf6qBsGdUNfKLjvVZNapwPEG5gl8B2izNJS++JUVw+jbcE6aAKtqqnntqFD473+4vBR1BqyeBbj3vcqRjbTlsEQ82qQYwPDlP2Na2qZ45JOXdUhSn0anqArNO/w83uz X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040130)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041072)(6043046);SRVR:VI1PR08MB0592;BCL:0;PCL:0;RULEID:;SRVR:VI1PR08MB0592; X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0592;4:Hy+7ratDQd4xSK0OoJzYDPzUZDpY0MCo/rtmfhDI48spKdHrHMoQzASr0iF84Ub14rAYBK/gs0w/0l3Hh/Wx3IW0oteSHot2GL3lb0kGokfIe2h0qjFvo6nIlBRHoNTr4LUEYLSRmZgv1iUNxi9eIcjM3dNbMCiqGlSWAetxnOwJGXPxo+tIR/uNQy6aSt81B7Kjpzz/6v7YwnKW2Do7oQNEKv5SpYP29et/ow9aYXKBFtp0oaoLnBVtTXUgxxw9AqW6irQePJ+0qhs+FPyWQPiYFyQ4b5pFW/H94c9/SErpbZd02Te7gONPzbb53nFt/+m4CtvNFqOiNLxzIF4YU48znmiIu2mqD0yGhv2GRdtTPXDE/e8+qlyGg2C0oe6LrLkvURmDTqVq8isUKIO7Xpk2esM3OoL9ABGQ6w8IHp8= X-Forefront-PRVS: 09525C61DB X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(586003)(36756003)(3846002)(6116002)(2950100001)(77096005)(76176999)(50986999)(86362001)(110136002)(92566002)(19580405001)(118296001)(19580395003)(5008740100001)(189998001)(229853001)(2906002)(4326007)(47776003)(5004730100002)(66066001)(50466002)(8676002)(80792005)(5003940100001)(33646002)(81166006)(42186005)(48376002)(50226002)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR08MB0592;H:virtuozzo.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0592;23:ulYEwaVvjUhyo+ptPTP73wxWRAy4zx/q9qVicz+Kne6WN6bcpFqyWKgDUkeU6dy8GYwIziXi6JiNSeT0QbZO2fLyI4+q8xzPlThpI86nq/tgOu0KmunmhebMxEvm8NMniQPm2yCS0FInilnb/bR7O3Y6RDFkqqWTYsUbmhyiAPhkuNVtkppBgpNjfdeTXA9pSN39DuSV4PbDKact3Yznb7glrJkR4/l71W4uIFQ7Rw6/v0kQmAw3mjyjTolyO11l5uSosEroIZwpLwUlO9RodfYry+D9Tohq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/L/yQE0mbMca3qAnDPbhfzeJINfaGHTyZS8CqlIoTNHeB3GL83XMKVMnXAmUPyibIn25zCMa+H+EHbz;20:4BgWsmeCZSkTUrKTNG4F6u34NAmMXM1asW/FMdmAu19s5qMr42zJguW1MZ+KlO4MDmoLA/u7kcAXAEdtQpM0VCuJIngZnRddoxBHYdZNw32iTZIbl1A1JddNAad6LiE3Yhu+YpgG81z9bGdlT3uuoK7RZESapPRnINjrCbhw9nc= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2016 08:49:36.8290 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB0592 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ... to reduce indentation level thus leaving more space for comments. Signed-off-by: Vladimir Davydov --- include/linux/mm_types.h | 68 +++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index d553855503e6..3cc5977a9cab 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -60,51 +60,47 @@ struct page { }; /* Second double word */ - struct { - union { - pgoff_t index; /* Our offset within mapping. */ - void *freelist; /* sl[aou]b first free object */ - /* page_deferred_list().prev -- second tail page */ - }; + union { + pgoff_t index; /* Our offset within mapping. */ + void *freelist; /* sl[aou]b first free object */ + /* page_deferred_list().prev -- second tail page */ + }; - union { + union { #if defined(CONFIG_HAVE_CMPXCHG_DOUBLE) && \ defined(CONFIG_HAVE_ALIGNED_STRUCT_PAGE) - /* Used for cmpxchg_double in slub */ - unsigned long counters; + /* Used for cmpxchg_double in slub */ + unsigned long counters; #else - /* - * Keep _refcount separate from slub cmpxchg_double - * data. As the rest of the double word is protected by - * slab_lock but _refcount is not. - */ - unsigned counters; + /* + * Keep _refcount separate from slub cmpxchg_double data. + * As the rest of the double word is protected by slab_lock + * but _refcount is not. + */ + unsigned counters; #endif + struct { - struct { - - union { - /* - * Count of ptes mapped in mms, to show - * when page is mapped & limit reverse - * map searches. - */ - atomic_t _mapcount; - - struct { /* SLUB */ - unsigned inuse:16; - unsigned objects:15; - unsigned frozen:1; - }; - int units; /* SLOB */ - }; + union { /* - * Usage count, *USE WRAPPER FUNCTION* - * when manual accounting. See page_ref.h + * Count of ptes mapped in mms, to show when + * page is mapped & limit reverse map searches. */ - atomic_t _refcount; + atomic_t _mapcount; + + unsigned int active; /* SLAB */ + struct { /* SLUB */ + unsigned inuse:16; + unsigned objects:15; + unsigned frozen:1; + }; + int units; /* SLOB */ }; - unsigned int active; /* SLAB */ + /* + * Usage count, *USE WRAPPER FUNCTION* when manual + * accounting. See page_ref.h + */ + atomic_t _refcount; }; }; -- 2.1.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Davydov Subject: [PATCH RESEND 1/8] mm: remove pointless struct in struct page definition Date: Tue, 24 May 2016 11:49:23 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Cc: Johannes Weiner , Michal Hocko , , , , , To: Andrew Morton Return-path: In-Reply-To: Sender: owner-linux-mm@kvack.org List-Id: netdev.vger.kernel.org ... to reduce indentation level thus leaving more space for comments. Signed-off-by: Vladimir Davydov --- include/linux/mm_types.h | 68 +++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index d553855503e6..3cc5977a9cab 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -60,51 +60,47 @@ struct page { }; /* Second double word */ - struct { - union { - pgoff_t index; /* Our offset within mapping. */ - void *freelist; /* sl[aou]b first free object */ - /* page_deferred_list().prev -- second tail page */ - }; + union { + pgoff_t index; /* Our offset within mapping. */ + void *freelist; /* sl[aou]b first free object */ + /* page_deferred_list().prev -- second tail page */ + }; - union { + union { #if defined(CONFIG_HAVE_CMPXCHG_DOUBLE) && \ defined(CONFIG_HAVE_ALIGNED_STRUCT_PAGE) - /* Used for cmpxchg_double in slub */ - unsigned long counters; + /* Used for cmpxchg_double in slub */ + unsigned long counters; #else - /* - * Keep _refcount separate from slub cmpxchg_double - * data. As the rest of the double word is protected by - * slab_lock but _refcount is not. - */ - unsigned counters; + /* + * Keep _refcount separate from slub cmpxchg_double data. + * As the rest of the double word is protected by slab_lock + * but _refcount is not. + */ + unsigned counters; #endif + struct { - struct { - - union { - /* - * Count of ptes mapped in mms, to show - * when page is mapped & limit reverse - * map searches. - */ - atomic_t _mapcount; - - struct { /* SLUB */ - unsigned inuse:16; - unsigned objects:15; - unsigned frozen:1; - }; - int units; /* SLOB */ - }; + union { /* - * Usage count, *USE WRAPPER FUNCTION* - * when manual accounting. See page_ref.h + * Count of ptes mapped in mms, to show when + * page is mapped & limit reverse map searches. */ - atomic_t _refcount; + atomic_t _mapcount; + + unsigned int active; /* SLAB */ + struct { /* SLUB */ + unsigned inuse:16; + unsigned objects:15; + unsigned frozen:1; + }; + int units; /* SLOB */ }; - unsigned int active; /* SLAB */ + /* + * Usage count, *USE WRAPPER FUNCTION* when manual + * accounting. See page_ref.h + */ + atomic_t _refcount; }; }; -- 2.1.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f70.google.com (mail-lf0-f70.google.com [209.85.215.70]) by kanga.kvack.org (Postfix) with ESMTP id DD8276B025E for ; Tue, 24 May 2016 04:49:40 -0400 (EDT) Received: by mail-lf0-f70.google.com with SMTP id s130so5517862lfs.2 for ; Tue, 24 May 2016 01:49:40 -0700 (PDT) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0139.outbound.protection.outlook.com. [104.47.1.139]) by mx.google.com with ESMTPS id rz7si2762369wjb.177.2016.05.24.01.49.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 May 2016 01:49:39 -0700 (PDT) From: Vladimir Davydov Subject: [PATCH RESEND 1/8] mm: remove pointless struct in struct page definition Date: Tue, 24 May 2016 11:49:23 +0300 Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Johannes Weiner , Michal Hocko , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org ... to reduce indentation level thus leaving more space for comments. Signed-off-by: Vladimir Davydov --- include/linux/mm_types.h | 68 +++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index d553855503e6..3cc5977a9cab 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -60,51 +60,47 @@ struct page { }; /* Second double word */ - struct { - union { - pgoff_t index; /* Our offset within mapping. */ - void *freelist; /* sl[aou]b first free object */ - /* page_deferred_list().prev -- second tail page */ - }; + union { + pgoff_t index; /* Our offset within mapping. */ + void *freelist; /* sl[aou]b first free object */ + /* page_deferred_list().prev -- second tail page */ + }; - union { + union { #if defined(CONFIG_HAVE_CMPXCHG_DOUBLE) && \ defined(CONFIG_HAVE_ALIGNED_STRUCT_PAGE) - /* Used for cmpxchg_double in slub */ - unsigned long counters; + /* Used for cmpxchg_double in slub */ + unsigned long counters; #else - /* - * Keep _refcount separate from slub cmpxchg_double - * data. As the rest of the double word is protected by - * slab_lock but _refcount is not. - */ - unsigned counters; + /* + * Keep _refcount separate from slub cmpxchg_double data. + * As the rest of the double word is protected by slab_lock + * but _refcount is not. + */ + unsigned counters; #endif + struct { - struct { - - union { - /* - * Count of ptes mapped in mms, to show - * when page is mapped & limit reverse - * map searches. - */ - atomic_t _mapcount; - - struct { /* SLUB */ - unsigned inuse:16; - unsigned objects:15; - unsigned frozen:1; - }; - int units; /* SLOB */ - }; + union { /* - * Usage count, *USE WRAPPER FUNCTION* - * when manual accounting. See page_ref.h + * Count of ptes mapped in mms, to show when + * page is mapped & limit reverse map searches. */ - atomic_t _refcount; + atomic_t _mapcount; + + unsigned int active; /* SLAB */ + struct { /* SLUB */ + unsigned inuse:16; + unsigned objects:15; + unsigned frozen:1; + }; + int units; /* SLOB */ }; - unsigned int active; /* SLAB */ + /* + * Usage count, *USE WRAPPER FUNCTION* when manual + * accounting. See page_ref.h + */ + atomic_t _refcount; }; }; -- 2.1.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org