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 A52F4A0588 for ; Tue, 14 Apr 2020 15:33:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 68B9F1C297; Tue, 14 Apr 2020 15:33:19 +0200 (CEST) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by dpdk.org (Postfix) with ESMTP id 687C11C119; Tue, 14 Apr 2020 15:33:16 +0200 (CEST) Received: by mail-io1-f65.google.com with SMTP id f3so13237104ioj.1; Tue, 14 Apr 2020 06:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=m/NwnPipfOS0MJEwC0wvHOqr/uOjaRa+ulnEBtnQ6Ew=; b=L7bEJ3i858q+y9hfkl3TvDw0bfKMBs+CNSSsIFa8CMDNx1dgdpswaRz2Ya+2QwR3I6 BJMka/WgF62CzUH9k1+5HR94FBGZV7Rw4GyqTNPkO7HC9jOELIp+QbD4bUv6bGW9Es/T 0hoS5ZjRj+Rx0lcdaiY/yZK8rrV1quA/Z7C6UVyhZl3oPEtXWWGH5AlenCqy4bEBmeIT ykY9NBvNLmw9WJVlYtHV5FnACEt+hg3Dpu2NU9hUkGj28e8esN1o5AiGvMMc6sB8mDZp /IQvpbmvY8iUnEca6u6DYJUBNdPYFo2Q2bIz+C84u7/2ik+HHFiGMAjfPz5bGla9R1EV jDIA== 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:content-transfer-encoding; bh=m/NwnPipfOS0MJEwC0wvHOqr/uOjaRa+ulnEBtnQ6Ew=; b=allHYji3TYNlyZzSESxE4gpo7uVjs0gUaNK9RrSAhVQdxk2u3wNVJaZ+8NCqzhiRr5 LTTEEkUgtZrzrjAHSgdGFvWOZRaihZEynE4A7dm/mLwsJ/IsCKluTbQp68qQMlFoMar3 tld7RcSox8TeubPj5iy6KxKY1JO642x78ntg7G/k1klAfX/mRCiVJ0KnHWsyA4H/uvUn QZ96l2YGMJNdIwX4ONkwkEmkOZfRvX4qDURp0PuFrmMxmxiGfUZTnzCalLS3OcuTunba QqW/pJGYDx/tiDBrAutSK76ZC+qns2z/hM+oSYhXJDWqiAm2wGs9fKEa1ucgZWZ6hvSc AeZQ== X-Gm-Message-State: AGi0Puav/0XwX6C9P9CKp93xPOMS1sXF9iBcHYihtkgrz8q1eSzPWVIB octZRB7GmHM1NzQZ+tmbpjFfqY8rVBUQB9dkyw4= X-Google-Smtp-Source: APiQypL3327jq9OqEWWXkS6lQD7D2i/1s5e6mVTUhvp6JeeoE+/Dn76gnfh4anLPqdS6bgx/m21ANv0d2R9CooYvMis= X-Received: by 2002:a5e:8815:: with SMTP id l21mr844535ioj.59.1586871195665; Tue, 14 Apr 2020 06:33:15 -0700 (PDT) MIME-Version: 1.0 References: <20200305104651.25456-1-mattias.ronnblom@ericsson.com> In-Reply-To: From: Jerin Jacob Date: Tue, 14 Apr 2020 19:02:59 +0530 Message-ID: To: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= Cc: Venky Venkatesh , Jerin Jacob , dpdk-dev , dpdk stable Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-stable] [dpdk-dev] [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" On Tue, Apr 14, 2020 at 6:41 PM Mattias R=C3=B6nnblom wrote: > > On 2020-04-14 14:45, Jerin Jacob wrote: > > On Sat, Apr 4, 2020 at 6:05 PM Jerin Jacob wrot= e: > >> On Fri, Mar 6, 2020 at 11:35 AM Venky Venkatesh > >> wrote: > >>> Hi Mattias, > >>> Have a question on this fix. I understand you wanting a certain numbe= r 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 t= he > >>> complexity of the policy you can get delayed longer. It might still b= e > >>> 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 loa= d 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 t= here > >>> 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. > >> Hi Venky and Mattias, > >> > >> Is this patch to good to merge? > > Please mark the patch as "Not applicable" if the patch is not required. > > > > This patch should be merged. Thanks. Sure. I will wait for couple of days on any comments on this patch. If none, I will merge this. > > > >>> 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 thi= s > >>>> 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_e= vent.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 *ds= w, > >>>> 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 consideri= ng > >>>> -- > >>>> 2.17.1 > >>>> > >>>> >