linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rik van Riel <riel@surriel.com>
To: kbuild test robot <lkp@intel.com>, Gargi Sharma <gs051095@gmail.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	julia.lawall@lip6.fr, akpm@linux-foundation.org,
	mingo@kernel.org, pasha.tatashin@oracle.com,
	ktkhai@virtuozzo.com, oleg@redhat.com, ebiederm@xmission.com,
	hch@infradead.org, Tony Luck <tony.luck@intel.com>,
	linux-ia64 <linux-ia64@vger.kernel.org>
Subject: Re: [PATCH v4 2/2] pid: Remove pidhash
Date: Wed, 11 Oct 2017 10:15:04 -0400	[thread overview]
Message-ID: <1507731304.21121.185.camel@surriel.com> (raw)
In-Reply-To: <201710111737.ZHqmaPa5%fengguang.wu@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2750 bytes --]

On Wed, 2017-10-11 at 17:47 +0800, kbuild test robot wrote:

> > > '__compiletime_assert_33' declared with attribute error:
> > > BUILD_BUG_ON failed: sizeof(struct upid) != 32
> 
>      _compiletime_assert(condition, msg, __compiletime_assert_,
> __LINE__)
>                                          ^
>    include/linux/compiler.h:556:4: note: in definition of macro
> '__compiletime_assert'
>        prefix ## suffix();    \
>        ^~~~~~
>    include/linux/compiler.h:576:2: note: in expansion of macro
> '_compiletime_assert'
>      _compiletime_assert(condition, msg, __compiletime_assert_,
> __LINE__)
>      ^~~~~~~~~~~~~~~~~~~
>    include/linux/build_bug.h:46:37: note: in expansion of macro
> 'compiletime_assert'
>     #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond),
> msg)
>                                         ^~~~~~~~~~~~~~~~~~
>    include/linux/build_bug.h:70:2: note: in expansion of macro
> 'BUILD_BUG_ON_MSG'
>      BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
>      ^~~~~~~~~~~~~~~~
> > > arch/ia64/kernel/asm-offsets.c:33:2: note: in expansion of macro
> > > 'BUILD_BUG_ON'
> 
>      BUILD_BUG_ON(sizeof(struct upid) != 32);
>      ^~~~~~~~~~~~
> 
Looks like arch/ia64/kernel/asm-offsets.c throws a BUILD_BUG
if sizeof(struct upid) != 32.

Your patch reduced the size of struct upid, which is a nice
thing, but now IA64 no longer builds.

Lets see what IA64 was doing with the size of struct upid
in the first place:

in arch/ia64/kernel/asm-offsets.c:

        BUILD_BUG_ON(sizeof(struct upid) != 32);
        DEFINE(IA64_UPID_SHIFT, 5);

Grepping for IA64_UPID_SHIFT leads us to some assembly
code implementing fsys_getpid (why is that in assembly?!):

        add r8=IA64_PID_LEVEL_OFFSET,r17
        ;;
        ld4 r8=[r8]                             // r8 = pid->level
        add r17=IA64_PID_UPID_OFFSET,r17        // r17 = &pid->numbers[0]
        ;;
        shl r8=r8,IA64_UPID_SHIFT
        ;;
        add r17=r17,r8                          // r17 = &pid->numbers[pid->level]
        ;;
        ld4 r8=[r17]                            // r8 = pid->numbers[pid->level].nr
        ;;
        mov r17=0

Luckily it looks like this is only referencing the first members of struct upid,
and you are removing the last member, so I suspect you will be fine changing the IA64
to this:

        BUILD_BUG_ON(sizeof(struct upid) != 16);
        DEFINE(IA64_UPID_SHIFT, 4);

Tony, does that look ok to you?

-- 
All Rights Reversed.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2017-10-11 14:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-09 21:13 [PATCH v4 0/2] Replacing PID bitmap implementation with IDR API Gargi Sharma
2017-10-09 21:13 ` [PATCH v4 1/2] pid: Replace pid " Gargi Sharma
2017-10-09 23:17   ` Andrew Morton
2017-10-10 11:50     ` Oleg Nesterov
2017-10-10 12:35       ` Gargi Sharma
2017-10-10 14:15         ` Oleg Nesterov
2017-10-10 15:46         ` Rik van Riel
2017-10-10 16:11           ` Gargi Sharma
2017-10-10 17:51             ` Rik van Riel
2017-10-10 13:44       ` Rik van Riel
2017-10-09 21:13 ` [PATCH v4 2/2] pid: Remove pidhash Gargi Sharma
2017-10-11  9:47   ` kbuild test robot
2017-10-11 14:15     ` Rik van Riel [this message]
2017-10-11 21:22       ` Luck, Tony

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=1507731304.21121.185.camel@surriel.com \
    --to=riel@surriel.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=gs051095@gmail.com \
    --cc=hch@infradead.org \
    --cc=julia.lawall@lip6.fr \
    --cc=kbuild-all@01.org \
    --cc=ktkhai@virtuozzo.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=pasha.tatashin@oracle.com \
    --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).