Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp649791ybr; Fri, 22 May 2020 15:53:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeUVNSg+5qDvyjrZZ47Wkjp/WUq5Jz5YIGNwqQjhXFl9NVfP8/dpbQmKDz7dZmwelVmnz3 X-Received: by 2002:a50:baa3:: with SMTP id x32mr4741829ede.251.1590188038397; Fri, 22 May 2020 15:53:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590188038; cv=none; d=google.com; s=arc-20160816; b=szWJjAIW1dp51/PUX8jut+LBr5h/GiiorKkZ9u055HqAW3KaLorlSYE/gvqMkOMgpR 7+2UiK4gNy6o4vgXaKQwe4ZYhg8go9zbkDTjmhz0qwIdQ4zIIfSm3sb5hRrPpro/c/A/ CvpOEU0UBH9zDsDyDUsowNYm2OlQ2mmxZspI52Ji00YVOGeI71Xx0vCMFFtpnuTR/OML 682wPh9Z9jkx+GxDWzrpkvdTrHW4Jj00DzJjkfnvihOUOQDsEqp8JVEqQJISSq8AZuaM XzKlUMw9+Q0FQh0DKudHo+S1aIepT3zrq873kNR9bmK4WYsNVYYB+6DWsOX445HjGEJQ A+MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=uexahIfrZLo1jpnIRsbB+Nwjv1OAdXGD5qQT3+o+NlA=; b=U6/9sPRvIF0T+VOSxPgEI/xUF5Vt9WOm3TK4p6753V5xCScYdgq31Wxz9yAXtJ1owN BryOFdH5aOblX42Z3Ac6UKjYsP7d/hQgv1bbzKFCVwFyJ6Aeg+8EX03r9Gy45PGwO42E Niga9DCY+48KWY6YY61vvLZbmdpB1k44hZcBBZOoIA+OyjDqirLZMQWKXRM2GNisrX3q tAL2aGWUQCQjc/QOIchx7PS85yFZ/r8V5ccBnMycWPG9JvNz2YFOHjBjR7LxYCv6M0BS OreG+f5nIzIQDjUAvRfE2bfVYtkFLi7kL8DDLKBU77tSJseMHvDjfJqBB1VVNGa5QkUU IDYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz6si5888325ejb.327.2020.05.22.15.53.36; Fri, 22 May 2020 15:53:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731189AbgEVWwI (ORCPT + 99 others); Fri, 22 May 2020 18:52:08 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:36681 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731029AbgEVWwI (ORCPT ); Fri, 22 May 2020 18:52:08 -0400 Received: by mail-io1-f67.google.com with SMTP id c16so13209429iol.3 for ; Fri, 22 May 2020 15:52:07 -0700 (PDT) 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=uexahIfrZLo1jpnIRsbB+Nwjv1OAdXGD5qQT3+o+NlA=; b=JiZgeZnRXwnJKdphzmTGw3f2hbl70ilRh3mSMGtFItWtXewZc0KIJfenhAIHQ1tImo EDlmpKd0JOpC39ZA7Iq1q8c/KcmIJVSs/xlwH3nhVEe/wYTpfA5kdk6yKV1/BmBLOkm7 mzIH1jyg2P7iaKprvtubCybXFCPTt3fpkcMAwsw2R7qR9RnsudlvxpEBfwupHTEWSBl1 izyldGWo8MPmqFpgOoI4HINN4eZVGUTcNwfUkbzFSdOFqt3nfcg0ZBhsV1T8n2IIcn1d 6zh9D5yzhB2GrdCKyFYesi/L4CX0LuMZiIpLyNnImEb840lsPpET0QHrEb6psYrtObWy cBoA== X-Gm-Message-State: AOAM533PNlIKrBmjhef0JzDBvLLBI6qsGpu4fn5dw5D7efJwrIvAKEVM zIolKAo6csdYZl0SwTJf80OLRhvXZ30= X-Received: by 2002:a5e:8413:: with SMTP id h19mr5188110ioj.140.1590187927312; Fri, 22 May 2020 15:52:07 -0700 (PDT) Received: from mail-io1-f51.google.com (mail-io1-f51.google.com. [209.85.166.51]) by smtp.gmail.com with ESMTPSA id t189sm1064640iod.16.2020.05.22.15.52.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 22 May 2020 15:52:07 -0700 (PDT) Received: by mail-io1-f51.google.com with SMTP id f4so13147441iov.11 for ; Fri, 22 May 2020 15:52:07 -0700 (PDT) X-Received: by 2002:a05:6602:1616:: with SMTP id x22mr5149773iow.70.1590187926885; Fri, 22 May 2020 15:52:06 -0700 (PDT) MIME-Version: 1.0 References: <20200424115112.22437-1-ioana.ciornei@nxp.com> In-Reply-To: <20200424115112.22437-1-ioana.ciornei@nxp.com> From: Li Yang Date: Fri, 22 May 2020 17:51:43 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] soc: fsl: dpio: Prefer the CPU affine DPIO To: Ioana Ciornei Cc: lkml , Roy Pledge Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 24, 2020 at 6:52 AM Ioana Ciornei wrote: > > From: Roy Pledge > > Use the cpu affine DPIO unless there isn't one which can happen > if less DPIOs than cores are assign to the kernel. > > Signed-off-by: Roy Pledge > Signed-off-by: Ioana Ciornei Applied for next. Thanks. Regards, Leo > --- > drivers/soc/fsl/dpio/dpio-service.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/soc/fsl/dpio/dpio-service.c b/drivers/soc/fsl/dpio/dpio-service.c > index cd4f6410e8c2..f1080c7a3fe1 100644 > --- a/drivers/soc/fsl/dpio/dpio-service.c > +++ b/drivers/soc/fsl/dpio/dpio-service.c > @@ -58,7 +58,7 @@ static inline struct dpaa2_io *service_select_by_cpu(struct dpaa2_io *d, > * If cpu == -1, choose the current cpu, with no guarantees about > * potentially being migrated away. > */ > - if (unlikely(cpu < 0)) > + if (cpu < 0) > cpu = smp_processor_id(); > > /* If a specific cpu was requested, pick it up immediately */ > @@ -70,6 +70,10 @@ static inline struct dpaa2_io *service_select(struct dpaa2_io *d) > if (d) > return d; > > + d = service_select_by_cpu(d, -1); > + if (d) > + return d; > + > spin_lock(&dpio_list_lock); > d = list_entry(dpio_list.next, struct dpaa2_io, node); > list_del(&d->node); > -- > 2.17.1 >