Bug 216293

Summary: blktap does not build on ia64
Product: Red Hat Enterprise Linux 5 Reporter: Aron Griffis <agriffis>
Component: kernel-xenAssignee: Keiichiro Tokunaga <ktokunag>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 5.0CC: clalance, dchapman, dzickus, jarod, lwang, riel, sakaia, xen-maint, yongkang.you
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0959 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-07 19:15:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Updated blktap patch, as posted for internal review
none
Further updated patch, actually builds *and* works! (at least mostly) none

Description Aron Griffis 2006-11-18 20:52:28 UTC
+++ This bug was initially created as a clone of Bug #208895 +++

Description of problem:
The kernel/drivers/xen/blktap/blktap.ko module does not build on ia64:

drivers/xen/blktap/blktapmain.c: In function 'fast_flush_area':
drivers/xen/blktap/blktapmain.c:902: error: implicit declaration of function
'create_lookup_pte_addr'

Version-Release number of selected component (if applicable):
kernel-xen-2.6.18-1.2724.fc6.ia64

blktap has been disabled on ia64 for now:
$ grep TAP configs/*xen*
configs/config-xen-generic:CONFIG_XEN_BLKDEV_TAP=m
configs/config-xen-ia64:# CONFIG_XEN_BLKDEV_TAP is not set

-- Additional comment from chrisw on 2006-10-02 11:29 EST --
Created an attachment (id=137553)
blktap compile fix for ia64


-- Additional comment from chrisw on 2006-10-02 11:36 EST --
Here is a patch that gets things building.  It's a bit of a hack since
it copies create_lookup_pte_addr into ia64 specific source files.  With
this patch the thing builds, and boots.  However each of the blkback, netback
and blktap fail with the same error.  Basically none of the backend drivers are
working on ia64, they each fail in balloon_alloc_empty_page_range() due to
failed __get_free_pages() attempt with large order.

-- Additional comment from sct on 2006-10-02 12:15 EST --
Yes; the backend allocating issue is already being tracked as bug 202971.

-- Additional comment from chrisw on 2006-10-02 12:20 EST --
OK, in that case we could apply the blktap fix to get things working to a point
that they can be debugged.

-- Additional comment from prarit on 2006-10-04 12:00 EST --
Assigning to agriffis.

-- Additional comment from sakaia.com on 2006-10-16 07:15 EST --
GNTMAP_application_map does not support Xen/IA64.
the blktap uses this function, so it does not run.
even if it fixes compilation.

-- Additional comment from yongkang.you on 2006-10-16 22:10 EST --
This bug is still in kernel-xen-2.6.18-1.2784.fc6

-- Additional comment from dzickus on 2006-10-16 22:34 EST --
in kernel-2.6.18-1.2728.el5

-- Additional comment from sct on 2006-10-17 04:41 EST --
Reopening, because the el5 kernel is not a fix for a devel bug!

-- Additional comment from agriffis on 2006-10-25 14:22 EST --
Unfortunately the compile fix for blktap on ia64 isn't nearly enough.  Sure it
allows the module to build, and that's great so that it doesn't need to be
disabled.  However the requisite support isn't in the ia64 hypervisor yet.  See
http://lists.xensource.com/archives/html/xen-ia64-devel/2006-10/msg00206.html

Hopefully this will be fixed upstream in time for RHEL5 release.  Unfortunately
it didn't make FC6

-- Additional comment from agriffis on 2006-11-08 15:22 EST --
Isaku Yamahata (Fujitsu) finished this work.  It is now in xen-unstable:

http://xenbits.xensource.com/xen-unstable.hg?cs=862aca401601
http://xenbits.xensource.com/xen-unstable.hg?cs=3cc7e419b949
http://xenbits.xensource.com/xen-unstable.hg?cs=f56b7ade7068

Unfortunately blktap has diverged somewhat between xen-unstable.hg and RHEL5,
with unique fixes in each that haven't yet been merged to the other.  They'll
undoubtedly converge in due course, but at the moment this means a little
porting work for the above patches to apply to RHEL5.  I'll update this bug with
those soon, hopefully.

-- Additional comment from agriffis on 2006-11-18 12:58 EST --
Created an attachment (id=141558)
blktap/ia64 patches ported to rhel5


-- Additional comment from agriffis on 2006-11-18 14:36 EST --
Note that the blktap patches also require this change in
kernel-2.6.18-ia64-xen.config

-# CONFIG_XEN_BLKDEV_TAP is not set
+CONFIG_XEN_BLKDEV_TAP=m

Comment 1 Aron Griffis 2006-11-18 20:54:03 UTC
*** Bug 212315 has been marked as a duplicate of this bug. ***

Comment 2 Aron Griffis 2006-11-18 20:57:00 UTC
Note that attachment 141558 [details] should obsolete attachment 137553 [details] but I didn't have
permissions to do that.

Comment 3 RHEL Program Management 2006-11-18 21:20:24 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 4 Larry Troan 2006-11-20 19:03:10 UTC
Per discussion with Prarit and Aron,
> Bug 212315/216293: blktap does not build on ia64
>
> This is completely fixed upstream and is important for the tech
> preview.  I just need to post the patches ported to RHEL5.  I will do
> that ASAP.
Should be an RC blocker.

Aron please ACK for devel; QE please ACK/NAK as appropriate.

Comment 5 Larry Troan 2006-11-20 19:07:06 UTC
Note that the patch in comment #2 is more complicated that others in this group.
Affects drivers/xen/blktap/blktapmain.c and drivers/xen/blktap/xenbus.c.


Comment 6 Aron Griffis 2006-12-04 23:09:51 UTC
devel ACK

I put this on rhkernel-list today so we should get some comments back about the
common code mods.

Comment 9 Jarod Wilson 2006-12-05 02:01:25 UTC
Created attachment 142795 [details]
Updated blktap patch, as posted for internal review

This patch obsoletes attachment 141558 [details].

Comment 16 Brian Stein 2007-06-14 17:44:58 UTC
If blktap is building/working on IA64, this should be closed.

Comment 17 Jarod Wilson 2007-06-14 19:04:22 UTC
Well... First ia64 xen kernels have to actually be able to *boot*... :)

(bug 241674 and bug 243312)

Comment 18 Jarod Wilson 2007-06-20 18:26:56 UTC
...still not building. With the config option flipped back on in the latest
kernel (-29.el5):

drivers/xen/blktap/blktapmain.c: In function 'fast_flush_area':
drivers/xen/blktap/blktapmain.c:859: error: implicit declaration of function
'create_lookup_pte_addr'
make[3]: *** [drivers/xen/blktap/blktapmain.o] Error 1
make[2]: *** [drivers/xen/blktap] Error 2
make[1]: *** [drivers/xen] Error 2
make: *** [drivers] Error 2


Comment 19 Jarod Wilson 2007-06-20 21:23:06 UTC
I've got the blktap module compiling now, but not behaving entirely. Though it
could be something else actually causing my problems, so stay tuned. More info
to come later tonight. Current patch was posted to rhkernel-list earlier
tonight, and there's a slightly different version that made its way into the
upstream xen-unstable hg tree:

http://xenbits.xensource.com/xen-unstable.hg?cs=f56b7ade7068



Comment 20 Jarod Wilson 2007-06-21 04:42:47 UTC
Created attachment 157513 [details]
Further updated patch, actually builds *and* works! (at least mostly)

This is the version of the patch with which I'm actually able to use blktap to
access a disk image, install a guest with, etc. Only issue at the moment, so
far as I can tell, is top reporting some insane memory usage from tapdisk. Its
reporting figures several orders of magnitude greater than the amount of memory
in the system (its claiming to use 2000% of memory), but swap isn't being
abnormally used, no oom-kills, etc., so it may just be an accounting error of
some sort, since I can't see any other ill effects.

Comment 21 Jarod Wilson 2007-06-21 05:12:02 UTC
Guest install finished just fine, no more tapdisk process reporting gross memory usage once its shut 
down. More testing in the morning.

Comment 22 Jarod Wilson 2007-06-21 21:38:49 UTC
Patch submitted for internal review.

Comment 23 Jarod Wilson 2007-06-28 21:56:07 UTC
Updated patch including a one-line-of-code addition from fujitsu to eliminate
the tapdisk memory issue posted for review.

We still have one remaining problem with some dom0 console spew on domU bootup
though:

blk_tap: BLKTAP: READ request sector[8192002,16000], Total [8192000]
blk_tap: BLKTAP: Sector request greaterthan size

This happens on bootup within the initrd. After some initrd hacking
(basically, adding a bunch of sleep calls between steps), I've
determined that there are two distinct bursts of spew, one that
coincides with "Creating root device." (aka mkrootdev -t ext3 ...) and
one with "Mounting root filesystem." (aka mount /sysroot). Doesn't
matter if root is on lvm or a plain partition, happens the same way on a
guest with no lvm whatsoever and a guest w/lvm. Haven't yet been able to
trigger this spew doing heavy I/O within the guest either, thus far it
has only been triggered in the initrd.

Comment 24 Suzanne Logcher 2007-06-29 20:15:00 UTC
From Jun 28 RHEL 5 meeting:

REPORTER: bstein
STATUS:   More progress.  Are booting and testing.  Fujitsu doesn't
          use blktap.
          Update: in POST as of Jun 21 PM.
REPORTER: bstein
STATUS:   Fujitsu just gave another patch Jun 27.
DECISION: Add to potential Beta respin of kernel.

Copied dzickus on bugzilla.

Comment 25 Don Zickus 2007-07-10 16:20:23 UTC
in 2.6.18-33.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Comment 26 Larry Troan 2007-07-11 14:03:54 UTC
Per comment #24, looks like Fujitsu provided the patch. 
Assume they will test this fix.

Comment 29 Mike Gahagan 2007-09-19 19:56:19 UTC
Confirmed that blktap is building on ia64 as of the -43 kernel

Comment 31 errata-xmlrpc 2007-11-07 19:15:24 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0959.html