Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2239140rwb; Thu, 27 Jul 2023 04:30:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlFXJZPcqDf6/NvuswUfbH98r+buN7ZsEYuUZhXAKhxO8/McoFbCUmcdLkB2QiIxOBhzbjN6 X-Received: by 2002:a17:906:32cb:b0:993:f4cd:34b3 with SMTP id k11-20020a17090632cb00b00993f4cd34b3mr1605599ejk.43.1690457434301; Thu, 27 Jul 2023 04:30:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690457434; cv=none; d=google.com; s=arc-20160816; b=GkoAypSzihYhkRO+vyzJpz+Lq9xw0mrSEh1lG/NWpzXrhJVtYzLdzpPaSwdfWqx9or HdpplyLO7whdY/mKwultAbniTg32ZsN/KW91fiOoA4v5S8IHj9QeQfMOQn7DGYRNjyrH 31e9A2lrzehhuyJGMDhQj5+rLWBZoISEGIOV86l8qeQLod7lbTVHeJ7+nyl0BAf6qCFQ SFToHrhXEfu6wiTBl8pEf5K/PZu8PUCiECBqu4XJ4tPrEGemnk8t/B1Agi0RjBWQLAim dkGoIijd6OhrBZVCQd7PKbEWFATfeeTNZancLiO+8gh0MRWuUJ6pjlmA6IGhBhClCGyA Z3wQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9OkPmAayPDeHyXcIMrmOokqY8foYhEAqmOlnJq34vJA=; fh=KuqLKGQyW89E9WWWoPZXUV/Nqr1t61nBj3K9WzqnIsI=; b=kw0YM8JH4WuCNs84J17KV6iyGmC6VbQCUmKO9n8TPZAHDKVPWci+c+iprE73lrtINt q/KOkE9JYx1/FKVk75J6CW8kACeE2EEHzjesdi9aNwL3zSwmb2UpUgdqNnhQv1Upxppc 2eaO3PAQ93K2oXyLLec8V9Vr19JhCpVlcmFCdRXonSyr6Wry4e6MNVIMSr4addTk3L9V uxiXyc96xBieDrD0h+QzJehpepanVAnQUkKWYDATKy/Hv94bqn8g9Gjhntw+dU3OsgjH cv0kaqUJuDuopjrzNcRbs6/DddZAJyIHv4s4HPIuH86SFYePQGAPDt98bShdi7zTcdOF FB6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YRPRoDTC; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g9-20020a1709061c8900b00982762e2cc4si810521ejh.775.2023.07.27.04.30.09; Thu, 27 Jul 2023 04:30:34 -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=@redhat.com header.s=mimecast20190719 header.b=YRPRoDTC; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233431AbjG0Jsg (ORCPT + 99 others); Thu, 27 Jul 2023 05:48:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232680AbjG0Jrv (ORCPT ); Thu, 27 Jul 2023 05:47:51 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58331F2 for ; Thu, 27 Jul 2023 02:46:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1690451212; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9OkPmAayPDeHyXcIMrmOokqY8foYhEAqmOlnJq34vJA=; b=YRPRoDTCtwCBtgscYwKZLIKnueEXAMdhIisvEZFEnfAJpClJ6+BAafAloGnsE1Ds5CfxXG 3Xxv3tpD1ugl4byMtEw2LRe3hlcEczbnR6Freyflah3Fvlq56FoPzT04EB0h7WUhFxUnZf TYrs7qZ8Twe7VJGjQbYUf0VS52w5iYg= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-433-veIZmlGNPMKwmPchtccD_g-1; Thu, 27 Jul 2023 05:46:51 -0400 X-MC-Unique: veIZmlGNPMKwmPchtccD_g-1 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5226eaba9e9so450233a12.2 for ; Thu, 27 Jul 2023 02:46:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690451210; x=1691056010; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9OkPmAayPDeHyXcIMrmOokqY8foYhEAqmOlnJq34vJA=; b=gkiqTuqCoO1F1QpU4lCT8eZsoXGbK81OFqTwUCC3N/G64Wy+KS5Q7E+rTUwSvMC3y9 QcAIpM8vtwrTMpfRR+RmUr3rS1fo8lQ9ubtgc9Q1ze8Lha/s7Q8pS3K/sy7W7uvsQwgW 1tNMtC7Ldey1cun3V4ezBxHka7V7YPAYF73/qHCTSjr+styiRS7PFzlvnqiZpxSGCxxu pA4QocP+Lm2XCX52vnnDWKVU34w2VDIFFjoYYwZ8ijn8jpMWbTTyGPaCakdcE4oPiP3I w1LhES54ENP6SnK4jh02Wiky4GDl7aXY7zL9i+i+dNbsg+Xjz7iCKoGdtddTMENQ3ZzU I49Q== X-Gm-Message-State: ABy/qLYjUncAXb2vXoXNPlKceCwjIekBIvh4dYqqEdG+T1aPUTuHqnQU 8tJPEBLB1SxD1mVqIZI+JRMXz0OTvaEOZhNvANkN+GceXWfhivQAZ8cdzdo92tU7EGlSebjKDMw 73gfmS9FqHs+OlWEF1/mkt2lI X-Received: by 2002:a05:6402:1489:b0:522:3b94:c6f8 with SMTP id e9-20020a056402148900b005223b94c6f8mr1250127edv.37.1690451210321; Thu, 27 Jul 2023 02:46:50 -0700 (PDT) X-Received: by 2002:a05:6402:1489:b0:522:3b94:c6f8 with SMTP id e9-20020a056402148900b005223b94c6f8mr1250106edv.37.1690451210017; Thu, 27 Jul 2023 02:46:50 -0700 (PDT) Received: from redhat.com ([2.52.14.22]) by smtp.gmail.com with ESMTPSA id n10-20020aa7db4a000000b00522584bb58esm436315edt.24.2023.07.27.02.46.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jul 2023 02:46:49 -0700 (PDT) Date: Thu, 27 Jul 2023 05:46:45 -0400 From: "Michael S. Tsirkin" To: Jason Wang Cc: Maxime Coquelin , Shannon Nelson , xuanzhuo@linux.alibaba.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, davem@davemloft.net Subject: Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop Message-ID: <20230727054300-mutt-send-email-mst@kernel.org> References: <20230724025720-mutt-send-email-mst@kernel.org> <20230725033506-mutt-send-email-mst@kernel.org> <20230726073453-mutt-send-email-mst@kernel.org> <20230727020930-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Thu, Jul 27, 2023 at 04:59:33PM +0800, Jason Wang wrote: > > They really shouldn't - any NIC that takes forever to > > program will create issues in the networking stack. > > Unfortunately, it's not rare as the device/cvq could be implemented > via firmware or software. Currently that mean one either has sane firmware with a scheduler that can meet deadlines, or loses ability to report errors back. > > But if they do they can always set this flag too. > > This may have false negatives and may confuse the management. > > Maybe we can extend the networking core to allow some device specific > configurations to be done with device specific lock without rtnl. For > example, split the set_channels to > > pre_set_channels > set_channels > post_set_channels > > The device specific part could be done in pre and post without a rtnl lock? > > Thanks Would the benefit be that errors can be reported to userspace then? Then maybe. I think you will have to show how this works for at least one card besides virtio. -- MST