netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: "Denis V. Lunev" <den@sw.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
	"Denis V. Lunev" <den@openvz.org>,
	davem@davemloft.net, containers@lists.osdl.org,
	netdev@vger.kernel.org, clg@fr.ibm.com, benjamin.thery@bull.net
Subject: Re: [PATCH 2/2] move unneeded data to initdata section
Date: Thu, 15 Nov 2007 20:34:35 +0100	[thread overview]
Message-ID: <20071115193435.GE23914@uranus.ravnborg.org> (raw)
In-Reply-To: <473C9B3A.4020401@sw.ru>

On Thu, Nov 15, 2007 at 10:17:14PM +0300, Denis V. Lunev wrote:
> 
> will you mind against this?

> diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
> index 5dd6d90..d136707 100644
> --- a/include/net/net_namespace.h
> +++ b/include/net/net_namespace.h
> @@ -119,10 +119,14 @@ static inline struct net *maybe_get_net(struct net *net)
>  #ifdef CONFIG_NET_NS
>  #define __net_init
>  #define __net_exit
> -#define __net_initdata
>  #else
>  #define __net_init	__init
>  #define __net_exit	__exit_refok
> +#endif
> +
> +#if defined(CONFIG_NET_NS) || defined(MODULE)
> +#define __net_initdata
> +#else
>  #define __net_initdata	__initdata
>  #endif
  
n principle I am against this approach.
__initdata is far too overloaded with different stuff.

A much more preferred approach should be to create new sections
named for example .init.data.net and .init.data.net.module

And then in include/asm-generic/vmlinux.lds.h decide the
location of these sections.

On top of this we would have to teach modpost about these new sections.
But the advantage of this approach is that the section mismatch
checks are *independent* of the module being a MODULE or build-in.
The check will still happen.

In this way we avoid the situation where a warning only pops up
in certain configurations.

To do so will obviously require a bit more linker script
consolidation but if you or some else could step in a do this
it would be great!

	Sam

      reply	other threads:[~2007-11-15 19:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-07 12:01 [PATCH 2/2] move unneeded data to initdata section Denis V. Lunev
2007-11-13 11:24 ` David Miller
2007-11-15 14:32 ` Eric W. Biederman
2007-11-15 14:42   ` Denis V. Lunev
2007-11-15 15:14     ` Sam Ravnborg
2007-11-15 18:19       ` Eric W. Biederman
2007-11-15 18:43         ` Sam Ravnborg
     [not found]           ` <20071115184334.GC23914-QabhHTsIXMSnlFQ6Q1D1Y0B+6BGkLq7r@public.gmane.org>
2007-11-15 19:17             ` Denis V. Lunev
2007-11-15 19:34               ` Sam Ravnborg [this message]

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=20071115193435.GE23914@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=benjamin.thery@bull.net \
    --cc=clg@fr.ibm.com \
    --cc=containers@lists.osdl.org \
    --cc=davem@davemloft.net \
    --cc=den@openvz.org \
    --cc=den@sw.ru \
    --cc=ebiederm@xmission.com \
    --cc=netdev@vger.kernel.org \
    /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).