Received: by 10.192.165.148 with SMTP id m20csp3956609imm; Mon, 30 Apr 2018 09:11:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqjmgwU5aSEHogkAvFccd3y5a6pi757OGqheDVNpSO9yphsCB0LAmL1rDIcVyZTOarSk7+i X-Received: by 2002:a17:902:24c:: with SMTP id 70-v6mr13087008plc.384.1525104684771; Mon, 30 Apr 2018 09:11:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525104684; cv=none; d=google.com; s=arc-20160816; b=edumTfSOPmmt05rq9h2cIaM0+lO9tBe+BSFsXm2+OdOQDCFAS/7jzShhGhuH+Is118 +/6UntUvSawcksJw7a1i8XU370zCOsLHc9WE5NT8SI9w0BJs/jiTFNrljHLMmNiogVUv qcFlg6CaOBcqEWbyiTsNVOgDCQo4rxX5xqyMPJzvXAr5gRY8QUuk/MSpC9ptpv3Xp630 MFTfh9lXCZv9nhwhHUbXug9WCLN/9F57LkxCXMM4OKeY/WZ7rTAiGKJy5ptS//bBHMNp tI5PNmeiv28rb30oO9fas9b6+GzINIstQ9qMUZPEMZToDk+pyYotCeDKla96l9Mw30NV OJpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=3UepFyYAF+2eNzG5fhGyxlkk2MHRnXhCp86quh7yW9I=; b=DT9cQPCQtSRPMmg88qIciF01PUL3G+Pxwuu50O+FcocO3bNvo9BqnaZmEgs3c0lNCO EPBxiYjDRp+dZM+1jJ3lU4qKsBeluRNh7MFEn1xDRHec7lly0FZvFhs+gALdxsboXu0A wjBslKIPB+tyo6yGVEotOT1iH4zDfsl3G5fOjRjAAWOUkkj/AT/3ZLfYVCncNA5l36yV 8NFugvhOmu+8j5xUyzOfsjKD/tVykiJAJoh4OmADiImakhpcY2ChIIUurNtfuBOs6z8K lAbNPTt1aKeond/BDJTDrHl+NM4v7mNjlol+NtmOwKpWAnydPHlwVFY7i90eO3M9+zpA npYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=wnkw1opJ; 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 a36-v6si7791028pla.73.2018.04.30.09.11.08; Mon, 30 Apr 2018 09:11:24 -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; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=wnkw1opJ; 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 S1754713AbeD3QKv (ORCPT + 99 others); Mon, 30 Apr 2018 12:10:51 -0400 Received: from mail-cys01nam02on0044.outbound.protection.outlook.com ([104.47.37.44]:25760 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754474AbeD3QKt (ORCPT ); Mon, 30 Apr 2018 12:10:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=3UepFyYAF+2eNzG5fhGyxlkk2MHRnXhCp86quh7yW9I=; b=wnkw1opJEmLya4w32YXIPbMg133hGsxOVXsUPWto32Mcj3wnxWZEDO6qCVPXp2uB0Q2vIbxN3iVk08fGyddPPRfBVkXzB8fK/7lI4Tsj4WUDJ9Xcfzr6jHkEL+384UN60k7T/eKpfQ5aszPMgvynhPFFdVUydF1te4rfHTUi4TM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Andrey.Grodzovsky@amd.com; Received: from [172.27.230.118] (165.204.55.251) by SN1PR12MB0319.namprd12.prod.outlook.com (2a01:111:e400:5145::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.17; Mon, 30 Apr 2018 16:10:43 +0000 Subject: Re: [PATCH 2/3] drm/scheduler: Don't call wait_event_killable for signaled process. To: Oleg Nesterov Cc: christian.koenig@amd.com, "Eric W. Biederman" , David.Panariti@amd.com, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, Alexander.Deucher@amd.com, akpm@linux-foundation.org References: <87muxsbmkp.fsf@xmission.com> <8840ac96-50c4-f94d-eb7c-f007940163f3@amd.com> <877eowa5qh.fsf@xmission.com> <20180425135552.GD7592@redhat.com> <20180425171757.GA10441@redhat.com> <874ljyu98e.fsf@xmission.com> <20180430160006.GB10583@redhat.com> From: Andrey Grodzovsky Message-ID: Date: Mon, 30 Apr 2018 12:10:36 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20180430160006.GB10583@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [165.204.55.251] X-ClientProxiedBy: YQBPR0101CA0004.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00::17) To SN1PR12MB0319.namprd12.prod.outlook.com (2a01:111:e400:5145::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060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PaCJjHoT7CvmxuYQg5khYHMFXLfLsxlIWHwalkG9erqXSzy43SsS3IPnMI6Pq6nyFP7HQ9kvHQRRV9djBeOhTgRMza/VUYzVdYktoHiZKS7VSut3pDqeIg8upuq1DwPr2dUAuQE2uje5QMMIJRr/KY8J3GJAfu0ojtzl9Rtbs6E4lSKgP2l+3CT02pPCaQbsgte8CQFBtWl75nBe2cNj4mXpeAMq1F9Se5pZDS0xNs3GAuTNGqtCZYnIqkR/gjZgM/VBCQRnMeg3Rbxpjer3/qVvW6ahL8PpRZyQIOVP8mB2ChmcGmc8lrg7NA6wDHPCLZJFsdsl006wR9yZhPkSqopXU5qVCinmPYT2iFK/EiwdtSA6jkkp16Mg7QNWiwNodvvgck7/URgTN8abR8T+hMyU4u17HXEd;4:y1Zn1Jlbi0c3eh+x4JoswABAN9nB8E8L7Fj2m5PwmRMwTliZ1Mb73mWD3Vm1iSnJR+jjYi1YNh3/yy8oQ1H5Y/9cPrqts4JEvYrCmoxTv4aG+sSDSPO80DNWv84Q4HG6MqFQf/48nWogVK/ynmLezkCmIdqpRIxL9zqL0AY60BGZ7mO358BQ+lAZZ1UZlbBxdygrHRj7HHIRRoxSblwDKZfiR92P/80RfgvWJ62t14YZutvVV+adYQw9AneJxPQaMXx0eK80r3K9PptIKcKdZA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231254)(944501410)(52105095)(3002001)(10201501046)(6055026)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011);SRVR:SN1PR12MB0319;BCL:0;PCL:0;RULEID:;SRVR:SN1PR12MB0319; X-Forefront-PRVS: 0658BAF71F X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(39860400002)(346002)(376002)(396003)(366004)(39380400002)(189003)(199004)(53546011)(31686004)(72206003)(58126008)(6246003)(93886005)(106356001)(478600001)(97736004)(105586002)(68736007)(53936002)(956004)(476003)(26005)(77096007)(316002)(16576012)(11346002)(2616005)(25786009)(186003)(64126003)(16526019)(81166006)(5660300001)(4326008)(8936002)(50466002)(65826007)(65806001)(36756003)(47776003)(65956001)(6666003)(66066001)(6116002)(3846002)(6486002)(81156014)(446003)(305945005)(7736002)(52146003)(52116002)(6916009)(67846002)(229853002)(76176011)(386003)(486006)(31696002)(2870700001)(59450400001)(2906002)(2486003)(86362001)(8676002)(23676004);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1PR12MB0319;H:[172.27.230.118];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtTTjFQUjEyTUIwMzE5OzIzOjRwb28xNjlSRjNKWERwWGpBWUh5c0RQOFNl?= =?utf-8?B?R2JCdWI0b3lneWRIT0JZRVBqNURFQXcralc0SG1QS2MrNjQ2Z1YxclpFYjJY?= =?utf-8?B?T1hVSlBqVUhWa0h5VkhHWGdLVm9kUVI5UDM5bWQyazFBV3VYaDdlMHlFSzRH?= =?utf-8?B?TW1jdUZkOWZjSmFpY2Y4ZU9jZWpvcTUrb0ROK3pwUE4xT21rVDhmYlg1elM5?= =?utf-8?B?TzFzR0RJMHkvS0VVN29neGtpOFFnNjRvYzhGY3lIVTdBZlh6QW03Rllpcm80?= =?utf-8?B?MG9oVFRCelc1Q3YxaDlpblJoaGptcEZqV3BiMU91TGkyNTZERUpIU1k4MU5k?= =?utf-8?B?Y2pVUnBwc2gvdTUrTm9FL2xzWlJpeU5ySlJLaU84TEloSmsyVlJ0eEwzS1Zz?= =?utf-8?B?YmJEbmtyTnEyWHl5K2JXVHZaYmI5Wkg2b3RQeVp6bkJmYzYvY2I5SWlObUlm?= =?utf-8?B?bWFFZm5GVGh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8x4;20:XqF11L3Uj4X0DvdzHVD4X7eUeIxxd/qfZjiq+ReaADUhX3sGqZzkkuBD+jqEZXBHG0g/0A1ZwnFWluGFjjlsNvNlNWqtzkDCtGDvUIyoRRGajhAsHvCla3zmjj1GRTCiYXAh3n0ddKNvZAOMVDQdiXedI5vzqzOQyExKiC220FiiBK+vT8P2ZuKDOy4/lOajUIghi6qeZVekrB8A5uLuiexG1eISbJ9MtLKmTTIx7qkKf2ArgRfKh4TGjfbWGyUp X-MS-Office365-Filtering-Correlation-Id: a28e10b5-e2c3-47ba-6be7-08d5aeb4edb0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2018 16:10:43.0245 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a28e10b5-e2c3-47ba-6be7-08d5aeb4edb0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0319 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/30/2018 12:00 PM, Oleg Nesterov wrote: > On 04/30, Andrey Grodzovsky wrote: >> What about changing PF_SIGNALED to  PF_EXITING in >> drm_sched_entity_do_release >> >> -       if ((current->flags & PF_SIGNALED) && current->exit_code == SIGKILL) >> +      if ((current->flags & PF_EXITING) && current->exit_code == SIGKILL) > let me repeat, please don't use task->exit_code. And in fact this check is racy > > But this doesn't matter. Say, we can trivially add SIGNAL_GROUP_KILLED_BY_SIGKILL, > or do something else, Can you explain where is the race and what is a possible alternative then ? > but I fail to understand what are you trying to do. Suppose > that the check above is correct in that it is true iff the task is exiting and > it was killed by SIGKILL. What about the "else" branch which does > > r = wait_event_killable(sched->job_scheduled, ...) > > ? > > Once again, fatal_signal_pending() (or even signal_pending()) is not well defined > after the exiting task passes exit_signals(). > > So wait_event_killable() can fail because fatal_signal_pending() is true; and this > can happen even if it was not killed. > > Or it can block and SIGKILL won't be able to wake it up. > >> If SIGINT was sent then it's SIGINT, > Yes, but see above. in this case fatal_signal_pending() will be likely true so > wait_event_killable() will fail unless condition is already true. My bad, I didn't show the full intended fix, it was just a snippet to address the differentiation between exiting do to SIGKILL and any other exit, I also intended to change wait_event_killable to wait_event_timeout. Andrey > > Oleg. >