linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] s390 updates for 5.15-rc6
@ 2021-10-16  9:26 Vasily Gorbik
  2021-10-16 16:22 ` Linus Torvalds
  2021-10-16 16:23 ` pr-tracker-bot
  0 siblings, 2 replies; 4+ messages in thread
From: Vasily Gorbik @ 2021-10-16  9:26 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Heiko Carstens, Christian Borntraeger, linux-kernel, linux-s390

Hello Linus,

please pull s390 changes for 5.15-rc6.

Thank you,
Vasily

The following changes since commit a46044a92add6a400f4dada7b943b30221f7cc80:

  s390/pci: fix zpci_zdev_put() on reserve (2021-10-04 09:49:10 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git tags/s390-5.15-6

for you to fetch changes up to 8b7216439e2e2128f6f1a19ad4b6be94d8b0e23d:

  s390: add Alexander Gordeev as reviewer (2021-10-13 14:37:44 +0200)

----------------------------------------------------------------
s390 update for v5.15-rc6

- Maintainers and reviewers changes:
  - Cornelia decided to free up her time and step down from vfio-ccw
    maintainer and s390 kvm reviewer duties.
  - Add Alexander Gordeev as s390 arch code reviewer.

- Fix broken strrchr implementation.

----------------------------------------------------------------
Cornelia Huck (2):
      KVM: s390: remove myself as reviewer
      vfio-ccw: step down as maintainer

Heiko Carstens (1):
      s390: add Alexander Gordeev as reviewer

Roberto Sassu (1):
      s390: fix strrchr() implementation

 MAINTAINERS            |  3 +--
 arch/s390/lib/string.c | 15 +++++++--------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index abdcbcfef73d..888b329413d3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10275,7 +10275,6 @@ KERNEL VIRTUAL MACHINE for s390 (KVM/s390)
 M:	Christian Borntraeger <borntraeger@de.ibm.com>
 M:	Janosch Frank <frankja@linux.ibm.com>
 R:	David Hildenbrand <david@redhat.com>
-R:	Cornelia Huck <cohuck@redhat.com>
 R:	Claudio Imbrenda <imbrenda@linux.ibm.com>
 L:	kvm@vger.kernel.org
 S:	Supported
@@ -16297,6 +16296,7 @@ S390
 M:	Heiko Carstens <hca@linux.ibm.com>
 M:	Vasily Gorbik <gor@linux.ibm.com>
 M:	Christian Borntraeger <borntraeger@de.ibm.com>
+R:	Alexander Gordeev <agordeev@linux.ibm.com>
 L:	linux-s390@vger.kernel.org
 S:	Supported
 W:	http://www.ibm.com/developerworks/linux/linux390/
@@ -16375,7 +16375,6 @@ F:	drivers/s390/crypto/vfio_ap_ops.c
 F:	drivers/s390/crypto/vfio_ap_private.h
 
 S390 VFIO-CCW DRIVER
-M:	Cornelia Huck <cohuck@redhat.com>
 M:	Eric Farman <farman@linux.ibm.com>
 M:	Matthew Rosato <mjrosato@linux.ibm.com>
 R:	Halil Pasic <pasic@linux.ibm.com>
diff --git a/arch/s390/lib/string.c b/arch/s390/lib/string.c
index cfcdf76d6a95..a95ca6df4e5e 100644
--- a/arch/s390/lib/string.c
+++ b/arch/s390/lib/string.c
@@ -259,14 +259,13 @@ EXPORT_SYMBOL(strcmp);
 #ifdef __HAVE_ARCH_STRRCHR
 char *strrchr(const char *s, int c)
 {
-       size_t len = __strend(s) - s;
-
-       if (len)
-	       do {
-		       if (s[len] == (char) c)
-			       return (char *) s + len;
-	       } while (--len > 0);
-       return NULL;
+	ssize_t len = __strend(s) - s;
+
+	do {
+		if (s[len] == (char)c)
+			return (char *)s + len;
+	} while (--len >= 0);
+	return NULL;
 }
 EXPORT_SYMBOL(strrchr);
 #endif

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] s390 updates for 5.15-rc6
  2021-10-16  9:26 [GIT PULL] s390 updates for 5.15-rc6 Vasily Gorbik
@ 2021-10-16 16:22 ` Linus Torvalds
  2021-10-17  8:42   ` Heiko Carstens
  2021-10-16 16:23 ` pr-tracker-bot
  1 sibling, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2021-10-16 16:22 UTC (permalink / raw)
  To: Vasily Gorbik
  Cc: Heiko Carstens, Christian Borntraeger, Linux Kernel Mailing List,
	linux-s390

On Sat, Oct 16, 2021 at 2:26 AM Vasily Gorbik <gor@linux.ibm.com> wrote:
>
> - Fix broken strrchr implementation.

I pulled this, but had to look at this commit just because it struck me as odd.

Is the generic strrchr() implementation so bad for s390 that it shows
up? It looks like the s390 implementation wants to avoid checking
separately against the final NUL character and basically uses the
optimized strlen function to do so, but when strrchr has to walk the
string _anyway_ this all looks a bit odd.

Not a big deal. I just get the feeling that s390 (and probably other
architectures) might be a bit too eager to make their own helper
string functions for reasons that may be historical ("we didn't have
generic string functions at all long ago") or misguided ("we'll do an
architecture-optimized version even for things that don't matter").

          Linus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] s390 updates for 5.15-rc6
  2021-10-16  9:26 [GIT PULL] s390 updates for 5.15-rc6 Vasily Gorbik
  2021-10-16 16:22 ` Linus Torvalds
@ 2021-10-16 16:23 ` pr-tracker-bot
  1 sibling, 0 replies; 4+ messages in thread
From: pr-tracker-bot @ 2021-10-16 16:23 UTC (permalink / raw)
  To: Vasily Gorbik
  Cc: Linus Torvalds, Heiko Carstens, Christian Borntraeger,
	linux-kernel, linux-s390

The pull request you sent on Sat, 16 Oct 2021 11:26:08 +0200:

> git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git tags/s390-5.15-6

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/304040fb4909f7771caf6f8e8c61dbe51c93505a

Thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] s390 updates for 5.15-rc6
  2021-10-16 16:22 ` Linus Torvalds
@ 2021-10-17  8:42   ` Heiko Carstens
  0 siblings, 0 replies; 4+ messages in thread
From: Heiko Carstens @ 2021-10-17  8:42 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Vasily Gorbik, Christian Borntraeger, Linux Kernel Mailing List,
	linux-s390

On Sat, Oct 16, 2021 at 09:22:12AM -0700, Linus Torvalds wrote:
> On Sat, Oct 16, 2021 at 2:26 AM Vasily Gorbik <gor@linux.ibm.com> wrote:
> >
> > - Fix broken strrchr implementation.
> 
> I pulled this, but had to look at this commit just because it struck me as odd.
> 
> Is the generic strrchr() implementation so bad for s390 that it shows
> up? It looks like the s390 implementation wants to avoid checking
> separately against the final NUL character and basically uses the
> optimized strlen function to do so, but when strrchr has to walk the
> string _anyway_ this all looks a bit odd.

The difference is that it walks the string from the end to the start,
taking into account that searching for the end of the string can be
considered fast.

> Not a big deal. I just get the feeling that s390 (and probably other
> architectures) might be a bit too eager to make their own helper
> string functions for reasons that may be historical ("we didn't have
> generic string functions at all long ago") or misguided ("we'll do an
> architecture-optimized version even for things that don't matter").

This function exists for historical reasons, and in this case it is
probably more the "optimized version for things that don't matter".

The only caller which sort of gets called more frequently seems to be
kbasename().

Some numbers, running 1.000.000 strrchr on an 80 byte string:

 s390  generic   search for
 57us     55us   first character in string
 15us     55us   last character in string
 44us     55us   character in middle of string

So yes, we could probably just drop our own implementation, given that
it hardly matters in real life.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-17  8:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-16  9:26 [GIT PULL] s390 updates for 5.15-rc6 Vasily Gorbik
2021-10-16 16:22 ` Linus Torvalds
2021-10-17  8:42   ` Heiko Carstens
2021-10-16 16:23 ` pr-tracker-bot

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).