Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3559833rwd; Mon, 29 May 2023 12:39:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6eck4zKdXTlvN1KfVCBjWJ+wMlBOzaSr7Dxme24wz34radjD3ujbgu4C9iLOKwkqFTzO3x X-Received: by 2002:a05:6a21:3290:b0:10c:1047:68b9 with SMTP id yt16-20020a056a21329000b0010c104768b9mr9346368pzb.50.1685389182569; Mon, 29 May 2023 12:39:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685389182; cv=pass; d=google.com; s=arc-20160816; b=pSy4X9BwmQUW+gbu8WJL2n+kRzvQ2ThFyl8UpVHXdr0vDkGv7205P+wfKWWOhbdBNV OCwNh9b6Et1h2bSGa867sqk6RUyfLH6iwdrz6HCR9O7baC/AHDQsBWBiaGm2XDvLpGiv WjjAcjA5YfuHXT7JKcQw9nE/Fw8ACkcGM3WTc433M20KvFEcvcPToMZ91tSH6cwaLl8n m+aqEycI8HY3tZOM2W9eDaBGDPDnptxShc1/7i0Ijqebb2n5A69SToY39KVsyBf/0pvR oCli3TxolIZjxPUn46fywDhDeDPiK+uqfbVU2AzU8D0MVDmM8nogE1beqx6M2OxIeQHn Bcxg== 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:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=3gtVAI4hKtf/+E3EiicJkmkXA6J9DKm6KruoPPSxiHk=; b=LlI05U7JXH7tTOKGNND0JvwQ8wX9DTsqdFVMM/95+A2tKj2Y2C9Na025gEyudG3tDC 37LXi3xPMBAMUsYseYV88wwDJlh3WAdygkhwO/X02nf9VfD6Ulfcn6ERCP33LUv3MIGG nvnNigcvpOCnkBvd4ti0oGElSrpotMXbQ9MEYmvq9O/fNyq87LvaCRyV81ApCIEuJiS5 jL0zfTYALJQGUSts4oxCP88z3zt9TOKxgU4GkAycV1X/rT7vw1atImXzW/7xRenirk3U rN3EFBYVfQZVvuoAZlXJvsLmteq4bDzkjXzx0LbZtDgyZiv4I2A/isuez2t7uiia5i7J gkIw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=YEL+ST5W; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=JswAZxpC; 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 w27-20020a63af1b000000b0053fb1a1218fsi153010pge.817.2023.05.29.12.39.28; Mon, 29 May 2023 12:39:42 -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=YEL+ST5W; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=JswAZxpC; 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 S229566AbjE2Tfl (ORCPT + 99 others); Mon, 29 May 2023 15:35:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbjE2Tfk (ORCPT ); Mon, 29 May 2023 15:35:40 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF9CAB7 for ; Mon, 29 May 2023 12:35:38 -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 34TDO0Rh010182; Mon, 29 May 2023 19:35:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=3gtVAI4hKtf/+E3EiicJkmkXA6J9DKm6KruoPPSxiHk=; b=YEL+ST5WCAbnPzGiDN7AhUP6G13hDQ0b6hEP0bPtVziTMzmJBlQgO1qHHbiBHAbQyVjh pHFh2uTeePJyHDQevDF5FmfCnpBQe1jOHV5vIx4SZ2oqgOIyf+sLhl+z8Lfx96/csr+r 0Ej8JvvvMqlENREfv2k3KmFbn+YNDpob+7SCUD/P4dmHklf6OVxp7fYQg2Nr3csZXiqy lCBHyfpx3Ncg6i2R8WdNjYe8NfTnEw8454MBBYgGX7hExBzP6N0/6lBhPBaw4K93rFs+ PAIFca8esi/rHKNJqPirtmoC17zkzf/GK03v9lCklVNnj6/o9j+u/CxwCb2Ft7fTv384 wQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qvhd9sc6w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 May 2023 19:35:25 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 34TIb3EH003735; Mon, 29 May 2023 19:35:24 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2172.outbound.protection.outlook.com [104.47.59.172]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3qv4yaet1y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 May 2023 19:35:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i1yu+OtoEgmuYStKoPBKRPhRuy2btdg565uRUFrXd/OwBXtBH7VH+CgbNtKuhTze/PqtNdouoAK3ML1S8BTlMv/WuIgx3z1yw8UM25WHoPfXGGeF4G4GmOLqBWPX3s2gv76AI49tcyPPibv7+aYPX0l0zeRNS1q7bvLi/iLpBI9MOWeNfWc63R/lVKXI/BXac7VP0tXHhCe02UKRg4pGidyCXLjVoLO6VkK4i9a95aOMtUacJsdXX/Dydsb1yzIySZHnxSinEP7h7UVflbW8lGQs+K9+9N19HqvsNQJcd6/WFO5KNayBS0vo4FsvfVEIIeCpKU3QLSYv0lbYRyHezA== 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=3gtVAI4hKtf/+E3EiicJkmkXA6J9DKm6KruoPPSxiHk=; b=CEslP/GZL2BJCAVVYEucVNeLXA/h7bZSjAiCGUjmXEGAUgGc8XsM2Jzf0g7hC7kbCnM438QTAZg/BAC4TunnKG0/L/gO/zSpECVsaOLHjaR2H/mSxQ7hdj6XE4+EiwWeA0+qrMqdpWnChQxzZB7QyyrKFpB70WFkdBQzQExl/rDhyPJMGGmLs3uSPxOE+6wsHMpeYh162MxGWKDub3OlfeyQxaJHnNQ5fHyLOjgSWUsTSdY/Z6/FxX7tJAp5GWP+axyLRjcCX26vmZ0+gR0zsJnb1+C8L/PeiEArS8+IYigDxSQxlXQmAdM9k2xffEa4D/MtSh7g6KtQYJIPU4oMNA== 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=3gtVAI4hKtf/+E3EiicJkmkXA6J9DKm6KruoPPSxiHk=; b=JswAZxpCJDyHOL6m4a4IqxXPPfMFluVp4cpsF7quKRfdbmh6bjpIfpS+2ueInv3jF3tqwPszh7yaFnrZKHdiz62BAB2wAdaO39yXkKQ/z99Ra6AfUnAZpu9CYXPCcr0eLnAWrEgD+IlTYaPDwnDQd3Wnr5KYygrIwCzIQQeMP6s= Received: from CY8PR10MB7243.namprd10.prod.outlook.com (2603:10b6:930:7c::10) by PH0PR10MB4455.namprd10.prod.outlook.com (2603:10b6:510:36::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.23; Mon, 29 May 2023 19:35:20 +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.022; Mon, 29 May 2023 19:35:20 +0000 Message-ID: Date: Mon, 29 May 2023 14:35:18 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH 3/3] fork, vhost: Use CLONE_THREAD to fix freezer/ps regression Content-Language: en-US To: Oleg Nesterov Cc: "Eric W. Biederman" , Linus Torvalds , linux@leemhuis.info, nicolas.dichtel@6wind.com, axboe@kernel.dk, 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: <20230524141022.GA19091@redhat.com> <87ttw1zt4i.fsf@email.froward.int.ebiederm.org> <20230525115512.GA9229@redhat.com> <87y1lcxwcj.fsf@email.froward.int.ebiederm.org> <87cz2mrtnk.fsf@email.froward.int.ebiederm.org> <87mt1pmezu.fsf@email.froward.int.ebiederm.org> <20230529111859.GA15193@redhat.com> <022f4de6-9eae-0a94-0f55-b84be4982fc3@oracle.com> <20230529174646.GB15193@redhat.com> From: Mike Christie In-Reply-To: <20230529174646.GB15193@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: CH0P223CA0002.NAMP223.PROD.OUTLOOK.COM (2603:10b6:610:116::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_|PH0PR10MB4455:EE_ X-MS-Office365-Filtering-Correlation-Id: 4290c892-6fad-4e95-18cd-08db607bd69d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VE+eF8lkteMoi/HdU75DYOfp9EKeQEfnvLXgjaKbs9OLy/b9TSwyq5kW95CE3FFr0gSr0Dy2C0Ew/iA88SVeap+59+LMX95F7r9yHwz4DIwSCUo6cCsxxYRFiOIoSVbb9KmjsR9mCGIXIxyTJoLcXeugBR0bJKZO9+X0LFtnMxEBjwxalLKJIXwweevJQW/On7g2alFzT4OXhnnO7EUHDoDGD4XrRtElFyBxcjjVJSpoTE7l2RIA51uShMdZAgQWnt4SWqAEzs6DTAXrWtV73mROotdnlxxlkijU2BXayTsD17ym331QQwXpQ8m9WiEqoTB7cKdW1Ve3W+HRQK0C4TG8pBX/KJWjGTGGNEVcm/dtXN4eO9v5q957VCfswZ3Dth55iVJlD1xO4BZ3Te6aTWZ8ojxI4ie3I+nr98n71+xEYpNCJ36DgWffEKMNyEBAuHDZG606JOJ7Dn1jzkVBf4lK20mSzgTMOcG10GY24Cw3qeC8TkH5sO+8i+LFzFE1EBUOdweHZ9PNk+7eVoz/a6Q1da/EQmcl3+GF/YJLfFcuAGqUp+ipzYpzLixmSWOfPV9r42Y9CMGms2CFlubAk8gW86ntNa6VqO9HNS7w5O6/ZqeBcm0/8hFS11wpnpT48jAyoxIJVnzMM81mmsMiYQ== 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)(366004)(39860400002)(396003)(346002)(136003)(376002)(451199021)(83380400001)(38100700002)(186003)(31686004)(41300700001)(6506007)(6512007)(6486002)(26005)(53546011)(2616005)(478600001)(54906003)(66946007)(66556008)(4326008)(6916009)(66476007)(316002)(7416002)(8676002)(5660300002)(2906002)(31696002)(86362001)(8936002)(36756003)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VHpGaXowRFk3MmdodjhqNlp4YUJUNExQcDV5SThaOFA2dmZyall3WG1IcTVL?= =?utf-8?B?dkNUVjljSjdmS1FsajFOdHV5WmFORmczejY1bklPcWhaei9iVEhUZU05NGRa?= =?utf-8?B?OWRmVktsVlBTRkZxMVlzU3JSRndZQUR2WkZETkNzSXhzZnJXV2NWOE9UaVor?= =?utf-8?B?YXRhaUpOcEl4czdqcEpBYmk1Q0l1dERpYnN6V0UvbDZBQXYwTlprM24xM3p3?=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243.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2023 19:35:20.2965 (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: yTrH1FirX0izYMC6kff/sjtH/p902DuRJXBkmTrgSnYLsbDOUyD5O0lhRuhvYoThWCuw0afxnDieN76RZqxm5eMZtiB9ZWYXERpvHSuzlHM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4455 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-29_10,2023-05-29_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 bulkscore=0 suspectscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305290164 X-Proofpoint-GUID: oMYhh36ivWUJ1lbTMjObGCRGAw9g-4z9 X-Proofpoint-ORIG-GUID: oMYhh36ivWUJ1lbTMjObGCRGAw9g-4z9 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/29/23 12:46 PM, Oleg Nesterov wrote: > Mike, sorry, I don't understand your email. > > Just in case, let me remind I know nothing about drivers/vhost/ > No problem. I get it. I don't know the signal/thread code so it's one of those things where I'm also learning as I go. > On 05/29, michael.christie@oracle.com wrote: >> >> On 5/29/23 6:19 AM, Oleg Nesterov wrote: >>> On 05/27, Eric W. Biederman wrote: >>>> >>>> Looking forward I don't see not asking the worker threads to stop >>>> for the coredump right now causing any problems in the future. >>>> So I think we can use this to resolve the coredump issue I spotted. >>> >>> But we have almost the same problem with exec. >>> >>> Execing thread will wait for vhost_worker() while vhost_worker will wait for >>> .release -> vhost_task_stop(). >> >> For this type of case, what is the goal or correct behavior in the end? >> >> When get_signal returns true we can code things like you mention below > > and you have mentioned in the next email that you have already coded something > like this, so perhaps we can delay the further discussions until you send the > new code? > Ok. Let me post that. You guys and the vhost devs can argue about if it's too ugly to merge :) >> and >> clean up the task_struct. > > Hmm... If we you CLONE_THREAD the exiting vhost_worker() will auto-reap itself, Oh wait, are you saying that when we get auto-reaped then we would do the last fput and call the file_operations->release function right? We actually set task_struct->files = NULL for the vhost_task task_struct, so I think we call release a little sooner than you think. vhost_task_create() sets kernel_clone_args->no_files, so the vhost_task task_struc that gets created works like kthreads where it doesn't do a CLONE_FILES and it doesn't do a dup_fd. So when we do de_thread() -> zap_other_threads(), that will kill all the threads in the group right? So when they exit, it will call our release function since we don't have refcount on ourself. > >> However, we now have a non-functioning vhost device >> open and just sitting around taking up memory and it can't do any IO. > > can't comment, see above. > >> For this type of case, do we expect just not to crash/hang, or was this new >> exec'd thread suppose to be able to use the vhost device? > > I just tried to point out that (unless I missed something) there are more corner > cases, not just coredump. Ok. I see. > >>> Or suppose that vhost_worker's sub-thread forks a child with CLONE_FILES... >> >> You mean the vhost_task's task/thread doing a function that does a copy_process >> right? > > I meant that the vhost_task's sub-thread can do sys_clone(CLONE_FILES) from > userspace. I think we were talking about different things. I was saying that when the vhost layer does vhost_task_create() -> copy_process(), the kernel_clone_args.fn is vhost_task_fn() -> vhost_worker(). I thought you were concerned about vhost_worker() or some function it calls, calling copy_process() with CLONE_FILES.