public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Pete Zaitcev <zaitcev@redhat.com>
Subject: Re: s390(64) per_cpu in modules (ipv6)
Date: Sun, 17 Oct 2004 12:51:09 +1000	[thread overview]
Message-ID: <1097981469.29286.14.camel@localhost.localdomain> (raw)
In-Reply-To: <OFC25D1557.60BFB654-ON42256F2E.00327ABF-42256F2E.0032D239@de.ibm.com>

On Fri, 2004-10-15 at 19:15, Martin Schwidefsky wrote:
> 
> 
> Rusty Russell <rusty@rustcorp.com.au> wrote on 15/10/2004 03:41:40 AM:

> > The worse problem is that a (static) per-cpu var declared *inside* a
> > function gets renamed by gcc; IIRC some generic code used to do this.
> 
> __thread in the kernel would be a real innovation, but I fear it isn't easy.
> The problem with the per_cpu__x variables in modules is solved for s390x
> by the way.

Sure, but it doesn't solve this case, AFAICT:

void func(void)
{
	static DEFINE_PER_CPU(x, int);

	__get_per_cpu(x)++;
}

The compiler will create a variable called "per_cpu__x.0" and your asm
reference to "per_cpu__x" will cause a link failure, no?  Obviously, you
would have noticed this, so I'm wondering what I'm missing.

I hit this in mm/page-writeback.c:balance_dirty_pages_ratelimited().

Confused,
Rusty.
-- 
Anyone who quotes me in their signature is an idiot -- Rusty Russell


       reply	other threads:[~2004-10-17  2:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OFC25D1557.60BFB654-ON42256F2E.00327ABF-42256F2E.0032D239@de.ibm.com>
2004-10-17  2:51 ` Rusty Russell [this message]
2004-06-30 13:04 s390(64) per_cpu in modules (ipv6) Martin Schwidefsky
2004-06-30 16:07 ` Roland Dreier
2004-06-30 20:55 ` Pete Zaitcev
2004-07-01 13:05   ` Arnd Bergmann
  -- strict thread matches above, loose matches on Subject: below --
2004-06-30  6:35 Pete Zaitcev
2004-06-30  6:45 ` William Lee Irwin III
2004-06-30  6:46 ` Roland Dreier
2004-10-15  1:41 ` Rusty Russell

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=1097981469.29286.14.camel@localhost.localdomain \
    --to=rusty@rustcorp.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=zaitcev@redhat.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