Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Jan 2020 01:16:23 +0300
From:      Dmitry Chagin <dchagin@freebsd.org>
To:        Edward Tomasz Napierala <trasz@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r356241 - in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux
Message-ID:  <CAC0jpUAbGw%2BZ0mC187jkHDCVudAvVngJ3FZD7=krO5BL6=S7_w@mail.gmail.com>
In-Reply-To: <201912312201.xBVM1889057554@repo.freebsd.org>
References:  <201912312201.xBVM1889057554@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi, HNY! What about vdso?

=D1=81=D1=80, 1 =D1=8F=D0=BD=D0=B2. 2020 =D0=B3. =D0=B2 01:01, Edward Tomas=
z Napierala <trasz@freebsd.org>:

> Author: trasz
> Date: Tue Dec 31 22:01:08 2019
> New Revision: 356241
> URL: https://svnweb.freebsd.org/changeset/base/356241
>
> Log:
>   Add basic getcpu(2) support to linuxulator.  The purpose of this
>   syscall is to query the CPU number and the NUMA domain the calling
>   thread is currently running on.  The third argument is ignored.
>   It doesn't do anything regarding scheduling - it's literally
>   just a way to query the current state, without any guarantees
>   you won't get rescheduled an opcode later.
>
>   This unbreaks Java from CentOS 8
>   (java-11-openjdk-11.0.5.10-0.el8_0.x86_64).
>
>   Reviewed by:  kib
>   MFC after:    2 weeks
>   Sponsored by: The FreeBSD Foundation
>   Differential Revision:        https://reviews.freebsd.org/D22972
>
> Modified:
>   head/sys/amd64/linux/linux_dummy.c
>   head/sys/amd64/linux32/linux32_dummy.c
>   head/sys/arm64/linux/linux_dummy.c
>   head/sys/compat/linux/linux_misc.c
>   head/sys/i386/linux/linux_dummy.c
>
> Modified: head/sys/amd64/linux/linux_dummy.c
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sys/amd64/linux/linux_dummy.c  Tue Dec 31 18:58:29 2019
> (r356240)
> +++ head/sys/amd64/linux/linux_dummy.c  Tue Dec 31 22:01:08 2019
> (r356241)
> @@ -102,8 +102,6 @@ DUMMY(tee);
>  DUMMY(vmsplice);
>  /* Linux 2.6.18: */
>  DUMMY(move_pages);
> -/* Linux 2.6.19: */
> -DUMMY(getcpu);
>  /* Linux 2.6.22: */
>  DUMMY(signalfd);
>  /* Linux 2.6.27: */
>
> Modified: head/sys/amd64/linux32/linux32_dummy.c
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sys/amd64/linux32/linux32_dummy.c      Tue Dec 31 18:58:29 2019
>       (r356240)
> +++ head/sys/amd64/linux32/linux32_dummy.c      Tue Dec 31 22:01:08 2019
>       (r356241)
> @@ -108,8 +108,6 @@ DUMMY(tee);
>  DUMMY(vmsplice);
>  /* Linux 2.6.18: */
>  DUMMY(move_pages);
> -/* Linux 2.6.19: */
> -DUMMY(getcpu);
>  /* Linux 2.6.22: */
>  DUMMY(signalfd);
>  /* Linux 2.6.27: */
>
> Modified: head/sys/arm64/linux/linux_dummy.c
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sys/arm64/linux/linux_dummy.c  Tue Dec 31 18:58:29 2019
> (r356240)
> +++ head/sys/arm64/linux/linux_dummy.c  Tue Dec 31 22:01:08 2019
> (r356241)
> @@ -104,8 +104,6 @@ DUMMY(tee);
>  DUMMY(vmsplice);
>  /* Linux 2.6.18: */
>  DUMMY(move_pages);
> -/* Linux 2.6.19: */
> -DUMMY(getcpu);
>  /* Linux 2.6.27: */
>  DUMMY(signalfd4);
>  DUMMY(inotify_init1);
>
> Modified: head/sys/compat/linux/linux_misc.c
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sys/compat/linux/linux_misc.c  Tue Dec 31 18:58:29 2019
> (r356240)
> +++ head/sys/compat/linux/linux_misc.c  Tue Dec 31 22:01:08 2019
> (r356241)
> @@ -2353,3 +2353,19 @@ out:
>         td->td_retval[0] =3D dst - args->buf;
>         return (error);
>  }
> +
> +int
> +linux_getcpu(struct thread *td, struct linux_getcpu_args *args)
> +{
> +       int cpu, error, node;
> +
> +       cpu =3D td->td_oncpu; /* Make sure it doesn't change during
> copyout(9) */
> +       error =3D 0;
> +       node =3D 0; /* XXX: Fake NUMA node 0 for now */
> +
> +       if (args->cpu !=3D NULL)
> +               error =3D copyout(&cpu, args->cpu, sizeof(l_int));
> +       if (args->node !=3D NULL)
> +               error =3D copyout(&node, args->node, sizeof(l_int));
> +       return (error);
> +}
>
> Modified: head/sys/i386/linux/linux_dummy.c
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/sys/i386/linux/linux_dummy.c   Tue Dec 31 18:58:29 2019
> (r356240)
> +++ head/sys/i386/linux/linux_dummy.c   Tue Dec 31 22:01:08 2019
> (r356241)
> @@ -104,8 +104,6 @@ DUMMY(tee);
>  DUMMY(vmsplice);
>  /* Linux 2.6.18: */
>  DUMMY(move_pages);
> -/* Linux 2.6.19: */
> -DUMMY(getcpu);
>  /* Linux 2.6.22: */
>  DUMMY(signalfd);
>  /* Linux 2.6.27: */
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAC0jpUAbGw%2BZ0mC187jkHDCVudAvVngJ3FZD7=krO5BL6=S7_w>