From: Cyril Hrubis <chrubis@suse.cz>
To: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] increasing buffer size for correct alignment
Date: Mon, 26 Jan 2015 14:45:56 +0100 [thread overview]
Message-ID: <20150126134555.GC25601@rei.suse.de> (raw)
In-Reply-To: <20150126094613.GA2055@localhost.localdomain>
Hi!
> I have a patch for aio-stress to align buffer address correctly. Please
> have a look. Thanks in advance.
>
> For align buffer address to the number specified by -a option in
> aio-stress, it needs to add page_size_mask extra length to total_ram
> before call allocation functions. Or it wouldn't be correct in this line
> after the allocation:
>
> p = (char *)((intptr_t) (p + page_size_mask) & ~page_size_mask);
You are adding the page_size_mask to all uses of total_ram, wouldn't it
be easier to add it to the total_ram at the start of the function (and
remove the page_size_mask from the malloc() call that has it allready)?
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2015-01-26 13:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-26 9:46 [LTP] [PATCH] increasing buffer size for correct alignment Han Pingtian
2015-01-26 13:45 ` Cyril Hrubis [this message]
2015-01-27 1:31 ` Han Pingtian
2015-01-28 12:10 ` Cyril Hrubis
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=20150126134555.GC25601@rei.suse.de \
--to=chrubis@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
/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