Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1012684pxb; Sun, 12 Sep 2021 05:26:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSX/+Sl2pNXlzXkIGYaaL6jqdnCQBJxKXMKdon3yLlxyJD1fcjoAkte46sg6WrTJWZy9JP X-Received: by 2002:a17:906:9801:: with SMTP id lm1mr7200819ejb.432.1631449565660; Sun, 12 Sep 2021 05:26:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631449565; cv=none; d=google.com; s=arc-20160816; b=b0RLrkXX1IeyqP1mpx3oOYIOiaM34IlMFQcje+6oxvjdxprXoww9iIPBPUH70EtVb8 vllG8JuHwF7DQmVm6SPFiYGHEpB0pIdCRNq/096FLZBRj6BcJNPqaXuLh315q5XBlODE Dy9Cnq320bSYvQg6epavVzwu+hiagkjXC/129HmP9FTtBiV+va+R13xUs3WyvG7PnLuN 79x4pqU6Ea0l9W5U/A0Rwx2+z9zO0u5WrA2VHbe3tzqVtuArEvQx6KJnnYvLG8Voaoeg ZuNGaxCeWpDQ4Y+uNYZWJrGTatw2gXpLz511WgUShHb/2AMsAUveYvxX/G/S13FYCYAK 3HWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=kSMQ7FcWTca/lDUFvTPr19EeuC6JIanruPuX/Ww0Ws0=; b=KbZ/FWgLJEVtaAy/dMI+9fkYjtczUvdw+gnFZMvc5xqjsNcINKZf/H07sHVdYUUEec oosHDC/7lfuxVH9QNt77FW0SLzGgLy/23Ugo8SyVR9zv6UUpReGVXKHm53hbi6LMPthr Ex4i8pYeGUdK1tynSBq3d8Dq+QS9rQDorIYkCy6E6LbB1oY7a/9ywiqvp8dZ6i5JNxg8 9BVvE2paM3TVUEfrC4ayq05AmlbzQOLSrhc1J+b21a9DdhmtaEft56sG69q0vVewzwJD B5wiQRfdQKWv3MweVt/9tFTRx5ZOUkfFP1BCrDV+rz206w4mJ52BrWsaBw1RxKn4HT+X 8+wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZQx5vk06; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y6si4490870edm.581.2021.09.12.05.25.41; Sun, 12 Sep 2021 05:26:05 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZQx5vk06; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235184AbhILMZh (ORCPT + 99 others); Sun, 12 Sep 2021 08:25:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:52011 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235183AbhILMZg (ORCPT ); Sun, 12 Sep 2021 08:25:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631449461; 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; bh=kSMQ7FcWTca/lDUFvTPr19EeuC6JIanruPuX/Ww0Ws0=; b=ZQx5vk064dHTomaSA5GaeqHKtceRyyeW9DFFPJnJpEBRnH0vR3fv3LvTp3lbP6zFvpydMc PujfuE6j5GovsDzXsO3QWe1VH33V274Cw+wS+CqHpZ9v+a1jVhzgKV1xdj4g36cNp3MUSP e28F7D5C/5IiMasWv6IfOD8d3Uwj27I= 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-22-dO_fRsVFP2avHZvo_C71Uw-1; Sun, 12 Sep 2021 08:24:18 -0400 X-MC-Unique: dO_fRsVFP2avHZvo_C71Uw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 783C3801B3D; Sun, 12 Sep 2021 12:24:17 +0000 (UTC) Received: from asgard.redhat.com (unknown [10.36.110.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 086EB5C23A; Sun, 12 Sep 2021 12:24:14 +0000 (UTC) Date: Sun, 12 Sep 2021 14:24:11 +0200 From: Eugene Syromiatnikov To: Jens Axboe , Pavel Begunkov Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org, "Dmitry V. Levin" , linux-api@vger.kernel.org Subject: [PATCH] io-wq: expose IO_WQ_ACCT_* enumeration items to UAPI Message-ID: <20210912122411.GA27679@asgard.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These are used to index aargument of IORING_REGISTER_IOWQ_MAX_WORKERS io_uring_register command, so they are to be exposed in UAPI. Signed-off-by: Eugene Syromiatnikov --- fs/io-wq.c | 7 +------ include/uapi/linux/io_uring.h | 8 ++++++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/fs/io-wq.c b/fs/io-wq.c index 6c55362..5e7cd7c 100644 --- a/fs/io-wq.c +++ b/fs/io-wq.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "io-wq.h" @@ -77,12 +78,6 @@ struct io_wqe_acct { unsigned long flags; }; -enum { - IO_WQ_ACCT_BOUND, - IO_WQ_ACCT_UNBOUND, - IO_WQ_ACCT_NR, -}; - /* * Per-node worker thread pool */ diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h index 59ef351..d67a3cc 100644 --- a/include/uapi/linux/io_uring.h +++ b/include/uapi/linux/io_uring.h @@ -324,6 +324,14 @@ enum { IORING_REGISTER_LAST }; +/* io-wq worker limit categories */ +enum { + IO_WQ_ACCT_BOUND, + IO_WQ_ACCT_UNBOUND, + + IO_WQ_ACCT_NR /* Non-UAPI */ +}; + /* deprecated, see struct io_uring_rsrc_update */ struct io_uring_files_update { __u32 offset; -- 2.1.4