From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2516FA056A for ; Fri, 6 Mar 2020 07:05:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0A38C1BFD6; Fri, 6 Mar 2020 07:05:26 +0100 (CET) Received: from mx0b-00169c01.pphosted.com (mx0a-00169c01.pphosted.com [67.231.148.124]) by dpdk.org (Postfix) with ESMTP id A512C3B5 for ; Fri, 6 Mar 2020 07:05:23 +0100 (CET) Received: from pps.filterd (m0045114.ppops.net [127.0.0.1]) by mx0a-00169c01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02665FuU032221 for ; Thu, 5 Mar 2020 22:05:22 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paloaltonetworks.com; h=mime-version : references : in-reply-to : from : date : message-id : subject : to : cc : content-type; s=PPS12012017; bh=1NXsQIt+7T+QgMFOZIWLJvMS3FsisGXipAY4K6tpZCY=; b=EkwP6NDGcsooxAwlZEN9OosYXBHKg05ONagqS80TCAflSSO3745NWy3Wke2nyKqwUEB1 XfNkQq9lQ2UoIzcezDsVHpcWIF8x6wtb2y4OaZFrfzTJrt4kdPb+cI1RDbsqIXUh+fXr PVU+ju2aPs0C+7xf2+B88Ybrn8DtB8cGy5PjMf4Ai20rt8NAKmKk1UgD3283HQBDwo+I MQVJB2Zr51XthsjnfzOoOWmfg+ga88ZKHO9SZ+sDVJNCAaGumq9UmSb/6SUK8E1z0Ev9 1ODG9filPsjrTbu4wvgHRlMTeA5tNf1kwOI8YtJd104RayyndFp6L+1IT5Vkt1bwFvYM 8w== Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by mx0a-00169c01.pphosted.com with ESMTP id 2yh58j3kyn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 05 Mar 2020 22:05:22 -0800 Received: by mail-qv1-f69.google.com with SMTP id r16so724524qvp.13 for ; Thu, 05 Mar 2020 22:05:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paloaltonetworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1NXsQIt+7T+QgMFOZIWLJvMS3FsisGXipAY4K6tpZCY=; b=KhQsXvoxP+8KyGhe/3SaiCv4D+lF/Zqa6l61YbPWjDpSZCqW2nyl/mFnboGm2ajkgt 6hWkOidzrwGHw5t3sFfPW0RFv/GrgJV7jGbNy0DjelHEA7mspUflCV9zK1tPz2VhHADV SLGRRIjDBwxlcHNr6jQm4E7cgqkTsBGmuI9SdGTHGBSyfXQeZS8A8NXO8a0bFndu7gn8 dxDKnuQKAqwlWc6FHUkaVmZpIuaDOMV/x5W+aolJqocWgVtDMucUe6lnkeu7sW6eFS9R tD97mHlhqFdJSXbMMQw3c37hB9JNiNzBC1Nx81nWf+tODHyB7LBqBd3pe1M7R8emIPdG phXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1NXsQIt+7T+QgMFOZIWLJvMS3FsisGXipAY4K6tpZCY=; b=ry1W1g9OuC7tRdjeLzXPHpIkyNWZ+x0vitBE3420c+3AOy30ahMPB833zVlaQzs8ht VbmPNUt9OSTJVCED5Q0g4bc4wGYCqFOvRULcweILl8XoC4JRXc04KXOdwf30xcsUp8ud u0hLXeNsM6LMjizVx26Yf0481npO393CeGXSOp3W8A1M+pKMfjiRGYPjcegAm7XIfoHI TiqP0JAJIzBiI0mWEGLlJ1g59zd8g6Dx5+M2hmBFN+OJaJH8upi2PDgxBmOJtuUyiPsA lrIgFQENRd94vn+evcc3CLwtHFUVhlr3cnbZkNBUioWlgDS1PQqPjDVPOiH5L9weqGdt PnCw== X-Gm-Message-State: ANhLgQ32RSpDLOYXiTJP1lLwHIB+ugCCRlLbgWZmCIsB80kfH4LHpmwx zSiS277FJv66/jFe8bVMxICOX0NJw6ireX998mZQz2szfJsSa3Ffm8X2GaQDZykgpkfxeBIEcLL q6peV0eEN/A+HWcpIofsDoNE= X-Received: by 2002:ac8:4408:: with SMTP id j8mr1575308qtn.3.1583474721282; Thu, 05 Mar 2020 22:05:21 -0800 (PST) X-Google-Smtp-Source: ADFU+vsbxHHKSMcMfV4m5kwWIoaVJIB5/r8pSd3bHkV1sIxKq/AuBd2OCOb+qrJ0+ZXBEwbm6qdcoy/7EeTzKVJ+uYU= X-Received: by 2002:ac8:4408:: with SMTP id j8mr1575291qtn.3.1583474720984; Thu, 05 Mar 2020 22:05:20 -0800 (PST) MIME-Version: 1.0 References: <20200305104651.25456-1-mattias.ronnblom@ericsson.com> In-Reply-To: <20200305104651.25456-1-mattias.ronnblom@ericsson.com> From: Venky Venkatesh Date: Thu, 5 Mar 2020 22:05:09 -0800 Message-ID: To: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= Cc: jerinj@marvell.com, dev@dpdk.org, stable@dpdk.org X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572 definitions=2020-03-06_01:2020-03-05, 2020-03-06 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 adultscore=0 spamscore=0 clxscore=1011 bulkscore=0 priorityscore=1501 lowpriorityscore=0 malwarescore=0 suspectscore=1 mlxlogscore=999 phishscore=0 mlxscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003060042 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] [PATCH] event/dsw: avoid reusing previously recorded events X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi Mattias, Have a question on this fix. I understand you wanting a certain number of events before making a decision to migrate (in the above fix). However, suppose there are fewer events over a few flows (even if not many) and yet your core is heavily loaded -- indicating may be they are one or more very CPU intensive flows. Often in DPI situations depending on the complexity of the policy you can get delayed longer. It might still be worthwhile to migrate if the other cores are really lightly loaded. I think that case will be missed out in this approach. Fundamentally, the number of packets being a proxy-metric for the load of that flow on the cpu is simplistic at times. Very CPU intensive medium/lower bandwidth flows can be picked up in this heuristic. If there is a way that at the time of DSW init we can have a way of tuning it depending on the application scenario it might be more flexible. Thanks -Venky On Thu, Mar 5, 2020 at 2:47 AM Mattias R=C3=B6nnblom < mattias.ronnblom@ericsson.com> wrote: > Avoid reusing recorded events when performing a migration, since this > may make the migration selection logic pick an already-moved flow. > > Fixes: f6257b22e767 ("event/dsw: add load balancing") > Cc: stable@dpdk.org > > Reported-by: Venky Venkatesh > Signed-off-by: Mattias R=C3=B6nnblom > --- > drivers/event/dsw/dsw_event.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.= c > index d68b71b98..296adea18 100644 > --- a/drivers/event/dsw/dsw_event.c > +++ b/drivers/event/dsw/dsw_event.c > @@ -646,6 +646,9 @@ dsw_port_consider_migration(struct dsw_evdev *dsw, > if (dsw->num_ports =3D=3D 1) > return; > > + if (seen_events_len < DSW_MAX_EVENTS_RECORDED) > + return; > + > DSW_LOG_DP_PORT(DEBUG, source_port->id, "Considering > migration.\n"); > > /* Randomize interval to avoid having all threads considering > -- > 2.17.1 > >