Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp855478ybt; Fri, 26 Jun 2020 13:14:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzDsNpteok/NLMQ9rX04+DGFR2uA86eoqgbqZxuDsMRXGfm3hZZIr8gKmXj1tgZuxZE4Dt X-Received: by 2002:a17:906:ce30:: with SMTP id sd16mr4273836ejb.374.1593202472271; Fri, 26 Jun 2020 13:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593202472; cv=none; d=google.com; s=arc-20160816; b=zjr6SlCsrRQ98hdyCxspgyhWHPB56bpCID6jWkYnnbY/HF8N1/FIjLe32iQ+amjal+ 2JsuN/WXu0Hu9A+700zHN8sRvhWtdqPalfpOKDuYzrCNvTJ+yqtE05bB6XJkaT+6TIL5 Almty09Xa2tNMKv3jmR9cXTQRK7qykQL1uc7BMi0Fmd4zYaUTzHpa6fQC/YyRJe/eT1L ZFgRsnNugQgOMo9Ptgo1i8BBE2Wfr2/cZSEv5L5s1caNk409azsUZ66V0ANCX+ys7/vn eQ6GKrn1t6nk95gcSgqkDbipDaIDZdG6vCVOR0yL0xEAakUKLQxxJ460CI7e+v4s6JA9 /V9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:mime-version:user-agent:date :message-id:organization:autocrypt:from:references:cc:to:subject :dkim-signature; bh=fWCZus3TfTyS/MOm72j+kbzDxTNx5spDUupLtAB1S0c=; b=G6vwQzMZFWajssSCNWU6YO4PJnW4YGbaKOeU8+mYECu42d8fxYN+kIefKqZ0RaWLtM OP18po0hn/Vu0CEwIcA3OIHhBoeC5NG2BI9Cdxep4YrEo70Bh4z57qZqqJRcBHkK2wjl IMJbLJL4u3P9TJy0f5LEWyIR10VJPor9N5x7OaPwC7Th9rRq+37Ynq6x92pG1GcIN3AG Cu4TMhno6CuRtNWjxp6VrBNq2CMbPXucG3NGNJe7ssn2SiDS0MtU2Hnzd22ALYIMaD5+ 47mJzYAvP56alkgsxhMs9U5yu62kHt5HyedDXizwMnLLa/JjdyyQ6VMKKNnb1/Ycwecs Iqcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NOn+hnxa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk25si7264690edb.28.2020.06.26.13.14.09; Fri, 26 Jun 2020 13:14:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NOn+hnxa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1725834AbgFZULf (ORCPT + 99 others); Fri, 26 Jun 2020 16:11:35 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:32236 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725781AbgFZULf (ORCPT ); Fri, 26 Jun 2020 16:11:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593202293; 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:autocrypt:autocrypt; bh=fWCZus3TfTyS/MOm72j+kbzDxTNx5spDUupLtAB1S0c=; b=NOn+hnxakK9id/8/LDXL/uYXwVTMNy4iIx8+bQHUEMKpiV5SyhpFVZ7k39pbSbrmecly8G xako9lmN0TFMAgpc0H9wiO/GwyO+TjXn7suWU4Bu8/KCxkX8tKdcge51tNs+eVbbG4jxm2 4VNQJYbfVL7/VvWVHggXSgtGRp0JANk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-156-_OzQuzV1OQC6RyuXEBnc4A-1; Fri, 26 Jun 2020 16:11:29 -0400 X-MC-Unique: _OzQuzV1OQC6RyuXEBnc4A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 27261107ACCA; Fri, 26 Jun 2020 20:11:28 +0000 (UTC) Received: from [10.10.115.20] (ovpn-115-20.rdu2.redhat.com [10.10.115.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2B3CC5C541; Fri, 26 Jun 2020 20:11:26 +0000 (UTC) Subject: Re: [Patch v1] i40e: limit the msix vectors based on housekeeping CPUs To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, frederic@kernel.org, mtosatti@redhat.com, sassmann@redhat.com, jeffrey.t.kirsher@intel.com, jacob.e.keller@intel.com, jlelli@redhat.com References: <20200615202125.27831-1-nitesh@redhat.com> <20200615202125.27831-2-nitesh@redhat.com> <20200616080309.GA21210@infradead.org> From: Nitesh Narayan Lal Autocrypt: addr=nitesh@redhat.com; prefer-encrypt=mutual; keydata= mQINBFl4pQoBEADT/nXR2JOfsCjDgYmE2qonSGjkM1g8S6p9UWD+bf7YEAYYYzZsLtbilFTe z4nL4AV6VJmC7dBIlTi3Mj2eymD/2dkKP6UXlliWkq67feVg1KG+4UIp89lFW7v5Y8Muw3Fm uQbFvxyhN8n3tmhRe+ScWsndSBDxYOZgkbCSIfNPdZrHcnO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7Yb7cHuJzOMqfgoP4tydP4QCuyd9Q2OHHL5AL4VFNb8SvqAxxYSPuDJTI3JZwI7 d8JTPKwpulMSUaJE8ZH9n8A/+sdC3CAD4QafVBcCcbFe1jifHmQRdDrvHV9Es14QVAOTZhnJ vweENyHEIxkpLsyUUDuVypIo6y/Cws+EBCWt27BJi9GH/EOTB0wb+2ghCs/i3h8a+bi+bS7L FCCm/AxIqxRurh2UySn0P/2+2eZvneJ1/uTgfxnjeSlwQJ1BWzMAdAHQO1/lnbyZgEZEtUZJ x9d9ASekTtJjBMKJXAw7GbB2dAA/QmbA+Q+Xuamzm/1imigz6L6sOt2n/X/SSc33w8RJUyor SvAIoG/zU2Y76pKTgbpQqMDmkmNYFMLcAukpvC4ki3Sf086TdMgkjqtnpTkEElMSFJC8npXv 3QnGGOIfFug/qs8z03DLPBz9VYS26jiiN7QIJVpeeEdN/LKnaz5LO+h5kNAyj44qdF2T2AiF HxnZnxO5JNP5uISQH3FjxxGxJkdJ8jKzZV7aT37sC+Rp0o3KNc+GXTR+GSVq87Xfuhx0LRST NK9ZhT0+qkiN7npFLtNtbzwqaqceq3XhafmCiw8xrtzCnlB/C4SiBr/93Ip4kihXJ0EuHSLn VujM7c/b4pps Organization: Red Hat Inc, Message-ID: <52220ae0-0ed5-f638-ebe2-725e0333ea6a@redhat.com> Date: Fri, 26 Jun 2020 16:11:24 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200616080309.GA21210@infradead.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="EyqhfkQBk3ilLtw8YqQqgoSFPgTLemcZG" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EyqhfkQBk3ilLtw8YqQqgoSFPgTLemcZG Content-Type: multipart/mixed; boundary="8bqknKfVNWtEz0vBxYHqoJlUuIXzzL85c" --8bqknKfVNWtEz0vBxYHqoJlUuIXzzL85c Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US On 6/16/20 4:03 AM, Christoph Hellwig wrote: > On Mon, Jun 15, 2020 at 04:21:25PM -0400, Nitesh Narayan Lal wrote: >> +=09hk_flags =3D HK_FLAG_DOMAIN | HK_FLAG_WQ; >> +=09mask =3D housekeeping_cpumask(hk_flags); >> +=09cpus =3D cpumask_weight(mask); > Code like this has no business inside a driver. Please provide a > proper core API for it instead. Also please wire up > pci_alloc_irq_vectors* to use this API as well. > Hi Christoph, I have been looking into using nr_houskeeping_* API that I will be defining within pci_alloc_irq_vectors* to limit the nr of vectors. However, I am wondering about a few things: - Some of the drivers such as i40e until now, use the num_online CPUs to =C2=A0 restrict the number of vectors that they should create. Will it make= sense if =C2=A0 I restrict the maximum vectors requested based on =C2=A0 nr_online/housekeeping_cpus (Though I will have to make sure that th= e =C2=A0 min_vecs is always satisfied)? =C2=A0 The other option would be to check for the total available vectors i= n all =C2=A0 online/housekeeping CPUs for limiting the maxvecs, this way will pro= bably be =C2=A0 more accurate? - Another thing that I am wondering about is the right way to test this cha= nge. Please let me know if you have any suggestions? --=20 Nitesh --8bqknKfVNWtEz0vBxYHqoJlUuIXzzL85c-- --EyqhfkQBk3ilLtw8YqQqgoSFPgTLemcZG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkXcoRVGaqvbHPuAGo4ZA3AYyozkFAl72VmwACgkQo4ZA3AYy ozlWiBAAzgRtRT98cOOJaNMpp9iMHrZKMHazcwyVwdyMTqdz7LpjZsFTONSJDtui l1hi+sU3nh/ppNBBxEeTb73cMHM6WVOKgx1Z/McSuTlpiunph27fJX/JUXhS4pfI kFzCZWAWLcyWeoSnHEHoAUBLY35sLxVYyOgdrubFIbstdosMgASInrrWRlFfuhcM +Y11OrhzlXOwMF0H14GsBaOmHBeMMSJGU5G9vToApXkbNpMDLCrxGL2SvqT4KSWO CsdwnjzcgkqmX2TQru++Nm9QtayHLSxp7YQch1TdB0o5pbN0Horx/z06fEhmCjwm ljMAduocpSRxY+UggjqC1J2swKRMi2WPkqwVmtq3COHwbx0I0x0EzIQL/J543P2S UAVC/N8/zOkqK9SpplOmFJ6aX6KbxtXehyf42b7q8lSXrfY/b5OVWu8WYkmkopCY fYMPRj6qIafU/A/GNz1SQhbsmHYIdmKhW+xBQLXV22x5zxAyWY1+s8Un0DbPRZMx 6hItsxURZm1nn0C/QSrh+DEVGv2TFPP6QjlY6MUr+j75dqh6GGLCP1K7QsvVYuKX vG9Zt5GLO2dOZV/nuwKFxGghbO8uRmKyVVAr2bOnqhTQnx8H2YIF9Knygdlqzs7A g59HeLCMicE0H+KRy8hjWmrkvPMz9IDcVQrPppSUVglzXHuSUqU= =3fS8 -----END PGP SIGNATURE----- --EyqhfkQBk3ilLtw8YqQqgoSFPgTLemcZG--