Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752537AbdI2QGB (ORCPT ); Fri, 29 Sep 2017 12:06:01 -0400 Received: from mail-eopbgr50111.outbound.protection.outlook.com ([40.107.5.111]:65403 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752464AbdI2QF5 (ORCPT ); Fri, 29 Sep 2017 12:05:57 -0400 Subject: [PATCH REBASED 0/6] rwsem: Implement down_read_killable() From: Kirill Tkhai To: linux-ia64@vger.kernel.org, avagin@virtuozzo.com, peterz@infradead.org, heiko.carstens@de.ibm.com, hpa@zytor.com, gorcunov@virtuozzo.com, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, x86@kernel.org, mingo@redhat.com, mattst88@gmail.com, fenghua.yu@intel.com, arnd@arndb.de, ktkhai@virtuozzo.com, ink@jurassic.park.msu.ru, tglx@linutronix.de, rth@twiddle.net, tony.luck@intel.com, linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org, schwidefsky@de.ibm.com, davem@davemloft.net, rientjes@google.com, viro@zeniv.linux.org.uk Date: Fri, 29 Sep 2017 19:05:45 +0300 Message-ID: <150670038738.23930.7190484711222807884.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [195.214.232.6] X-ClientProxiedBy: DB6PR1001CA0024.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:4:b7::34) To DB6PR0801MB1334.eurprd08.prod.outlook.com (2603:10a6:4:a::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8bf69177-def2-4901-542b-08d50753f4a1 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075);SRVR:DB6PR0801MB1334; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0801MB1334;3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Thski/A0ioCWlBj7DTpiYnbiQhWYLPdT4IrlvKTvE2uwd150GpvVpnT8GjO00Kgs2DbHDctzus5k38AQXcJhxx8L7Nxf6e+OTWRsF+nm1HmeanX6nxUQnrNUxHpiz/YDjBr2lnntYbHRkgpZE+0hAnXud/FeC+xm94NZoZAuQ6/bprKsGcilLvPIBv/FDd/7bgbguE0RaywyprlpeASUC3qN8XNRlot6G59TAqF+8NyC0THGj1ZEpXaIz8ynfCuMetEuKChqO6Me3g4=;4:4YEEEfAQolS6evYW2uUzWq2BxBYwNblxGgwXTd2hWskVk6K+0S8NgBRMr8npqUJAxJvUsv5s//yoCUpx7UVEqFWOjs+tMfLvRBeZZE+Fawk9S0/sE+dzpYhgsAy6tnKG89IeC64PYXGcb9CNmJSiIK1tOXZYMHKRvme6KDaG/Td3sCivXmli1b7vGUX9ASNF764FOvfXzh1ZpMJZkCTpFSqQ1mD6CWV1JA4Vr+L9NKZC1tLnGM6DB+1XNU10jYQJ X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3002001)(6041248)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DB6PR0801MB1334;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DB6PR0801MB1334; X-Forefront-PRVS: 0445A82F82 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(6009001)(376002)(346002)(39830400002)(189002)(199003)(103116003)(478600001)(305945005)(55016002)(83506001)(2906002)(7736002)(16526017)(9686003)(230700001)(81156014)(81166006)(3846002)(101416001)(8936002)(66066001)(50986999)(61506002)(8676002)(6116002)(25786009)(54356999)(105586002)(97736004)(50466002)(53936002)(86362001)(68736007)(189998001)(6666003)(7416002)(47776003)(106356001)(33646002)(5660300001)(23676002)(316002)(39060400002)(6506006)(58126008)(921003)(217873001)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:DB6PR0801MB1334;H:localhost.localdomain;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjZQUjA4MDFNQjEzMzQ7MjM6RVJsUCtiMHM5bUpxdjhLQmtTSUxWZ2FW?= =?utf-8?B?VEVRUWZzYVBOTE9vYkh5dFdVUThqNEYwQVYycmZ5QWxHQ2lwTHd5dkQwZXpy?= =?utf-8?B?MWRwcTRscW01NVZKTlliYkI1eTNDZlk5YUlMQTIxUzVCZjlYREp3amJQVU1y?= =?utf-8?B?Vjl0Q3RCS25rSmdFY3BrQzBtcURYYXkzMUU2aHB4WmpiUzY1d3NQWGZmMUpq?= =?utf-8?B?NmVpdVliaXh0bnZtRnBRcklaaWkwSzhQWjNxSXBrQjNZNzRkb1hYUXN2MGRr?= =?utf-8?B?QzJNSEJBQnpHQUdmN2NPc1lBZStZcGx3MTVjRnBDMnAwMm1nSGhDcXJJUjBp?= =?utf-8?B?UUs0NGxQbFlTWjA3L0t4NTRBbmJHMWZOc0ZtdzhoWHlaK0QvOVozS1ZCSThT?= =?utf-8?B?NDdjSE14OHV3YmowMVA3eDVNSlV2K0YxaUtKbXhZUnBFRXMzT0NBYlFnblk2?= =?utf-8?B?OStUSXBXaWdFMW5LVW1oUUUvdWowaTFBam1ra3RaYmUwVW1QS2JYZENpNFAv?= =?utf-8?B?REcyOUZuOW1pNU5SSnN1NnU0YmM1QkFnT2FJb0dia2kzNW1wUmExWDljb3Ir?= =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BudlRBZ2R2c1lY?= =?utf-8?B?TGl3d3FjWHJOWkNPNW5MMytUcElkZXY4eGRIZTF5S2JNQjZ2eVRncjNJYzJv?= =?utf-8?B?M2NxLzhjVUFPa0JGWVBKTm5zRVRnYTJudz09?= X-Microsoft-Exchange-Diagnostics: 1;DB6PR0801MB1334;6:bNv+TrvbY2fxaDOoUdmlz2gESsgVvAI2BjcVihMrg939+fMkpv7n+kebJUYALPQcQcNw19RiUugSflSAk7DqgGoqvnPJydNgnjtnc8+4eqNUoTIuByfzylCRO9e4I6rxiVpz1QVSUSt0h/bv/HLUK/WZLFSrKkB45CZrk4g97xWIJntsgxxh1P2CFL5C6HPai4koOxh71kEiQvFh3Z6Kx3jF4JhSOf3/TBbTMJ8qeXF0uBslmPexnPkjzz+cH2FatezWjySSyiFICoUuLhaQ/H7kG3UeQs57uOL75YqbUvbWS3b1c0E2zFzs25EP7QVMrdcG3kHehiE7wh3BLAHwNg==;5:wlh0EZPIZFSTy4m+gQz3cSGbMPaZq02elSk+J3BpRa2dG15+Mwfg4hBLxm0fE8Lp2XJqu6/qVFvSt9DgKESvYhgrHXMiLVrnV8iWn0A7X2z3rubV9JssZOZezFUI0wDYYsjF4viHYne4nQQzyjKw8Q==;24:SX8QzVluyVjNFhsKrieeiCXzoME+m+aurUw2bvbWLKda8zlYOcQkaDEn8O0Y/UsDYSavYLcgvMT1IiDthSF+i3GwCfeWrqORmAGIKW8aJkk=;7:JMvyaTUAq4ebaQ/TXWVcBbhT4BU/J3lyAKNdA6V+siJh4sY+dbpN5H8ajx951uZkLmklF6sokN1c0lz3IHek0srcdyu33Xp/uoj8rcwEj4wkJuOn+KviCywR5vmU8xWfTCje0JCdjnVezCkq6PnBASeuJ7FurchxedcAW/RNES/F7wcMBj6U1qfMLfO+IP6zV6F02Ta/IuU3aJj/k7/WWw82ux/E16DUOEO5HM91vTs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DB6PR0801MB1334;20:8kvyTqxD+H4lwemltpZMYWWNmEkRWgmJi+JbINmC8KlmyVyURZZKML2U+kns5RBgpOnKUxKXWxxQE69EoEuj6RQlklPJkj/jNHzV4lW1RP3A/kPatXVSWEYRECE7iueTdFhOY+NDEuE7ab0EIB/KwNM9gmKXLbJYF51IIqDqTM8= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Sep 2017 16:05:49.3029 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB1334 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1711 Lines: 45 Hi, this is resending of the series, I previously sent. There are no changes in separate patches except of [4/6], which is rebased on recent tip.git. Two patches from the previous sending are already applied by Peter, so they are not in this series. They are: 83ced169d9a0 "locking/rwsem-xadd: Add killable versions of rwsem_down_read_failed()" and 0aa1125fa8bc "locking/rwsem-spinlock: Add killable versions of __down_read()" Also, there is one patch more [6/6], which was sent separate in the reply to the first series. So, there is no changes (except [4/6]). Please, take a look. --- The series introduces new down_read_killable() primitive, which is similar to down_read(), but it may be interrupted by a signal. The most touched is architectures code. Also, it marks a new user of the primitive, which is iterate_dir(). --- Kirill Tkhai (6): alpha: Add __down_read_killable() ia64: Add __down_read_killable() s390: Add __down_read_killable() x86: Add __down_read_killable() rwsem: Add down_read_killable() fs: Use killable down_read() in iterate_dir() arch/alpha/include/asm/rwsem.h | 18 ++++++++++++++++-- arch/ia64/include/asm/rwsem.h | 22 +++++++++++++++++++--- arch/s390/include/asm/rwsem.h | 18 ++++++++++++++++-- arch/x86/include/asm/rwsem.h | 35 +++++++++++++++++++++++++---------- arch/x86/lib/rwsem.S | 12 ++++++++++++ fs/readdir.c | 11 +++++------ include/asm-generic/rwsem.h | 8 ++++++++ include/linux/rwsem.h | 1 + kernel/locking/rwsem.c | 16 ++++++++++++++++ 9 files changed, 118 insertions(+), 23 deletions(-) -- Signed-off-by: Kirill Tkhai