Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp941240rwd; Tue, 16 May 2023 09:32:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ53xANAMX9MgnugNHpnah/w1hWQQ+Lc/wXpJQNmrj6wop+S42280GWGCpBqJD+YoFPklxjR X-Received: by 2002:a17:902:c40d:b0:1ab:2034:26da with SMTP id k13-20020a170902c40d00b001ab203426damr49727989plk.51.1684254733716; Tue, 16 May 2023 09:32:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684254733; cv=pass; d=google.com; s=arc-20160816; b=DA0PbKAact87FEzeniUVmFnWJ2QpXwpkrTERdz4y4hVn+aguxqCZRcw7/FJiEhgmLQ Oe/jvN9VeDOs+CYFupdU0iUOlp4auGH/2AeqqePIBd+Hdd9hAnqAbYJ3b7KWKXACnpPK NSlM5wD+7zsB3L32i4mSns3FZSf2KJeoQjyFWt0zFC8+5ZfLafuRnSRYiL1nnwjGcQ8o XckwJnc1ASqkzN7luAIQQNp95P4dRZhbZuMxclMhfehM+bHfNkR03184Ovx/zqBanV/Q 3eQ4ykzUYtM/nxfgkBOn3oKVbK820OCJKFTrt6KGKWN45v6xwmtZaGx2gkDTqUzZGezA NApg== 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=zMiy3wc6+2aah3369sgh6Hof2vKztLSRE5c9HDt6kHU=; b=Verh7AMErlJCGLsqXMi83kIzgB1+aKGkLJ9ImFm9duU/FnX+ai8qCHQHbanbsO1aDg jW+ZxlMSyeTFSNzJif0xzfgTenqhJYFfSdr+S87tnyo0x9gMWoLgXB8/urWjflN+HEi9 baK626za91cw1n9oz9CkC0Gn1hkbaQNccKl3FlR5JuS9WgBnKhvAvEjtHdNEnYqlaQ1D n7ucLOlIjhy+N5A4uOColOO6ccYTPRtdA3kbwbMYdc8ie4j2IN28vPm13FEYEDQkfMwJ EntyAWi2gk0R8ayEpawSMLGGf2pAnAjI1ISnG86IP1ZgfB9fE20RuOGsaqcuEOjXuQU3 S5Jg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b="m7/kFZiW"; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=hx1eedQj; 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 d4-20020a170903230400b001ae141947acsi6058220plh.183.2023.05.16.09.32.01; Tue, 16 May 2023 09:32:13 -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="m7/kFZiW"; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=hx1eedQj; 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 S230014AbjEPQ0D (ORCPT + 99 others); Tue, 16 May 2023 12:26:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229822AbjEPQ0B (ORCPT ); Tue, 16 May 2023 12:26:01 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD67A19A for ; Tue, 16 May 2023 09:25:42 -0700 (PDT) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34GG4HHQ024776; Tue, 16 May 2023 16:24:54 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=zMiy3wc6+2aah3369sgh6Hof2vKztLSRE5c9HDt6kHU=; b=m7/kFZiWNk2XcVLo6T8lCIfx0zh6M2alWeZ3PTK0Rzx+N+mMFfyULAwjYNoBp1DNLnSc IiQclr9cUu9Czu78whDwHDMBSPpsQsdM+YK1rENKT2iLrs5cgly7VhZ6uFQLWuaZTTRm 39usvj0o2/As3NyirOgSoMMibeHmIvg2J6jEAd/Jj2KESwnv76gOfllduRcVSvviEMVw JJlpewVZuOsuu3Yxd0RFUxp5FR25b3vC0YCupixoxwYjnLODIfGT9GQRIgHQ0F/3ldb5 AYhf4LconHxOT7gWlhjqw5+V8RMW+DWBVhCi552+s+6hQw6dHiz4Uy+wnMUHplw0Rxm3 pw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qj33uu7k1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 May 2023 16:24:53 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 34GFMs4Y039953; Tue, 16 May 2023 16:24:53 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2177.outbound.protection.outlook.com [104.47.56.177]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3qj10425hy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 May 2023 16:24:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ShItUuLDfXw1HEJddlkEGkN/QjBP4SEZbm+6QJowO+/3hWA/BBEZ7ZfBFFj3neb8+sIvj9PC0Zn4+C+U3o3wExkRTBfzoNdone9yZYHZ9rOWE0c2f3fAZ/jIEDeeYJ+HXI/A2YudyQ2gAslvLfe/l6ddLg7H2qbOU9TUoyKz/WLVBLedEL1Pg1JBLAF5sVtuZrq+olpUtJUmY+9igiLGUQJBEofw3ACI/JRLgZr73L8HfL7Kol+2Z8QQ1yikOJu85+z8fyec58sRS4qD6oSKdPuR3QM5nHDQmaispq91ze64nqm4QHGVJgk9h9V52PU0pWpctx5NnRqt3/W5bEfMfA== 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=zMiy3wc6+2aah3369sgh6Hof2vKztLSRE5c9HDt6kHU=; b=UCFxC68Q5d5kZjfxvC+lCHaMqHRc+fIZ/Dq8JlPEsSzPO0j/sd+uUetCW3vanDNi1gT3N7IOyD8hmHj3YGa5U+Usn615B4hZtq99kxRKw0sWnFCtFHUy8aMWHDuLDz09+FEAA/OrooQM2/NRji23k1qc2p4KJAyCkWBQsYpsqQR0qNEUJ+IgQ/6UjgNC4dKvfBu+Ln0J88hhMFHxknrUz2YtLqKpyYlLYDPxli5Aaxts/AH9Fv4BgF+pXd0V+7EF6SHwZPum8lFjL/28fL4778Yptkq4mu25v9j5eWNJfYDqc5A4/R3at8GerJ7xugPjVowWZtu3ONVGG5i2DRvheg== 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=zMiy3wc6+2aah3369sgh6Hof2vKztLSRE5c9HDt6kHU=; b=hx1eedQjLsLx0vHf5nVumdm1RgHR3Gp3N5O/ar9jQ7LaRwrQ6ffVCDTLUw/q4iBTcEmAKxpjg/iJ/eBzOmKsAobqSakwl5i8M0yHyP5SHrEnC63ouQjwUPdSdRp6D9flLf2OQGvgI/q/+VJ8JDDtrirpJIbyJucWnxTbMY3jMg0= Received: from CY8PR10MB7243.namprd10.prod.outlook.com (2603:10b6:930:7c::10) by SN7PR10MB6641.namprd10.prod.outlook.com (2603:10b6:806:2ac::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.24; Tue, 16 May 2023 16:24:50 +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.6387.030; Tue, 16 May 2023 16:24:50 +0000 Message-ID: <683d0c30-4aeb-3547-49a9-90ce6eb1a7d0@oracle.com> Date: Tue, 16 May 2023 11:24:48 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH v11 8/8] vhost: use vhost_tasks for worker threads Content-Language: en-US To: Christian Brauner , Linus Torvalds Cc: Thorsten Leemhuis , nicolas.dichtel@6wind.com, Linux kernel regressions list , hch@infradead.org, stefanha@redhat.com, jasowang@redhat.com, mst@redhat.com, sgarzare@redhat.com, virtualization@lists.linux-foundation.org, ebiederm@xmission.com, konrad.wilk@oracle.com, linux-kernel@vger.kernel.org, Jens Axboe References: <20230202232517.8695-1-michael.christie@oracle.com> <20230202232517.8695-9-michael.christie@oracle.com> <78c5e150-26cf-7724-74ee-4a0b16b944b1@oracle.com> <48842e92-835e-bc3f-7118-48b8f415f532@leemhuis.info> <20230515-vollrausch-liebgeworden-2765f3ca3540@brauner> <122b597e-a5fa-daf7-27bb-6f04fa98d496@oracle.com> <20230516-weltmeere-backofen-27f12ae2c9e0@brauner> From: Mike Christie In-Reply-To: <20230516-weltmeere-backofen-27f12ae2c9e0@brauner> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DM6PR08CA0032.namprd08.prod.outlook.com (2603:10b6:5:80::45) To CY8PR10MB7243.namprd10.prod.outlook.com (2603:10b6:930:7c::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY8PR10MB7243:EE_|SN7PR10MB6641:EE_ X-MS-Office365-Filtering-Correlation-Id: 46b9e564-7c34-4956-1568-08db562a1281 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w9kCo6lbOE+pjQzcFyOgKGl4mY3wD/C2+cdKb/mBMVuYUIqHqauQJ1iGyUBfGhy8PfcpTWOg7A7xCHLizz1QwNIdHeVW3azTuUaiXFZ06UQVqdhzFj/5skQjtmRtR2TWPf8xPexJ+61wmy0ZXcxDeY8Hc0X7Bmdbn1D65Itk7yfwTKMA6iYxj3BYuVGiR/oR9tZu8ZA01LTS3yuuQhsfIFpTeph0CdFX3ktXAInY8MUIbWwyClXiPE2Z2Zuf+4PUt46t5qZX9kGTCb5SLiMULkQUgvcK6Cm2cEbFQyCyClls/XT1wHA+o/3rYM1bO+vp3k73qFcZp+QwKqvdkhBUYYwVnajQKJwVQba1OX1nW5kBuJiRYQMIXIuPNGXTU3nifaWt0jFgrrYWBLZh/MqAlFBDqX7bpvStzovA59a9jlFBPhs1/wasZ7lN1C7oz1ATsA/JybGW2U71HS44KnL+j/jXsVjTbl/eelSoe4c6K0fyMyR+dEt+yb+OWeQ5RRPPgFkzb6K+wH/TNWpQGnDRBAzkmEvi1lsOYkq8Gj7EY3WyZR58YJNhu/r5cdx9T4WIPa16cGhJopRs5XulmBu+qmxEXndY1jFU9IkZt0Ej9+dtmSX9qAEb8TTKRtLj/pJCK5G3pJ5sadecGpeQmnJzJw== 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)(136003)(366004)(39860400002)(376002)(451199021)(38100700002)(36756003)(31696002)(86362001)(5660300002)(7416002)(8936002)(8676002)(2616005)(316002)(6506007)(26005)(53546011)(6512007)(66476007)(66556008)(110136005)(54906003)(66946007)(478600001)(6486002)(31686004)(4326008)(186003)(41300700001)(2906002)(83380400001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QzhzdXNCRmNkcUJvZitRc28zVk1FNFNSN1FxTm83OElCY0FJVkN1NEJZK25R?= =?utf-8?B?K2o5Y1piVnpiYTZMNEQ1L0w3amlObUxUL29KN1RWbTdwUHBXcmtkZlVkS0Rn?= =?utf-8?B?T3p0b1pBUHhqMEZXWWdPZ1RFdXh3a3lYRERwNkFFZEtJOG9lNWZkU0lqRmJ2?= =?utf-8?B?dEJkS2l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TdV?= =?utf-8?B?bDdnMWpjTUxVVXNSKzhKRndaYjNtOXQrMXZNUWVwVzA2d01rWDcvWFN3M2dm?= =?utf-8?B?elNrQT09?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46b9e564-7c34-4956-1568-08db562a1281 X-MS-Exchange-CrossTenant-AuthSource: CY8PR10MB7243.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2023 16:24:50.5509 (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: jLYC1o0KJO/TmeP6V7FT/MUyEE89nFEXhWRgiR93d2nY7L7yD7JbN2uuw1glvDfT/piqFEsXB1Yfh5kmJhVvXVONucNfLkHjq7u4S1BpCBM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR10MB6641 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-16_08,2023-05-16_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 bulkscore=0 mlxscore=0 phishscore=0 malwarescore=0 spamscore=0 mlxlogscore=614 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305160139 X-Proofpoint-GUID: 3gRKZsDPWCF0oeKywT_2lB0eZZPhD0dm X-Proofpoint-ORIG-GUID: 3gRKZsDPWCF0oeKywT_2lB0eZZPhD0dm X-Spam-Status: No, score=-5.5 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_H2,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/16/23 3:39 AM, Christian Brauner wrote: > On Mon, May 15, 2023 at 05:23:12PM -0500, Mike Christie wrote: >> On 5/15/23 10:44 AM, Linus Torvalds wrote: >>> On Mon, May 15, 2023 at 7:23 AM Christian Brauner wrote: >>>> >>>> So I think we will be able to address (1) and (2) by making vhost tasks >>>> proper threads and blocking every signal except for SIGKILL and SIGSTOP >>>> and then having vhost handle get_signal() - as you mentioned - the same >>>> way io uring already does. We should also remove the ingore_signals >>>> thing completely imho. I don't think we ever want to do this with user >>>> workers. >>> >>> Right. That's what IO_URING does: >>> >>> if (args->io_thread) { >>> /* >>> * Mark us an IO worker, and block any signal that isn't >>> * fatal or STOP >>> */ >>> p->flags |= PF_IO_WORKER; >>> siginitsetinv(&p->blocked, sigmask(SIGKILL)|sigmask(SIGSTOP)); >>> } >>> >>> and I really think that vhost should basically do exactly what io_uring does. >>> >>> Not because io_uring fundamentally got this right - but simply because >>> io_uring had almost all the same bugs (and then some), and what the >>> io_uring worker threads ended up doing was to basically zoom in on >>> "this works". >>> >>> And it zoomed in on it largely by just going for "make it look as much >>> as possible as a real user thread", because every time the kernel >>> thread did something different, it just caused problems. >>> >>> So I think the patch should just look something like the attached. >>> Mike, can you test this on whatever vhost test-suite? >> >> I tried that approach already and it doesn't work because io_uring and vhost >> differ in that vhost drivers implement a device where each device has a vhost_task >> and the drivers have a file_operations for the device. When the vhost_task's >> parent gets signal like SIGKILL, then it will exit and call into the vhost >> driver's file_operations->release function. At this time, we need to do cleanup > > But that's no reason why the vhost worker couldn't just be allowed to > exit on SIGKILL cleanly similar to io_uring. That's just describing the > current architecture which isn't a necessity afaict. And the helper > thread could e.g., crash. > >> like flush the device which uses the vhost_task. There is also the case where if >> the vhost_task gets a SIGKILL, we can just exit from under the vhost layer. > > In a way I really don't like the patch below. Because this should be > solvable by adapting vhost workers. Right now, vhost is coming from a > kthread model and we ported it to a user worker model and the whole > point of this excercise has been that the workers behave more like > regular userspace processes. So my tendency is to not massage kernel > signal handling to now also include a special case for user workers in > addition to kthreads. That's just the wrong way around and then vhost > could've just stuck with kthreads in the first place. I would have preferred that :) Maybe let's take a step back and revisit that decision to make sure it was right. The vhost layer wants: 1. inherit cgroups. 2. share mm. 3. no signals 4. to not show up was an extra process like in Nicolas's bug. 5. have it's worker threads counted under its parent nproc limit. We can do 1 - 4 today with kthreads. Can we do #5 with kthreads? My first attempt which passed around the creds to use for kthreads or exported a helper for the nproc accounting was not liked and we eventually ended up here. Is this hybird user/kernel thread/task still the right way to go or is better to use kthreads and add some way to handle #5? > > So I'm fine with skipping over the freezing case for now but SIGKILL > should be handled imho. Only init and kthreads should get the luxury of > ignoring SIGKILL. > > So, I'm afraid I'm asking some work here of you but how feasible would a > model be where vhost_worker() similar to io_wq_worker() gracefully > handles SIGKILL. Yes, I see there's > > net.c: .release = vhost_net_release > scsi.c: .release = vhost_scsi_release > test.c: .release = vhost_test_release > vdpa.c: .release = vhost_vdpa_release > vsock.c: .release = virtio_transport_release > vsock.c: .release = vhost_vsock_dev_release > > but that means you have all the basic logic in place and all of those > drivers also support the VHOST_RESET_OWNER ioctl which also stops the > vhost worker. I'm confident that a lof this can be leveraged to just > cleanup on SIGKILL. We can do this, but the issue I'm worried about is that right now if there is queued/running IO and userspace escalates to SIGKILL, then the vhost layer will still complete those IOs. If we now allow SIGKILL on the vhost thread, then those IOs might fail. If we get a SIGKILL, I can modify vhost_worker() so that it temporarily ignores the signal and allows IO/flushes/whatever-operations to complete at that level. However, we could hit issues where when vhost_worker() calls into the drivers listed above, and those drivers call into whatever kernel layer they use, that might do if (signal_pending(current)) return failure; and we now fail. If we say that since we got a SIGKILL, then failing is acceptable behavior now, I can code what you are requesting.