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=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 1FC7EC35DF5 for ; Tue, 25 Feb 2020 09:25:30 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D5B282176D for ; Tue, 25 Feb 2020 09:25:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="xSQI/AEC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D5B282176D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6110C6B0007; Tue, 25 Feb 2020 04:25:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5C08C6B0008; Tue, 25 Feb 2020 04:25:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4B0A16B000A; Tue, 25 Feb 2020 04:25:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 307B36B0007 for ; Tue, 25 Feb 2020 04:25:29 -0500 (EST) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id F33B8A755 for ; Tue, 25 Feb 2020 09:25:28 +0000 (UTC) X-FDA: 76528116336.10.ghost76_6a040d27cbb56 X-HE-Tag: ghost76_6a040d27cbb56 X-Filterd-Recvd-Size: 4395 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Tue, 25 Feb 2020 09:25:28 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id i10so662934wmd.1 for ; Tue, 25 Feb 2020 01:25:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xXjKrsLdZZ8wwVwaLKEsCAigMvn6xhJRvLjeY9bym8I=; b=xSQI/AECo2FF/n1rzar450UsJu6LS++K752YYamCvDgC3gmDDtm//+VyDKm1Kbo2U6 UGZi3S+eGAsV0JhiWc2Y+ce9bAn+BhCUIiuI6B59vwHIUTq6SUXNmlTzd15+Ahi5vRFG ukAPDmTylaGIN6SKk9F1PWSiE0RSVvcWjauHpIV3567yMuNz7dwqRHqE/6rGd5/HRMTP eH8jduDDQ5OHpK9lVCEJlTuHYN+7fQfK4nUzE+8LOZ/Mm/LwrJnTJ2SDMtvUVs3fepv6 tBSVxhhsDR+XbgoksqEMbEYIIMKi+cx4SZ96EM24GLhZV/KdTnpP6eY2JcEYDfuCgCzQ cgpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xXjKrsLdZZ8wwVwaLKEsCAigMvn6xhJRvLjeY9bym8I=; b=t6ZgwHzhpuuWRCvtoT6Tt/6iTZAQdR/DHEt2LRcEkFRJ+ioF8YfAWJhK74/KiPyRzj m0zlQXAEoi67Ow7P+CSXbn3VBprNpJiZlpxeaALUSvj/1a50ErOkRDIUli4P9+F0vRJM +sYNzeHo2T321iAXCnwyOvdSACAy38RERYFmGxf6WW4YLDgY0LAn71iSlKURrSoZsKL0 FD0344tKUz/TFNidAgWml9Q/pbSHInUmlkzWDm8Bftmv/IVVeriM5FkWIOIhL5QhuMpX 3QZnxX8AT7tud0tZuZTZBhAucuWr4I1fci6bx0F+voqm0CTCQShVNV/JGThuFyTWjsdt fAuw== X-Gm-Message-State: APjAAAUNaIifdzsxhia0NWlzHIXJ6coW6SBTktLUoKvMx7g4153KzKlO UpfAfAF8EqKjCWIGLoQbJFg+Tg== X-Google-Smtp-Source: APXvYqyRPbcxq+DpGxqy4QJ4Y+9sIc/9udtBlHtjdqBZpekzFx+Ms4VTHLdlkurRNx5P5V2Nn5l0Xg== X-Received: by 2002:a7b:c204:: with SMTP id x4mr4229923wmi.20.1582622727153; Tue, 25 Feb 2020 01:25:27 -0800 (PST) Received: from myrica ([2001:171b:c9a8:fbc0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id x21sm3115712wmi.30.2020.02.25.01.25.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 01:25:26 -0800 (PST) Date: Tue, 25 Feb 2020 10:25:19 +0100 From: Jean-Philippe Brucker To: Xu Zaibo Cc: iommu@lists.linux-foundation.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, mark.rutland@arm.com, kevin.tian@intel.com, Jean-Philippe Brucker , catalin.marinas@arm.com, robin.murphy@arm.com, robh+dt@kernel.org, zhangfei.gao@linaro.org, will@kernel.org, christian.koenig@amd.com Subject: Re: [PATCH v4 03/26] iommu: Add a page fault handler Message-ID: <20200225092519.GC375953@myrica> References: <20200224182401.353359-1-jean-philippe@linaro.org> <20200224182401.353359-4-jean-philippe@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Zaibo, On Tue, Feb 25, 2020 at 11:30:05AM +0800, Xu Zaibo wrote: > > +struct iopf_queue * > > +iopf_queue_alloc(const char *name, iopf_queue_flush_t flush, void *cookie) > > +{ > > + struct iopf_queue *queue; > > + > > + queue = kzalloc(sizeof(*queue), GFP_KERNEL); > > + if (!queue) > > + return NULL; > > + > > + /* > > + * The WQ is unordered because the low-level handler enqueues faults by > > + * group. PRI requests within a group have to be ordered, but once > > + * that's dealt with, the high-level function can handle groups out of > > + * order. > > + */ > > + queue->wq = alloc_workqueue("iopf_queue/%s", WQ_UNBOUND, 0, name); > Should this workqueue use 'WQ_HIGHPRI | WQ_UNBOUND' or some flags like this > to decrease the unexpected > latency of I/O PageFault here? Or maybe, workqueue will show an uncontrolled > latency, even in a busy system. I'll investigate the effect of these flags. So far I've only run on completely idle systems but it would be interesting to add some workqueue-heavy load in my tests. Thanks, Jean