public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Tom Hanrahan <hanrahat@microsoft.com>,
	Hashir Abdi <habdi@microsoft.com>
Subject: Re: [patch] Staging: hv: Fix vmbus load hang caused by wrong data packing
Date: Mon, 12 Oct 2009 10:29:53 -0700	[thread overview]
Message-ID: <20091012172953.GA10557@suse.de> (raw)
In-Reply-To: <1FB5E1D5CA062146B38059374562DF7212DF10DD@TK5EX14MBXC130.redmond.corp.microsoft.com>

On Mon, Oct 12, 2009 at 05:03:42PM +0000, Haiyang Zhang wrote:
> >  	ChannelMessageCount
> > -} __attribute__((packed));
> 
> Why the change here?  Isn't this doing the same thing?
> 
> And I'm guessing that not all of these structures are needing to be
> packed, right?  Are they all shared across the HV boundry?
> 
> And is this fixing the problem that Hank and users have reported with
> the current code?  Does this need to get into the 2.6.32 release?
> 
> 
> thanks,
> 
> greg k-h
> ================================================
> Hi Greg,

Odd quoting style :(

> Based on our testing, the #pragma pack(push,1) can pack the data
> correctly for the HyperV to use, but __attribute__((packed)) couldn't
> do this right.

Why?  What does gcc generate differently?  This should be identical.

> These data structures are moved by someone from the original file,
> ChannelMessages.h, which contains structures used for messaging to
> host.

I moved them as they did not need to be in that file, right?

And are all of these structures needing to be packed?

Ideally, we don't deal with packed structures at all, but with offsets
in memory and pick out the proper fields and put them into new
structures if you want to use them that way.  How hard would that be to
do here instead?

> Yes, it's fixing the problem that Hank and users have reported with
> the current code. And yes, 2.6.32 needs this fix.

I still want to figure out what the real difference here is.  Especially
as I removed a lot of the #pragma pack(push,1) lines from the hv code.
If it really is different, all of those patches should be reverted,
right?

thanks,

greg k-h

  reply	other threads:[~2009-10-12 17:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-10 23:16 [patch] Staging: hv: Fix vmbus load hang caused by wrong data packing Haiyang Zhang
2009-10-12 15:30 ` Greg KH
2009-10-12 17:03   ` Haiyang Zhang
2009-10-12 17:29     ` Greg KH [this message]
2009-10-12 20:10       ` Hank Janssen
2009-10-12 20:22         ` Greg KH
2009-10-12 20:44           ` Haiyang Zhang
2009-10-12 21:27             ` Greg KH
2009-10-12 23:41               ` Haiyang Zhang
2009-10-13  5:08         ` Pekka Enberg
2009-10-16 20:03           ` Hank Janssen
2009-10-12 20:34 ` Greg KH
2009-10-16 20:11 ` [PATCH 1/1] Staging: hv: Fix vmbus load hang caused by faulty " Hank Janssen

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=20091012172953.GA10557@suse.de \
    --to=gregkh@suse.de \
    --cc=habdi@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=hanrahat@microsoft.com \
    --cc=hjanssen@microsoft.com \
    --cc=linux-kernel@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