linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislav Kinsbursky <skinsbursky@parallels.com>
To: Pavel Emelyanov <xemul@parallels.com>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"serge.hallyn@canonical.com" <serge.hallyn@canonical.com>,
	"criu@openvz.org" <criu@openvz.org>,
	"arnd@arndb.de" <arnd@arndb.de>,
	"lucas.demarchi@profusion.mobi" <lucas.demarchi@profusion.mobi>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dhowells@redhat.com" <dhowells@redhat.com>,
	"mtk.manpages@gmail.com" <mtk.manpages@gmail.com>
Subject: Re: [CRIU] [PATCH 2/4] ipc: move all checkpoint-restore code under appropriate define
Date: Tue, 10 Apr 2012 13:05:51 +0400	[thread overview]
Message-ID: <4F83F7EF.4030700@parallels.com> (raw)
In-Reply-To: <4F833CDF.4080300@parallels.com>

09.04.2012 23:47, Pavel Emelyanov пишет:
> On 04/09/2012 09:54 PM, Stanislav Kinsbursky wrote:
>> All new checkpoint/restore code parts are now covered with
>> CONFIG_CHECKPOINT_RESTORE marco. So it would be easy to remove them, in case
>> the whole project fails.
>>
>> ---
>>   ipc/compat.c |    9 ++++++---
>>   ipc/msg.c    |   15 ++++++++++++++-
>>   2 files changed, 20 insertions(+), 4 deletions(-)
>>
>> @@ -387,8 +388,10 @@ long compat_sys_msgrcv(int first, int second, int msgtyp, int third,
>>   		msgtyp = ipck.msgtyp;
>>   	}
>>   	return do_msgrcv(first, uptr, second, msgtyp, third,
>> -			 (third&  MSG_PEEK_ALL) ? compat_do_msg_peek_all
>> -						: compat_do_msg_fill);
>> +#ifdef CONFIG_CHECKPOINT_RESTORE
>> +			 (third&  MSG_PEEK_ALL) ? compat_do_msg_peek_all :
>> +#endif
>> +						compat_do_msg_fill);
>
> These ifdefs in the middle of the code look not very elegant. Is there a way
> to replace the checks they surround with static inline function (reporting
> 0 when CHECKPOINT_RESTORE is off) potentially letting the compiler optimize
> out the code sitting under if (0) ?
>

Yes, sure. I'll do this.

-- 
Best regards,
Stanislav Kinsbursky

  reply	other threads:[~2012-04-10  9:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-09 17:53 [PATCH 0/4] IPC: message queue checkpoint/restore - requested updates Stanislav Kinsbursky
2012-04-09 17:53 ` [PATCH 1/4] ipc: rename obfuscating MSG_STEAL flag into MSG_PEEK_ALL Stanislav Kinsbursky
2012-04-09 17:54 ` [PATCH 2/4] ipc: move all checkpoint-restore code under appropriate define Stanislav Kinsbursky
2012-04-09 19:47   ` [CRIU] " Pavel Emelyanov
2012-04-10  9:05     ` Stanislav Kinsbursky [this message]
2012-04-10 13:27     ` [CRIU] [PATCH v2 " Stanislav Kinsbursky
2012-04-09 17:54 ` [PATCH 3/4] ipc: handle MSG_PEEK_ALL flag if CONFIG_CHECKPOINT_RESTORE is dropped Stanislav Kinsbursky
2012-04-09 17:54 ` [PATCH 4/4] test: IPC message queue migration test Stanislav Kinsbursky
2012-04-10 19:17   ` Andrew Morton

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=4F83F7EF.4030700@parallels.com \
    --to=skinsbursky@parallels.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=criu@openvz.org \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.demarchi@profusion.mobi \
    --cc=mtk.manpages@gmail.com \
    --cc=serge.hallyn@canonical.com \
    --cc=xemul@parallels.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).