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 D4F61A056A; Fri, 6 Mar 2020 07:05:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 929F92BA8; Fri, 6 Mar 2020 07:05:24 +0100 (CET) Received: from mx0b-00169c01.pphosted.com (mx0b-00169c01.pphosted.com [67.231.156.123]) by dpdk.org (Postfix) with ESMTP id DB3D93B5 for ; Fri, 6 Mar 2020 07:05:22 +0100 (CET) Received: from pps.filterd (m0048188.ppops.net [127.0.0.1]) by mx0b-00169c01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 026655b2015342 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-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0b-00169c01.pphosted.com with ESMTP id 2yk55eavf4-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-qt1-f197.google.com with SMTP id s5so708952qtn.7 for ; Thu, 05 Mar 2020 22:05:21 -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=N0CTq/Culte14X3U8GmOBFBSLa9yTrjsCnmpVNzjvcwEjXf8aUGPqJ9XaCnYyIqLHw m6PNhnZYp3FUGdJxd1zi7A38HaH3n83wuqGxLAdt61wRq52KQxf3bIODpkM+1d1Wgz5C MeQehKpw+vYKr/DWHDCK0jPrZvDynwsZwk/amxJV/C5kQ6yZdTqXhReFaGAfZGPU+Toh +OTF6pc0g7Y6fGcFQT26Z03Nvo6Lkp45JVddfwKB4sIoc8YhW2CheLoLA8XO8HdqMGWj jMdAzc3TXQgfVDuV4i4bCSRIY25PAHOriKbOMlEtdd+DsAYZbcnrv1HHcYkfDJzROx1l eWSw== X-Gm-Message-State: ANhLgQ0Z5/7UHjbuaLGu1lKpxqgifX1/RYtkMibQT+eNTAOlh6yX/HHd 4g8Lv+VQ7ZmuMMrCi+a/BNH6GfNobDztLIGKYGB88voVDiCNQ32NEyxuErJ0+ehnmpj8mSuhJLq eLQ5xA6HpMr84M0nLkhM= X-Received: by 2002:ac8:4408:: with SMTP id j8mr1575306qtn.3.1583474721268; 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 spamscore=0 adultscore=0 bulkscore=0 phishscore=0 mlxlogscore=999 impostorscore=0 priorityscore=1501 clxscore=1015 suspectscore=1 lowpriorityscore=0 malwarescore=0 mlxscore=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-dev] [PATCH] event/dsw: avoid reusing previously recorded events X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 > >