Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2408016pxp; Mon, 21 Mar 2022 19:27:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylTlzz04i1A1yVJkafyuC4enZLvIGKWjmL24QpEQmnyPYbwGJhn6gG0+02t/WyZ76x0UII X-Received: by 2002:a65:5c48:0:b0:382:2c7:28e9 with SMTP id v8-20020a655c48000000b0038202c728e9mr19846510pgr.472.1647916045099; Mon, 21 Mar 2022 19:27:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647916045; cv=none; d=google.com; s=arc-20160816; b=f/lZ23qewJ0fDGXjraxOD93Q8xg1lrK4ZBgaQiz6r/zzPkp+xeANzg/1uGjixGA1fF nKawWJj67w2GIM8/WN4kCixpWstc0ZstfSo2x9Q770Y43jRh7AJcwshTy4aain7zaR63 ghTSAWh2cTZ5TMAk0RQq1hcUvK0BLTJBWB+x9SVy4X5L2iqofrdLFpmHR3ZaHZQWctdx D4gaD+CSlzU6WqR93DHqRVskbZbbY8TU7dfSSABm6LMBEU/vLAZp5LfLmwVuWw2mTgUg fK4M3WQHgs7ov8tD8bepfDTTFzLQ3oG1A2JfBtpsNJ1fUZTUILFJXaus1drYLHdbrlro 3jPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=sAk9FMAq7G/qGtP6D8AGvXHRXy5lqx/zoAVECLpUuqk=; b=Bv6ZPF7Zavug/kSy0P0Xm0P2/ecvAEk8/HPhDauryHUNp9/ik5iYpTVC0N7qXIQ6/p d/LFJHydcfZ2MXL28FyM2o8aROTOn8FvzIAasCAa39d1ebaRYK5223QXqx5i0H6aXz2m kQD4FaMlWssfD+RMltBGI5oHk94Kt6PwlEoV3nheX4tcH/BWbov+A4M9B06Fos3P9HBz Jf9+t02hy/t3mygtam51lriyfhHE2C4fVCM1+cl71C1QOK6EVs+8N3XzwMpz9KfW7Kka 7Lkh9DpUWL3AUYDsyp5N2D72LvvqZyWMbPew89gZWnASYZBpApdvaNhtvArJ/4FqHUqj soqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fbtRjgiV; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id f24-20020a635118000000b003825c503553si7220131pgb.825.2022.03.21.19.27.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 19:27:25 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fbtRjgiV; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AD16D5DA7E; Mon, 21 Mar 2022 18:59:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235223AbiCVCA5 (ORCPT + 99 others); Mon, 21 Mar 2022 22:00:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235214AbiCVCAy (ORCPT ); Mon, 21 Mar 2022 22:00:54 -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 ESMTP id B24555BE62 for ; Mon, 21 Mar 2022 18:59:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647914367; 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=sAk9FMAq7G/qGtP6D8AGvXHRXy5lqx/zoAVECLpUuqk=; b=fbtRjgiVnpY3DmUXRqFYoPXm1gkknSAeMjFUXJ/wLWhZRTbzK8llYVmfYtv9W56hkiyLzI quMCdsfjtMNmesduUKfmxjXnxr/JDOWzS/Qv/8dqxWjIe4rp80il4Ri+pqjnza1F6LNf5o lqImrZMwKEN04wata3zpErZd8lSB8Vk= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-557-af3s_oDDMdqohT8MWzCzbw-1; Mon, 21 Mar 2022 21:59:26 -0400 X-MC-Unique: af3s_oDDMdqohT8MWzCzbw-1 Received: by mail-lj1-f200.google.com with SMTP id q5-20020a2e9145000000b002497bf0eaa1so2791252ljg.5 for ; Mon, 21 Mar 2022 18:59:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sAk9FMAq7G/qGtP6D8AGvXHRXy5lqx/zoAVECLpUuqk=; b=59kgRDpqCe5OyageOq8JYJSGCzRYKjVtuyIteejs34ytgo+zd5mJ/R8Wt+uqR17eFL v3uj6xS9NPImdvYWILjcGSzEea8BfT3B3dLwP8zqb6QQpJM82KHgsiJh0T4ZEYuA4WJR geTb4lGj0sphAjwENfdMe+vjy3Rfu2uXGNt4ym60EqWt+3MXJ6Q1aMd9p8gehlROjX/h +61MGUVuQgNfEl4gST7RLqVl1sy700PsOrkPhq5MitryDaY5R5DT97OFtS+7W+j0E/A8 6PJVeRnv/21BjkUfEJa2tvPP6KRgkKVt3HCSB9eHLuODSmWOzx19QvYSBjdO7cVZSIGV Vy5Q== X-Gm-Message-State: AOAM532FFdWMxSore5QSDpBaXAOvAQfNxknSFIYMH2jB+mDgZ3ND0yMV CqUy0cjDwbLL3Wx8Y0H/EfXMpnH6MNiG2TefHm5vB0VG7RK0R4Ji+vU/USopWQtUaunI0huSM6J ZTqujLb10bSzH3f+Bnm2hDZjBU2gKVFlsdz2S6Pig X-Received: by 2002:a2e:824e:0:b0:249:7e3d:c862 with SMTP id j14-20020a2e824e000000b002497e3dc862mr8338194ljh.97.1647914365113; Mon, 21 Mar 2022 18:59:25 -0700 (PDT) X-Received: by 2002:a2e:824e:0:b0:249:7e3d:c862 with SMTP id j14-20020a2e824e000000b002497e3dc862mr8338187ljh.97.1647914364929; Mon, 21 Mar 2022 18:59:24 -0700 (PDT) MIME-Version: 1.0 References: <20220321060429.10457-1-jasowang@redhat.com> <20220321085317.3148-1-hdanton@sina.com> <20220321123420.3207-1-hdanton@sina.com> In-Reply-To: <20220321123420.3207-1-hdanton@sina.com> From: Jason Wang Date: Tue, 22 Mar 2022 09:59:14 +0800 Message-ID: Subject: Re: [PATCH 1/2] vdpa: mlx5: prevent cvq work from hogging CPU To: Hillf Danton Cc: mst , Eli Cohen , virtualization , linux-kernel Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_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 Mon, Mar 21, 2022 at 8:34 PM Hillf Danton wrote: > > On Mon, 21 Mar 2022 17:00:09 +0800 Jason Wang wrote: > > > > Ok, speak too fast. > > Frankly I have fun running faster five days a week. :) > > > So you meant to add a cond_resched() in the loop? > > Yes, it is one liner. Yes, there will be no "infinite" loop, but since the loop is triggered by userspace. It looks to me it will delay the flush/drain of the workqueue forever which is still suboptimal. Thanks > > Hillf >