From: Olaf Hering <olh@suse.de>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] avoid unaligned access to data
Date: Sat, 13 Mar 2004 00:03:38 +0000 [thread overview]
Message-ID: <20040313000338.GC29248@suse.de> (raw)
In-Reply-To: <20040229204531.GA25308@suse.de>
On Fri, Mar 12, Greg KH wrote:
> On Sun, Feb 29, 2004 at 09:45:31PM +0100, Olaf Hering wrote:
> >
> > the data access in udevinfo is usually unaligned, due to the fact that
> > the struct is at offset strlen(sysfspath). That makes an ia64 kernel
> > rather unhappy. Unless I miss something, this change makes it happy by
> > making an incompatible change to the database.
> >
> >
> > diff -p -purN udev-018/udevdb.c udev-018.align/udevdb.c
> > --- udev-018/udevdb.c 2004-02-19 19:38:36.000000000 +0100
> > +++ udev-018.align/udevdb.c 2004-02-22 13:05:15.000000000 +0100
> > @@ -44,6 +44,8 @@
> > static TDB_CONTEXT *udevdb;
> >
> >
> > +#define my_key_align (__alignof__(char *))
>
> Hm, can't we just pad out our data structures to provide the proper
> alignment? If it's really necessary...
its not the alignment of struct members, but the alignment of the
struct itself. we could copy the struct from the database to an aligned
area on the stack or malloc buffer. but thats not faster than the
unaligned access.
--
USB is for mice, FireWire is for men!
sUse lINUX ag, n√úRNBERG
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&opÃk
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2004-03-13 0:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-29 20:45 [PATCH] avoid unaligned access to data Olaf Hering
2004-03-05 22:21 ` Olaf Hering
2004-03-12 23:40 ` Greg KH
2004-03-12 23:41 ` Greg KH
2004-03-12 23:59 ` Olaf Hering
2004-03-13 0:03 ` Olaf Hering [this message]
2004-03-13 0:11 ` Greg KH
2004-03-13 9:58 ` Olaf Hering
2004-03-13 16:57 ` Johannes Erdfelt
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=20040313000338.GC29248@suse.de \
--to=olh@suse.de \
--cc=linux-hotplug@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).