From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: linux-next: Tree for July 16 (crash on quad core AMD) Date: Sat, 19 Jul 2008 11:12:17 +0900 Message-ID: <48814D81.8060001@gmail.com> References: <20080716235011.ac9643aa.sfr@canb.auug.org.au> <200807170053.36661.rjw@sisk.pl> <1216249292.3358.66.camel@localhost.localdomain> <200807170109.30655.rjw@sisk.pl> <48808EE0.2060603@gmail.com> <20080719004736.626ef169@mjolnir.drzeus.cx> <48813C5F.70007@gmail.com> <20080719033050.552f9b49@mjolnir.drzeus.cx> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=/tUJ3XP4BTtEa/Gg4RP1j5194OHLMBPNav/9+RvMfFk=; b=CZkY0QwdJ0FsquvlENoesMs/4DyaXz7JwYi7uebv6qLfId87Lcz4t5MWxbBvjpb+UR 80ZPAHlVX3KBgrcgdMhhTrMK1p28yEE5O/RkMpD4vk8p9xMrjrLzHDyY+m6QsmmtW39T syQeTbB8vBlPQzl4TJtNiuD4pKPXo8vK3uhQE= In-Reply-To: <20080719033050.552f9b49-OhHrUh4vRMSnewYJFaQfwJ5kstrrjoWp@public.gmane.org> Sender: kernel-testers-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Pierre Ossman Cc: "Rafael J. Wysocki" , James Bottomley , Stephen Rothwell , linux-next-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, LKML , Andrew Morton , Kernel Testers List , scsi , Jens Axboe , linux-ide , Jeff Garzik , Takashi Iwai , tino.keitel-Mmb7MZpHnFY@public.gmane.org Pierre Ossman wrote: >> Well, I don't know how often such usages would be necessary. If it's a >> very common ops, you can add a param to the next function but frankly I >> think it's better to build a inside control structure for that. There's >> no need for external buffer, just an inner loop is sufficient. >> > > I'm not sure how this can be solved by an inner loop. My primary use > case is: > > 1. Wait for interrupt > 2. Write n bytes > 3. goto 1 > > n has no guarantee of being aligned to any page boundaries, so state > needs to be kept between each invokation of writing a chunk of data. I > doubt I'm alone in this use pattern (in fact, most device drivers using > PIO should do something similar). Oh... I see. How about adding sg_miter_consume(@miter, @bytes)? If the function is never called, the whole chunk is assumed to be consumed. If the function is called only @bytes are consumed. -- tejun