From: Shuah Khan <skhan@linuxfoundation.org>
To: corbet@lwn.net, gregkh@linuxfoundation.org, peterz@infradead.org,
keescook@chromium.org, rafael@kernel.org, lenb@kernel.org,
james.morse@arm.com, tony.luck@intel.com, bp@alien8.de
Cc: Shuah Khan <skhan@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-acpi@vger.kernel.org, linux-kselftest@vger.kernel.org,
devel@driverdev.osuosl.org
Subject: [PATCH v3 0/7] Introduce Sequence Number Ops
Date: Wed, 3 Feb 2021 11:11:56 -0700 [thread overview]
Message-ID: <cover.1612314468.git.skhan@linuxfoundation.org> (raw)
Sequence Number api provides interfaces for unsigned atomic up counters.
There are a number of atomic_t usages in the kernel where atomic_t api
is used for counting sequence numbers and other statistical counters.
Several of these usages, convert atomic_read() and atomic_inc_return()
return values to unsigned. Introducing sequence number ops supports
these use-cases with a standard core-api.
Sequence Number ops provide interfaces to initialize, increment and get
the sequence number. These ops also check for overflow and log message to
indicate when overflow occurs. This check is intended to help catch cases
where overflow could lead to problems.
Since v2:
- Uses atomic_inc_return() for incrementing the sequence number.
- No longer uses atomic_read()
Shuah Khan (7):
seqnum_ops: Introduce Sequence Number Ops
selftests: lib:test_seqnum_ops: add new test for seqnum_ops
drivers/acpi: convert seqno to use seqnum_ops
drivers/acpi/apei: convert seqno to seqnum_ops
drivers/staging/rtl8723bs: convert event_seq to use seqnum_ops
drivers/staging/rtl8188eu: convert event_seq to use seqnum_ops
kobject: convert uevent_seqnum to seqnum_ops
Documentation/core-api/index.rst | 1 +
Documentation/core-api/seqnum_ops.rst | 62 ++++++++
MAINTAINERS | 8 ++
drivers/acpi/acpi_extlog.c | 8 +-
drivers/acpi/apei/ghes.c | 8 +-
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 23 ++-
.../staging/rtl8188eu/include/rtw_mlme_ext.h | 3 +-
drivers/staging/rtl8723bs/core/rtw_cmd.c | 3 +-
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 33 +++--
drivers/staging/rtl8723bs/include/rtw_cmd.h | 3 +-
.../staging/rtl8723bs/include/rtw_mlme_ext.h | 3 +-
include/linux/kobject.h | 3 +-
include/linux/seqnum_ops.h | 131 +++++++++++++++++
kernel/ksysfs.c | 3 +-
lib/Kconfig | 9 ++
lib/Makefile | 1 +
lib/kobject_uevent.c | 9 +-
lib/test_seqnum_ops.c | 133 ++++++++++++++++++
tools/testing/selftests/lib/Makefile | 1 +
tools/testing/selftests/lib/config | 1 +
.../testing/selftests/lib/test_seqnum_ops.sh | 10 ++
21 files changed, 423 insertions(+), 33 deletions(-)
create mode 100644 Documentation/core-api/seqnum_ops.rst
create mode 100644 include/linux/seqnum_ops.h
create mode 100644 lib/test_seqnum_ops.c
create mode 100755 tools/testing/selftests/lib/test_seqnum_ops.sh
--
2.27.0
next reply other threads:[~2021-02-03 18:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 18:11 Shuah Khan [this message]
2021-02-03 18:11 ` [PATCH v3 1/7] seqnum_ops: Introduce Sequence Number Ops Shuah Khan
2021-02-04 9:20 ` Peter Zijlstra
2021-02-05 9:58 ` Greg KH
2021-02-05 20:03 ` Shuah Khan
2021-02-05 22:16 ` Luck, Tony
2021-02-08 3:55 ` Randy Dunlap
2021-02-03 18:11 ` [PATCH v3 2/7] selftests: lib:test_seqnum_ops: add new test for seqnum_ops Shuah Khan
2021-02-03 18:11 ` [PATCH v3 3/7] drivers/acpi: convert seqno to use seqnum_ops Shuah Khan
2021-02-04 14:01 ` Rafael J. Wysocki
2021-02-03 18:12 ` [PATCH v3 4/7] drivers/acpi/apei: convert seqno to seqnum_ops Shuah Khan
2021-02-03 18:12 ` [PATCH v3 5/7] drivers/staging/rtl8723bs: convert event_seq to use seqnum_ops Shuah Khan
2021-02-03 18:12 ` [PATCH v3 6/7] drivers/staging/rtl8188eu: " Shuah Khan
2021-02-03 18:12 ` [PATCH v3 7/7] kobject: convert uevent_seqnum to seqnum_ops Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1612314468.git.skhan@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=james.morse@arm.com \
--cc=keescook@chromium.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).