Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1218065rwd; Thu, 25 May 2023 09:27:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7URDcqA2WlSUumzzDhTTj9mEoLpxAr+kr+/CiPhu8/uQSrG7gmEJVDnpq/xdLbT3a48Mc6 X-Received: by 2002:a17:90a:8583:b0:255:99c0:9f2 with SMTP id m3-20020a17090a858300b0025599c009f2mr2429255pjn.1.1685032073314; Thu, 25 May 2023 09:27:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685032073; cv=pass; d=google.com; s=arc-20160816; b=D/sVZzitCclqcBGVmh7Gq+jr/JrfTYDnf9gbwI3BTz1JwNj9/RsRpYgajkIp8mMTzb 6vojIxcMnAITeIV0q//MBt+Ewaus23jJWAgWg4zxxO/w3OmwkDE3benb56ziGDcHCUuw ITCkidTph1wMosZjroxU8pH19kEfhGBypNSs4N+3t7vJpJa+t59mK7FZT0IQ99bBdu0o NlVoWHmacSah0scno9/tQoaV1yS3hRKJTeKLUFl2kOu6gsoBiHloNyFRM5FxTMDtDP7t wwXALfU7eizrt70zYTaAwD2x56km6VMwscWBrPVpdt2+icGdo2fd69Hva3qm9K9+6jIR puXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:content-language:references:cc:to:subject:from :user-agent:date:message-id:dkim-signature:dkim-signature; bh=ARNoLPoIjfM/DOJDof3UYUbB7RYzkCl76w7KaTk5EMI=; b=nFmb/B2bf0z5k1zpitHFI6QDgMrxsqf8fg/Xb5QKepFld5X6eXfuPWGHloUN7yooaK qwnpb1+YXBgHbuLpCZqguQ76NBY7k+I5t65IlrR3ap4ZiMofEMjxVM8sFoZVW4ODWLir 60hxBu2nYUaisjrTbh6KKaNq6jku2D4SN5cx/HUwuRknUq16OvEsn10kClx9GwlCyZc5 NJ038BwCMu7qqU6MzyhFFhSNPECrPVMl7C4/uU/enXYr9ZAHQt2ieWX88Ekw8enEgJXa BujQ03a77F2hJKNITD5AtZbhVjhFHBrlHy4fxDwHOEF8uIbEltF39BYRgzJe2Tr7BTn6 mY+w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=iD6iRvR8; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Fe8XngqA; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x1-20020a17090a46c100b00247ad11b6d3si1878804pjg.88.2023.05.25.09.27.41; Thu, 25 May 2023 09:27:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=iD6iRvR8; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Fe8XngqA; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235487AbjEYQQY (ORCPT + 99 others); Thu, 25 May 2023 12:16:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235665AbjEYQQU (ORCPT ); Thu, 25 May 2023 12:16:20 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6D5513A for ; Thu, 25 May 2023 09:16:18 -0700 (PDT) Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34PGEmir014582; Thu, 25 May 2023 16:16:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : from : subject : to : cc : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=ARNoLPoIjfM/DOJDof3UYUbB7RYzkCl76w7KaTk5EMI=; b=iD6iRvR84Qy48uiPdSfzPF3uhiPL4iawbKjmCbN0gXYLEGTqSntPXxf2D1c+Cruc52KB fjM9MjFRZyKql0GVcol0mb0IEbOcpGKBP7bpEP4YrBe1zmL0NRDU8NZgNwGguw7zmQBN SBmBl/q8BT2ftyBZO+Oeaj0hpP0wsy4UmGwBV+p2lM/dV2yclXLXx+zysqT0pLtSp1il qojK60xms4ndnFh3NRz2n2gkkOmFa6cY02uHFuXoDgexYC1No5hgGeQPlkvMBF3u1rKm kD3s8mSazgsNtFTnK4gudvK4uZkw7wGuRIxlB7DzwesDsWRs6lz/RbAoKj6JBi//GUyM 0A== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qtb0yr07w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 May 2023 16:16:05 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 34PG6tZN028591; Thu, 25 May 2023 16:16:04 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2047.outbound.protection.outlook.com [104.47.66.47]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3qqk2u2ycr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 25 May 2023 16:16:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F9upnkLryuGERrjps84sQbRabMh9Qvorea5zgX6Zp0tNT5n9VD6hpLZKwdOUlgiKZPrd36FXrlVHdxe2JdxA5y5ycRVQKnEdwYg6CPttrM98TSx8wn5wC2n9hR4Ogdn+IQEaAaL1MPafl0PkWgTMonhz+EhjlTFAk6IJH6WoggC5iZs+UG5LkA0/RlDrjyM9bxqssqLUUvQtj4YUvJoe6uWcYQ39Shvs+VOItXndsM+qNY9lsvt34WvSdD7yn4Jmg0JDL8WVzlhbDWxVY/PaGDXgn+M/E5Ej0mInqSfrCC0hWYX5evJUCwrul4sOUbHnhbr70D0F27rCO9AhazEmOg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ARNoLPoIjfM/DOJDof3UYUbB7RYzkCl76w7KaTk5EMI=; b=Wr7yIl63TOc30I90JVdI3C8+BwS+1mUHpuU5YUsWqjY2g+e6065dn0zB1OvXEhMWziraOYs1V7GgpCstUP3MVrPv8W6NC8F4/t5RWaCD35h2p4tVpmKcoEWgdh4+jNqzt3O1hhtGJ2GPmFneePYB3zoSuV1/neT1Fs091sHVzZYHW/Tqec5bvMlhaA6VlJvsBSGa+TXC8BX+4ElPJsc/DSQgwbz/oF4GCFjHDe6eM45hpdTag8/hqOidCC0huoeXE/aht5aJzHq3BXqMNGnvGEaRKXHxqJKr6MZDBIGDu3BH1sOxg0Fhl08CSIWw86p/p8usiyC4b75i3rcqVRvhhg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ARNoLPoIjfM/DOJDof3UYUbB7RYzkCl76w7KaTk5EMI=; b=Fe8XngqAlVDNsjUGGccemQ5IpYVxt7xz2HjSjNVw3y1oau3Cp2ytSNW3W3B7cYI/9sCUYrHcsNoQ8M8fi9Tn+t330sZzX2y8me8SQ8UNEqliXk5DDJBohK6EhKcf/sYJGr9eJNJgYsBM6HZPiH5Euz6pn/WaY/3Kvuc0hrrGKio= Received: from CY8PR10MB7243.namprd10.prod.outlook.com (2603:10b6:930:7c::10) by MW4PR10MB6680.namprd10.prod.outlook.com (2603:10b6:303:21a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.17; Thu, 25 May 2023 16:16:01 +0000 Received: from CY8PR10MB7243.namprd10.prod.outlook.com ([fe80::13d6:c3f3:2447:6559]) by CY8PR10MB7243.namprd10.prod.outlook.com ([fe80::13d6:c3f3:2447:6559%5]) with mapi id 15.20.6433.015; Thu, 25 May 2023 16:16:01 +0000 Message-ID: Date: Thu, 25 May 2023 11:15:59 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 From: Mike Christie Subject: Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression To: Oleg Nesterov Cc: linux@leemhuis.info, nicolas.dichtel@6wind.com, axboe@kernel.dk, ebiederm@xmission.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, mst@redhat.com, sgarzare@redhat.com, jasowang@redhat.com, stefanha@redhat.com, brauner@kernel.org References: <20230522025124.5863-1-michael.christie@oracle.com> <20230522025124.5863-4-michael.christie@oracle.com> <20230522123029.GA22159@redhat.com> <20230522174757.GC22159@redhat.com> <20230523121506.GA6562@redhat.com> Content-Language: en-US In-Reply-To: <20230523121506.GA6562@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DS7PR03CA0046.namprd03.prod.outlook.com (2603:10b6:5:3b5::21) To CY8PR10MB7243.namprd10.prod.outlook.com (2603:10b6:930:7c::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY8PR10MB7243:EE_|MW4PR10MB6680:EE_ X-MS-Office365-Filtering-Correlation-Id: 7607cf88-57ce-45f2-d160-08db5d3b54fd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hMO79hhNgU2dy8H5IhvnuVw7KUWj7MAOgITPAOUxN0RjFckS66jaoxlA3JGI3rVGeUTqr7LnH3CtsjMhzFtoTrJagdwTvkwU01Yi/COE3C6YxvsQbt+R/x69OyVVHbWvqsEBWhLe/7o5IS4Wp6YJvTlf3HMzsC2Tm+o6FZTH6imJN4aIX1cs+PgnwwrGUcQFtA9bR25XyRfflrSZ4WXd0fXuNM+hjzTMUjnzb7v+Ve4NC/vZoAUMxFrc8B7SP3ii29HmXSzfcDhzAtw8dgwCJC8vDaVc5RTPa/SrBGGlYQAdcSTxlJirw9HX0tJQ1sjB1Z2zGor1aR4Ia9gsqT7ni3+Qxw+9Bv/ZO+csz9eAcoJuxoP+xMhDeXioEsgrBGRYmK5jj46XR6rRymkxGa1W/7y2+JNt1ng7f3p6J65JnSTBbzPF5SULS+c+ABACPF5HH0L9S287toJRaPpyyE+HdGSlTRykwo15kohlXeFODLrW0JQpMiFb+Q3+PP3XICl05GcsNgFHuJQUYPd/AS4zDdZwbNmDz0Zrl+PHSvkATKmILk2wE1EjPZF0+RBvXHk1b2G6SYxb4PA3JcHKo7niGSXcfVpZ7yixa5FR2B1eeY3R5Lq+eABHAxk+hhDlfXqj/uTbK9PvRDtR2Mf9MpgDRQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY8PR10MB7243.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(396003)(346002)(376002)(366004)(136003)(39860400002)(451199021)(66476007)(66556008)(66946007)(83380400001)(478600001)(53546011)(6506007)(6512007)(26005)(6916009)(31686004)(4326008)(316002)(6486002)(41300700001)(2906002)(186003)(31696002)(36756003)(38100700002)(7416002)(86362001)(5660300002)(8676002)(2616005)(8936002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bExnUTFZSE5va1NkTzlvUXJKbkJFNkxlR0JUMUVWS2RqZTR2dG9Uay9nbEJo?= =?utf-8?B?aFF2TExRMjBLcUxTbG5FNVplYWF0enQ3VFBzQ056Z0dBL0JHQ3hSWmxFeTM0?= =?utf-8?B?MzAya1FYUXM3QnFCQ2xmWXB4MVNRdmJRSzN5dDQ1Sm5YRHd3a2l4RW52eG4w?= =?utf-8?B?ZXQ5SXFkcVBzLzdKaFZTaVdVak5WUmpwajdMVlN0UTJPZlJYcGpKVFhsNmlz?= =?utf-8?B?VC9zOTM2MXcxMXZqWGZOaUE5VVdqOUcrcUVTUlVpS3VncTVjUkRWSGJGN3hW?= =?utf-8?B?WjBOK1BSYklKUzhxbkNmVFllMjRUS1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UhFY1h6ekhqbkl2NS9yakhFd1dsazdjV0tN?= =?utf-8?B?OThHRDcxRlJ4R3M1cWUwU0JiNjQ3MjlLTlVpajJXTGVadE1WUDBZNjAySDU1?= =?utf-8?B?V3B4Wkxya3NPTy9ocXNNMnFoNDQyMTg5QmtSYy84clRidUVTODVqZXZxNUNr?= =?utf-8?B?Nm1JVWgzZFcraGZHTlFuN3ZWaE1tWkhBOTQwanc0YUUxNjJXTTVHR2VJdzZO?= =?utf-8?B?WkthTjVmUDEzZWVBOWMycE5QMXN5NlR6ZExQZXVkNUJhWjZoS1puZFBvekhm?= =?utf-8?B?bndreFBtN050T3FEbGhNd3hhNVhwcXpBalphWDh2Q3FhbDUySXpmcTdSUTli?= =?utf-8?B?and6dXFpU1U0bjR2MW11Zm9JRk5GbTA4UHVqUnJYNCsxdEVaZkE3ZmpuVjZ5?= =?utf-8?B?YTZWRkFSSHVtYlRaMURySE9JdFVCcDROY3dLVmtqWW1XTUJWTkZ4cmZRaVlB?= =?utf-8?B?RVJsODJTZG9aWHY0enlobmd1TEpjU2xHdnhWMTM4WGpxbXAyZFgrTi83eTcy?= =?utf-8?B?ZU9GNWhaSHlvOXo5K2d6YXN6cFdhT0FjMmwxQ09sY1VMT3RUVmRUUm9uWmdU?= =?utf-8?B?YTFHNzlLb0dQSE9QZ290MGtIT3JsRXZyazB1RTBhVUNHNFMzNHo5S3l3eFZ5?= =?utf-8?B?TzFvbjhySGNEQUxKUWdrbHBKSnVFMDFsOXhzSkFicklJcGRZSEpGbU9oTnp6?= =?utf-8?Q?6sBm/xdT?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7607cf88-57ce-45f2-d160-08db5d3b54fd X-MS-Exchange-CrossTenant-AuthSource: CY8PR10MB7243.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2023 16:16:01.6126 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qsYE6+zQXFN0r2KUvVFC3DqvbDEzoGOeCkL/nVM9dJ8g+GksEybKBdfUHCetX86zQoQMRoBOAwEercrNiUY9RICYgH8cY4MJH6eAkRZuvco= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB6680 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-25_09,2023-05-25_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 adultscore=0 mlxscore=0 bulkscore=0 suspectscore=0 mlxlogscore=806 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305250134 X-Proofpoint-ORIG-GUID: lqjMPB4dUQTywigd_Ap5yligxHQe-nxP X-Proofpoint-GUID: lqjMPB4dUQTywigd_Ap5yligxHQe-nxP X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/23/23 7:15 AM, Oleg Nesterov wrote: > > Now the main question. Whatever we do, SIGKILL/SIGSTOP/etc can come right > before we call work->fn(). Is it "safe" to run this callback with > signal_pending() or fatal_signal_pending() ? The questions before this one I'll leave for the core vhost devs since they know best. For this question and the one below, when we get SIGKILL we think it's ok to fail the operation as in it's ok to not execute it like normal (send it down to the net/target/scsi/block layers for execution). However, we need to do some processing of the work to release mem, refcounts, etc. For example we use the vhost_task to handle completions from the layers we interact with. So when we get a SIGKILL, we could have N commands in the target/block/scsi/nvme layers below the vhost layer. When those complete, the current code assumes we have the vhost_task to handle the responses. So for pending works on that work_list, we can pretty easily kill them. However, we don't have a way to kill those outstanding requests to some other layer, so we have to wait and handle them somewhere. If you are saying that once we get SIGKILL then we just can't use the task anymore and we have to drop down to workqueue/kthread or change up the completion paths so they can execute in the context they are completed from by lower levels, then I can code this. On the vhost side, it's just really ugly vs the code we have now that used to use kthreads (or in 6.4-rc looks like a process) so we couldn't get signals and just had the one code path that removes us. From the vhost point of view signals are not useful to us and it's just adding complexity for something that I don't think is useful to users. However after discussing this with guys for a week and going over the signal code, I can see your point of views where you guys are thinking its ugly for the signal code to try and support what we want :) > > > Finally. I never looked into drivers/vhost/ before so I don't understand > this code at all, but let me ask anyway... Can we change vhost_dev_flush() > to run the pending callbacks rather than wait for vhost_worker() ? > I guess we can't, ->mm won't be correct, but can you confirm? > > Oleg. >