From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6C8EC433E6 for ; Fri, 22 Jan 2021 16:16:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 848A422EBE for ; Fri, 22 Jan 2021 16:16:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 848A422EBE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Date:To:From: Subject:Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bfAaTrG+6ual9t2ICJ2lpwqI3uBA6VQ8L4YT7uyq4uc=; b=lPV+8fAqxmeRvf71RO6eYsbDf 5J2sF2L1M504A3iP9mBb7kS40HX/OkC5L6a8gTge4Him6dCSqPlJgUt+LLbMPgzRoXtU3jo8uo4gS OhuGUgmrHIOGjTATJjDDF6jbqZxprs2CQ/9UROUSVUCuXdCY8LkNo/HQbjB/Ls3KVaKtOQLJ+xMND L7WaNoeoYLn3/NKAO63F/cUwKfdfG5Bm2MFNYeujZSlmoRi10aAYi4jrNo15guQ3DvK27fXew6qNn uEMMLWh1ARWebNybv1kEJDzjbLB4J3Hg9irj4OPlAYGZAq2vZXauC0oUr379MwZiJoqS9ru4WpzNa eL0CUNfQg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2z6B-0003V0-8f; Fri, 22 Jan 2021 16:15:47 +0000 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2z68-0003UB-EB for linux-arm-kernel@lists.infradead.org; Fri, 22 Jan 2021 16:15:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611332143; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dTzvcxscKtq/tV27tCHh9sa+whh6ERFxBikE1EVctD4=; b=Xjv6jDa9umQMluPxzkPE3T1Y3Proyx08TMDd/UIc7eHgUmz3JtL6/H+EWIKGTwhu2Hj3fP QNCDXlTY99G/ZwQK1IHg9jDAFz8KuTk83YtJIv/HBtOLXSpFYsGoM+0kRhxxb+2d61/qSz t8WcGmJsUS1CUZcqwtSF78Y+2atbVvs= 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-329-psFA18dgOHywEF7_WcmkKg-1; Fri, 22 Jan 2021 11:13:52 -0500 X-MC-Unique: psFA18dgOHywEF7_WcmkKg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D6956190A7AD; Fri, 22 Jan 2021 16:13:49 +0000 (UTC) Received: from ovpn-113-245.ams2.redhat.com (ovpn-113-245.ams2.redhat.com [10.36.113.245]) by smtp.corp.redhat.com (Postfix) with ESMTP id EC47519813; Fri, 22 Jan 2021 16:13:45 +0000 (UTC) Message-ID: <4c9229e0e2d7ffabba1a8372d5335ddb28486b6e.camel@redhat.com> Subject: Re: [PATCH v4 11/13] task_isolation: net: don't flush backlog on CPUs running isolated tasks From: Paolo Abeni To: Marcelo Tosatti , Frederic Weisbecker Date: Fri, 22 Jan 2021 17:13:44 +0100 In-Reply-To: <20210122141320.GA66969@fuller.cnet> References: <04be044c1bcd76b7438b7563edc35383417f12c8.camel@marvell.com> <01470cf1f1a2e79e46a87bb5a8a4780a1c3cc740.camel@marvell.com> <20201001144731.GC6595@lothringen> <20210122141320.GA66969@fuller.cnet> User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210122_111544_642688_05D61E81 X-CRM114-Status: GOOD ( 19.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-arch@vger.kernel.org" , "catalin.marinas@arm.com" , "peterz@infradead.org" , "linux-api@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "rostedt@goodmis.org" , "mingo@kernel.org" , "netdev@vger.kernel.org" , Alex Belits , Prasun Kapoor , "tglx@linutronix.de" , "will@kernel.org" , "davem@davemloft.net" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 2021-01-22 at 11:13 -0300, Marcelo Tosatti wrote: > On Thu, Oct 01, 2020 at 04:47:31PM +0200, Frederic Weisbecker wrote: > > On Wed, Jul 22, 2020 at 02:58:24PM +0000, Alex Belits wrote: > > > From: Yuri Norov > > > > > > so we don't need to flush it. > > > > What guarantees that we have no backlog on it? > > From Paolo's work to use lockless reading of > per-CPU skb lists > > https://www.spinics.net/lists/netdev/msg682693.html > > It also exposed skb queue length to userspace > > https://www.spinics.net/lists/netdev/msg684939.html > > But if i remember correctly waiting for a RCU grace > period was also necessary to ensure no backlog !?! > > Paolo would you please remind us what was the sequence of steps? > (and then also, for the userspace isolation interface, where > the application informs the kernel that its entering isolated > mode, is just confirming the queues have zero length is > sufficient?). After commit 2de79ee27fdb52626ac4ac48ec6d8d52ba6f9047, for CONFIG_RPS enabled build, with no RFS in place to ensure backlog will be empty on CPU X, the user must: - configure the RPS map on each device before the device goes up to explicitly exclude CPU X. If CPU X is isolated after some network device already went up, to ensure that the backlog will be empty on CPU X the user must: - configure RPS on all the network device to exclude CPU X (as in the previous scenario) - wait a RCU grace period - wait untill the backlog len on CPU X reported by procfs is 0 Cheers, Paolo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel