Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1201499ybb; Fri, 3 Apr 2020 21:25:57 -0700 (PDT) X-Google-Smtp-Source: APiQypJPBK9EvzXAHgSFVWqs35PuH1q1G6/1As7LH/wZ662IT8ewJ9gb5jyNbOc4SIzCNw8au0QY X-Received: by 2002:a4a:4f0e:: with SMTP id c14mr9246582oob.3.1585974357800; Fri, 03 Apr 2020 21:25:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1585974357; cv=pass; d=google.com; s=arc-20160816; b=ApwZQmaU8WeaJunLBqfFrO3p+CKFzuGwSoWFfJ8LttTeYNdArsmF5nHleg51+y8Z3h AUFZX6Are51FZgIY7m5GbzOLRTdb5v44PDUeMbg4sfRgg+6IVV/lbNaR0mtUI4Ynxb3r ODA1CmLrPm0GtdceE3AuGJCxqwUWf7Ce7wBombFA2st0k3yTJPr46ozK9Er6ZIt3/B9o BUol+RSmhKVbF0GNdTJsdEaFCM/qkTs0yzyQArRkfoATf+KdZNfzDgJ34w9HUMCyr3RU daox8rNFCYAIDan1UcI1boEe4MsHoU5K7L+89S/iGZa1MVI/DLCnmfr8iL50nWtpCPAr iM0g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject; bh=S/B7bBW62Yy7RGHjVgMPiK/4wu2Jz4njwuzLNXRAnbU=; b=zi4nE9u2C+l57t138OZy1r/NS3rwnjK6F6+ODGyIGMslnvsrdEQKoO/cRabaYYV4O1 aQBQN9vHj0fKQXem67PSsE8KgRoNJxIgcW/yCIV/MI4DFZV3g6LNqlbNNizuMNIc19TO nZ+ocuLyIGv7nhQniSVqBs7nQTGIhpjR8AQmNuLUoGGK2coQXyJusJ+3dcqYzxAm4pS6 8lfU7Q5p2mJqJj112gWZDdhLl5fecRjogLxrhJ1Oq+BTpsBz3nOUnJ7Q/0hKXFmezhsf o4LAiPkY5Ul8xeSm7raIOjwge/WbxOu4m8IcbLj18tYQLzQAW279W+4L1Z7tattaKhJy 2Dkg== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=hotmail.de dkim=pass dkdomain=hotmail.de dmarc=pass fromdomain=hotmail.de); 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h6si4487672oib.246.2020.04.03.21.25.44; Fri, 03 Apr 2020 21:25:57 -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; arc=pass (i=1 spf=pass spfdomain=hotmail.de dkim=pass dkdomain=hotmail.de dmarc=pass fromdomain=hotmail.de); 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725906AbgDDEXq (ORCPT + 99 others); Sat, 4 Apr 2020 00:23:46 -0400 Received: from mail-vi1eur05olkn2087.outbound.protection.outlook.com ([40.92.90.87]:22656 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725862AbgDDEXq (ORCPT ); Sat, 4 Apr 2020 00:23:46 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j+vpqtVPwyNtXYBzufi0E7ChqjBHeS+DS20uPY4GMitrZcKdOgSeut0WgrZvAI04ZhdSYUTAyjbwAkCrYD8ZPZMo91UYp4Hcdn0Q8f+h/q8PShiKEK/zyGHn/XKhlyW5LfhxjlNWTecrcv4GIxlLevuWnTIWoutxm06xCK9YwAPctUUiDtuckRo0yNJCY05lecZ1QGUnWuUAkLQ5ZhDxhf2sz3zhEqkTnIO6ZC72sZqFfFUW5xDJvLT8TOMHmw3tm9jyH8OS+3xW+DGvTHWnFTWcOPB88zJZlqMdNZ5OolaZD3fYnza+u9pfcJ198iq7h48YfyO9AC1czSx7cJvL2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S/B7bBW62Yy7RGHjVgMPiK/4wu2Jz4njwuzLNXRAnbU=; b=VOTM2Dl2ggWpLSGDD/KwXCwWmJxHGDL6GGc97Gdr4q7ATGcJvIGfiU58weG22C8/h9XevSG5er7T4FlX7qlgUYWq8YkHEKPyS8Til4v8J2m3e7mcWRgHrFKPk1H31AClOAirrckWG6ybSEXKAplG1sU+ynM5qC44B6lNVs1zJVD59zDuN1dlC5UDE2S4wIWpzmwr6EhwuRjX28xRtqAnX8MvF1jEDfcCZdmXzrTOu66xy7FsoToF4aF77RULR5Krqr5EwltPooWpRrGVluxRvrhcJBQCtKjFfsurw7YTn892QCT5br8SFjLJOlqNdCsYC83goHsobRjL5x5jN4gvVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hotmail.de; dmarc=pass action=none header.from=hotmail.de; dkim=pass header.d=hotmail.de; arc=none Received: from AM6EUR05FT048.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::4b) by AM6EUR05HT080.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc11::350) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15; Sat, 4 Apr 2020 04:23:43 +0000 Received: from AM6PR03MB5170.eurprd03.prod.outlook.com (2a01:111:e400:fc11::4f) by AM6EUR05FT048.mail.protection.outlook.com (2a01:111:e400:fc11::479) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15 via Frontend Transport; Sat, 4 Apr 2020 04:23:43 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:F15397E0514B636DBCB681A702D7457FB562C419986805F194CE3DEACE553067;UpperCasedChecksum:1ABFA233ABD3EDD0FA7306DD1C4FCE748CE0A94D072FCB10DE2AD4B967EA8F42;SizeAsReceived:9676;Count:50 Received: from AM6PR03MB5170.eurprd03.prod.outlook.com ([fe80::d57:5853:a396:969d]) by AM6PR03MB5170.eurprd03.prod.outlook.com ([fe80::d57:5853:a396:969d%7]) with mapi id 15.20.2878.018; Sat, 4 Apr 2020 04:23:43 +0000 Subject: Re: [GIT PULL] Please pull proc and exec work for 5.7-rc1 To: Waiman Long , Linus Torvalds Cc: "Eric W. Biederman" , Ingo Molnar , Will Deacon , Linux Kernel Mailing List , Alexey Gladkov References: <87blobnq02.fsf@x220.int.ebiederm.org> <87lfnda3w3.fsf@x220.int.ebiederm.org> <328f5ad3-f8b3-09b9-f2f7-b6dae0137542@redhat.com> From: Bernd Edlinger Message-ID: Date: Sat, 4 Apr 2020 06:23:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AM4P190CA0023.EURP190.PROD.OUTLOOK.COM (2603:10a6:200:56::33) To AM6PR03MB5170.eurprd03.prod.outlook.com (2603:10a6:20b:ca::23) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.101] (92.77.140.102) by AM4P190CA0023.EURP190.PROD.OUTLOOK.COM (2603:10a6:200:56::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2878.15 via Frontend Transport; Sat, 4 Apr 2020 04:23:42 +0000 X-Microsoft-Original-Message-ID: X-TMN: [dpan+zE3EsgNZNhfBOkT8MrVxp+gJ/+b] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 50 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 7b852572-0ee8-4d09-2be6-08d7d84ff570 X-MS-TrafficTypeDiagnostic: AM6EUR05HT080: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5cjwlscrRHPYKdwNJNONO6+a/RftYYt68Gx+gTv1eK/mZqkWmMVAU21R5CquDz3RxTMvCLbLWKHvA4Q4sSOSh95fVur7thHUUDq9oKY17dStr7hmh65Sbi4ysZH12KZJuxECcxeM6cz0MiLXewbnVaKDA35a7MOy3M4fBVE3VFI/TySBJKYFB0SMFaejxXxK X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:0;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR03MB5170.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:;DIR:OUT;SFP:1901; X-MS-Exchange-AntiSpam-MessageData: YsIFmvyCXHzh3u04Apgd9qFEbMKyzhlNuidDA0TkTvmoTkZCCZkzbap8eSXwOlqmBe+XXRh1XsJgjF/Vjb0mozJVb/5xaZf9/pPsWLOyocEYERe4+3QFTUw2INy+W7Z5OpRgg4DqOQqXhbGM3nFofw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7b852572-0ee8-4d09-2be6-08d7d84ff570 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2020 04:23:43.1247 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6EUR05HT080 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/4/20 1:16 AM, Waiman Long wrote: > On 4/3/20 4:59 PM, Linus Torvalds wrote: >> On Fri, Apr 3, 2020 at 1:41 PM Waiman Long wrote: >>> Another alternative is to add new functions like down_read_unfair() that >>> perform unfair read locking for its callers. That will require less code >>> change, but the calling functions have to make the right choice. >> I'd prefer the static choice model - and I'd hide this in some >> "task_cred_read_lock()" function anyway rather than have the users do >> "mutex_lock_killable(&task->signal->cred_guard_mutex)" like they do >> now. >> >> How nasty would it be to add the "upgrade" op? I took a quick look, >> but that just made me go "Waiman would know" ;) >> >> Linus >> > With static choice, you mean defined at init time. Right? In that case, > you don't really need a special encapsulation function. > > With upgrade, if there is only one reader, it is pretty straight > forward. With more than one readers, it gets more complicated as we have > to wait for other readers to unlock. We can spin for a certain period of > time. After that, that reader can use the handoff mechanism by queuing > itself in front the wait queue before releasing the read lock and go to > sleep. That will make sure that it will get the lock once all the other > readers exits. For an unfair rwsem, the writer cannot assert the handoff > bit and so it shouldn't interfere with this upgrade process. > > If there are multiple upgrade readers, only one can win the race. The > others have to release the read lock and queue themselves as writers. > Will that be acceptable? > Someone pointer out prevoiosly I think that with the real time linux the rwmutex are just mutex and we better not base our desing on that. To me linux_rt is a must. Thanks Bernd. > Cheers, > Longman > > > > Cheers, > Longman >