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 01230A0562; Sat, 4 Apr 2020 14:35:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AEBAF1BE99; Sat, 4 Apr 2020 14:35:20 +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 055F3F12; Sat, 4 Apr 2020 14:35:18 +0200 (CEST) Received: by mail-io1-f65.google.com with SMTP id x9so10510306iom.10; Sat, 04 Apr 2020 05:35:18 -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=gDmZdyUAKOT6by7tmyKP+F1RJRq7CKtxboW88+fhNmU=; b=kcgItYL7TVuaBi/pwteY6hcRM81oUCgq1T3v+DLRI7PvtycVq39vuIf+URB6g6KDjI 1ybcISieB7hh7/PrcFNbBibP4wX0MVpiaAcRlKxqbMdFa8D+HhvxWe1ilXguTaN9bE7l jQnyAv8apw6vTRBARHHjy6lbjg1bEkKHMc0Xl1LfRO+lW5LY2aTWoE0APvcEibUeJSS3 0V/E5bmVB3mLd6LBr8fW8+JJKtos2DTlxJZs14cMNQohGKghnwJvemP36a+wRag8WIfN 3DTq48b/0LAGVz0bp4x/CbLLM9+NxAn0WURjatGrs5sYh1gUlcvg1/qseShw/c7XddvP MQjA== 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=gDmZdyUAKOT6by7tmyKP+F1RJRq7CKtxboW88+fhNmU=; b=fbSTz6cR3QHLImnSs3/LyWyfyr2WPm0wkTryb+MOVhcOnR04OIWSdaVVVLvMvfS3PO U+7jViRJniNP7dcwUyBBicHawHCTLDLSC3GhS8E/ZzcpTvyZNmBkxaqbpnhu/VlK2me6 PdEIC2T8tALntx7FTysipdsLN42byAFMtiqOZsRh3/keIQAxEd5b/NnxS9K28DcawrAI JpemuI+s/AC7FRrpDoc+pZ8D6sVDdRan84Ea/pdBcivOV6jewBVOqoTvAgTl/jjlQgtE +mQ3vHrgMdL84hucovKXb0ydJWEZCcYCaYCtoB/vpNFUINFIJY4QN6dSQImwXiUmLFwN cmmw== X-Gm-Message-State: AGi0PubtASFJ7KiMIc2CipZ6KlFDcwemtRoV0wWD+zNreKsXhkgGebY4 35anIaZbGRGP8E+JWL+Ye+/qeTjQ6ZZFM5U39Os= X-Google-Smtp-Source: APiQypIGAGkSUZUbg34mfrwvrHzUNrEOJnDT60bLJG0FU2T7YqJC4HHINzQuXjzbF3Hf+0Ri4Zn4hdxAvn/HzIbCxU4= X-Received: by 2002:a6b:580d:: with SMTP id m13mr11795951iob.59.1586003718229; Sat, 04 Apr 2020 05:35:18 -0700 (PDT) MIME-Version: 1.0 References: <20200305104651.25456-1-mattias.ronnblom@ericsson.com> In-Reply-To: From: Jerin Jacob Date: Sat, 4 Apr 2020 18:05:02 +0530 Message-ID: To: Venky Venkatesh Cc: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , Jerin Jacob , dpdk-dev , dpdk stable Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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" 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 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 man= y) > 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 thi= nk > 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. Hi Venky and Mattias, Is this patch to good to merge? > > 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_even= t.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 > > > >