From: Albert Lee <albertcc@tw.ibm.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: "linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
Doug Maxey <dwm@maxeymade.com>
Subject: Re: highmem pages
Date: Thu, 06 Oct 2005 18:35:25 +0800 [thread overview]
Message-ID: <4344FDED.1080402@tw.ibm.com> (raw)
In-Reply-To: <43438258.9080706@pobox.com>
Jeff Garzik wrote:
>
> Here is an interesting code snippet from ide-scsi, that could be useful
> in libata:
>
>> count = min(pc->sg->length - pc->b_count, bcount);
>> if (PageHighMem(pc->sg->page)) {
>> unsigned long flags;
>>
>> local_irq_save(flags);
>> buf = kmap_atomic(pc->sg->page, KM_IRQ0) +
>> pc->sg->offse
>> t;
>> drive->hwif->atapi_input_bytes(drive, buf +
>> pc->b_count,
>> count);
>> kunmap_atomic(buf - pc->sg->offset, KM_IRQ0);
>> local_irq_restore(flags);
>> } else {
>> buf = page_address(pc->sg->page) +
>> pc->sg->offset;
>> drive->hwif->atapi_input_bytes(drive, buf +
>> pc->b_count,
>> count);
>> }
>
Thanks for the advice. The kmap_atomic() usage optimization patches are ready:
patch 1/3: reorganize ata_pio_sector() and __atapi_pio_bytes()
patch 2/3: reorganize "buf + offset"
patch 3/3: use PageHighMem() to optimize the kmap_atomic() usage
Patch against libata-dev irq-pio branch (c71c18576d0d8aa4db876c737c3c597c724cf02f).
For your review and advice, thanks.
Albert
next prev parent reply other threads:[~2005-10-06 10:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-05 7:35 highmem pages Jeff Garzik
2005-10-06 10:35 ` Albert Lee [this message]
2005-10-06 10:40 ` [PATCH/RFC 1/3] irq-pio: reorganize ata_pio_sector() and __atapi_pio_bytes() Albert Lee
2005-10-06 10:42 ` [PATCH/RFC 2/3] irq-pio: reorganize "buf + offset" Albert Lee
2005-10-06 10:44 ` [PATCH/RFC 3/3] " Albert Lee
2005-10-06 11:20 ` highmem pages Jeff Garzik
2005-10-07 6:00 ` Albert Lee
2005-10-07 6:08 ` [PATCH 0/3] libata-dev: use PageHighMem() to optimize kmap_atomic() usage Albert Lee
2005-10-07 6:12 ` [PATCH 1/3] irq-pio: reorganize ata_pio_sector() and __atapi_pio_bytes() Albert Lee
2005-10-07 6:18 ` [PATCH 2/3] irq-pio: reorganize "buf + offset" Albert Lee
2005-10-07 6:20 ` [PATCH 3/3] irq-pio: use PageHighMem() to optimize the kmap_atomic() usage Albert Lee
2005-10-09 13:49 ` Jeff Garzik
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=4344FDED.1080402@tw.ibm.com \
--to=albertcc@tw.ibm.com \
--cc=bzolnier@gmail.com \
--cc=dwm@maxeymade.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.