FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 02-21-2012, 06:33 PM
Mike Snitzer
 
Default

On Tue, Feb 21 2012 at 9:41am -0500,
Mike Snitzer <snitzer@redhat.com> wrote:

> On Tue, Feb 21 2012 at 7:31am -0500,
> Martin K. Petersen <martin.petersen@oracle.com> wrote:

> > PS. The good news is that your async stuff works when I set phys_segs to
> > 1 in sd.
>
> Yeah, it worked with the patch I provided in my previous mail too. But
> ultimately the async stuff wasn't working for me due to merging.

(not related to async interface but...)

After further testing (iSCSI from with a guest) it is clear that we
still have a problem with REQ_WRITE_SAME bios being merged into WRITE
requests (I added a debugging WARN_ON_ONCE to generate the following):

------------[ cut here ]------------
WARNING: at block/blk-merge.c:476 blk_rq_merge_ok+0x4d/0xb4()
Hardware name: KVM
Modules linked in: dm_thin_pool dm_persistent_data dm_bufio libcrc32c dm_mod sunrpc iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi virtio_net virtio_balloon i2c_piix4 i2c_core virtio_blk virtio_pci virtio_ring virtio [last unloaded: dm_thin_pool]
Pid: 5, comm: kworker/u:0 Not tainted 3.2.0-snitm+ #185
Call Trace:
[<ffffffff81042efa>] warn_slowpath_common+0x85/0x9d
[<ffffffff81042f2c>] warn_slowpath_null+0x1a/0x1c
[<ffffffff811cd8bc>] blk_rq_merge_ok+0x4d/0xb4
[<ffffffff811c4213>] elv_rq_merge_ok+0x17/0x47
[<ffffffff811c4287>] elv_merge+0x44/0xc2
[<ffffffff811ca815>] blk_queue_bio+0xf2/0x2d5
[<ffffffff811c9ca2>] generic_make_request+0xa1/0xe2
[<ffffffff811c9dc2>] submit_bio+0xdf/0x119
[<ffffffff8113191d>] ? bio_alloc_bioset+0x4d/0xc2
[<ffffffff811ceee3>] blkdev_issue_write_same+0x203/0x26c
[<ffffffff8106511a>] ? local_clock+0x41/0x5a
[<ffffffffa00f5dbf>] do_worker+0x3b6/0x5f1 [dm_thin_pool]
[<ffffffff8107084e>] ? trace_hardirqs_off_caller+0x1f/0x9e
[<ffffffffa00f5a09>] ? process_shared_bio+0x36e/0x36e [dm_thin_pool]
[<ffffffffa00f5a09>] ? process_shared_bio+0x36e/0x36e [dm_thin_pool]
[<ffffffff8105b6d0>] process_one_work+0x213/0x37b
[<ffffffff8105b641>] ? process_one_work+0x184/0x37b
[<ffffffff8105bb6d>] worker_thread+0x138/0x21c
[<ffffffff8105ba35>] ? rescuer_thread+0x1fd/0x1fd
[<ffffffff8105f6b1>] kthread+0xa0/0xa8
[<ffffffff81073663>] ? trace_hardirqs_on_caller+0x12f/0x166
[<ffffffff81398384>] kernel_thread_helper+0x4/0x10
[<ffffffff81390534>] ? retint_restore_args+0x13/0x13
[<ffffffff8105f611>] ? __init_kthread_worker+0x5b/0x5b
[<ffffffff81398380>] ? gs_change+0x13/0x13
---[ end trace 07b896d4bdef61b0 ]---

This patch fixes it for me, please feel free to add it to your series:

From: Mike Snitzer <snitzer@redhat.com>
Date: Tue Feb 21 13:55:42 2012 -0500

block: disallow certain bios from being merged into a request

Not all WRITE bios are pure WRITEs (there may be other flags set,
e.g. REQ_WRITE_SAME). Introduce bio_mergeable() and have
blk_rq_merge_ok() check that a given bio is mergeable.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>

diff --git a/block/blk-merge.c b/block/blk-merge.c
index 3f73823..81484d3 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -468,7 +468,7 @@ int blk_attempt_req_merge(struct request_queue *q, struct request *rq,

bool blk_rq_merge_ok(struct request *rq, struct bio *bio)
{
- if (!rq_mergeable(rq))
+ if (!rq_mergeable(rq) || !bio_mergeable(bio))
return false;

/* don't merge discard requests and secure discard requests */
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 5a505d7..7cf2d37 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -568,7 +568,10 @@ static inline void blk_clear_queue_full(struct request_queue *q, int sync)
#define rq_mergeable(rq)
(!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && (rq)->cmd_type == REQ_TYPE_FS)

-
+#define BIO_NOMERGE_FLAGS
+ (REQ_DISCARD | REQ_WRITE_SAME)
+#define bio_mergeable(bio)
+ (!((bio)->bi_rw & BIO_NOMERGE_FLAGS))

/*
* q->prep_rq_fn return values

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 02-21-2012, 06:43 PM
"Fabio M. Di Nitto"
 
Default

ACK

On 02/21/2012 07:53 PM, Lon Hohberger wrote:
> The new_owner was not being correctly set when enabling a service with
> -F when run without central processing enabled.
>
> Resolves: rhbz#727326
>
> Signed-off-by: Lon Hohberger <lhh@redhat.com>
> ---
> rgmanager/src/daemons/rg_state.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/rgmanager/src/daemons/rg_state.c b/rgmanager/src/daemons/rg_state.c
> index 5501b3f..23a4bec 100644
> --- a/rgmanager/src/daemons/rg_state.c
> +++ b/rgmanager/src/daemons/rg_state.c
> @@ -2293,6 +2293,7 @@ handle_fd_start_req(char *svcName, int request, int *new_owner)
>
> switch(ret) {
> case RG_ESUCCESS:
> + *new_owner = target;
> ret = RG_ESUCCESS;
> goto out;
> case RG_ERUN:
 
Old 02-21-2012, 06:47 PM
Vivek Goyal
 
Default

On Tue, Feb 21, 2012 at 01:55:04AM -0500, Mike Snitzer wrote:

[..]
> I think the bio_has_data() change is at the heart of the BUG_ON().
>
> Now this branch in blk_rq_bio_prep() is no longer taken:
>
> if (bio_has_data(bio)) {
> rq->nr_phys_segments = bio_phys_segments(q, bio);
> rq->buffer = bio_data(bio);
> }
>
> This patch fixed the issue for me (though I'm still missing why
> bio->bi_phys_segments was 0 given blkdev_issue_write_same() sets it):
>
> Index: linux-2.6/drivers/scsi/sd.c
> ================================================== =================
> --- linux-2.6.orig/drivers/scsi/sd.c
> +++ linux-2.6/drivers/scsi/sd.c
> @@ -697,6 +697,7 @@ out:
> static int sd_setup_write_same_cmnd(struct scsi_device *sdp, struct request *rq)
> {
> struct scsi_disk *sdkp = scsi_disk(rq->rq_disk);
> + struct request_queue *q = sdkp->disk->queue;
> struct bio *bio = rq->bio;
> sector_t sector = bio->bi_sector;
> unsigned int nr_sectors = bio_sectors(bio);
> @@ -711,7 +712,8 @@ static int sd_setup_write_same_cmnd(stru
>
> rq->timeout = SD_WRITE_SAME_TIMEOUT;
> rq->__data_len = rq->resid_len = sdp->sector_size;
> - rq->nr_phys_segments = bio->bi_phys_segments;
> + rq->nr_phys_segments = bio_phys_segments(q, bio);
> + rq->buffer = bio_data(bio);

This kind of sounds not so good. We should have got it covered in
blk_rq_bio_prep().

First we returned "false" from bio_has_data() and skipped above assignment,
in blk_rq_bio_prep() and now we are trying to make up for it.

Maybe returning false from bio_has_data() for WRITE_SAME is not such a
good idea because this bio has one logical block of data.

Martin, thoughts?

Thanks
Vivek

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 02-21-2012, 06:56 PM
"Martin K. Petersen"
 
Default

>>>>> "Vivek" == Vivek Goyal <vgoyal@redhat.com> writes:

Vivek> First we returned "false" from bio_has_data() and skipped above
Vivek> assignment, in blk_rq_bio_prep() and now we are trying to make up
Vivek> for it.

Vivek> Maybe returning false from bio_has_data() for WRITE_SAME is not
Vivek> such a good idea because this bio has one logical block of data.

bio_has_data() is used for two different things. In my current tree I
split it up into bio_has_data() and bio_is_rw().

But given Mike's merge observation I think I'll take a step back and see
if I can come up with a better way to handle these
REQ_I_CANT_BELIEVE_ITS_NOT_FS requests in general. I really don't want
to have all the special cases scattered all over the place.

--
Martin K. Petersen Oracle Linux Engineering

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 02-21-2012, 07:19 PM
Nowardev-Team
 
Default

Application: python2 (1.0)

KDE Platform Version: 4.8.00 (4.8.0

Qt Version: 4.8.0

Operating System: Linux 3.2.0-15-generic-pae i686

Distribution: Ubuntu precise (development branch)




-- Information about the crash:

i was doing



ubuntu-bug telepathy-mission-control-5




it opened firefox and => crash after a while XD

*




The crash can be reproduced every time.




-- Backtrace:

Application: Apport KDE (python2.7), signal: Aborted

Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".

[KCrash Handler]

#7 0xb7799424 in __kernel_vsyscall ()

#8 0xb73ab1ef in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64

#9 0xb73ae835 in __GI_abort () at abort.c:91

#10 0xb73a4095 in __assert_fail_base (fmt=0xb74dc438 "%s%s%s:%u: %s%sAssertion `%s' failed.
%n", assertion=0xb5304d39 "ret != inval_id", file=0xb5304caa "../../src/xcb_io.c", line=528, function=0xb5304dbe "_XAllocID") at assert.c:94


#11 0xb73a4147 in __GI___assert_fail (assertion=0xb5304d39 "ret != inval_id", file=0xb5304caa "../../src/xcb_io.c", line=528, function=0xb5304dbe "_XAllocID") at assert.c:103


#12 0xb528d4af in _XAllocID () from /usr/lib/i386-linux-gnu/libX11.so.6

#13 0xb53a1289 in XRenderCreatePicture () from /usr/lib/i386-linux-gnu/libXrender.so.1

#14 0xb5779a54 in QX11PixmapData::x11ConvertToDefaultDepth (this=0xa157c48) at image/qpixmap_x11.cpp:2255

#15 0xb5720af4 in QWidgetPrivate::setWindowIcon_sys (this=0xa0ac738, forceReset=false) at kernel/qwidget_x11.cpp:1539

#16 0xb56c740f in QWidget::create (this=0xa20ab90, window=0, initializeWindow=true, destroyOldWindow=true) at kernel/qwidget.cpp:1539


#17 0xb56c7aa3 in QWidgetPrivate::createWinId (this=0xa0ac738, winid=0) at kernel/qwidget.cpp:2564

#18 0xb56d0779 in QWidget::winId (this=0xa20ab90) at kernel/qwidget.cpp:2522

#19 0xb3b31bda in KDialog::setPlainCaption (this=0xa20ab90, caption=...) at ../../kdeui/dialogs/kdialog.cpp:493

#20 0xb3b367e0 in KDialogPrivate::init (this=0xa1d1ef8, q=0xa20ab90) at ../../kdeui/dialogs/kdialog.cpp:181

#21 0xb3b369da in KDialog::KDialog (this=0xa20ab90, parent=0x0, flags=...) at ../../kdeui/dialogs/kdialog.cpp:192

#22 0xb3b4cd61 in informationListWId (options=..., dontShowAgainName=..., caption=..., strlist=..., text=..., parent_id=0) at ../../kdeui/dialogs/kmessagebox.cpp:987


#23 KMessageBox::informationListWId (parent_id=0, text=..., strlist=..., caption=..., dontShowAgainName=..., options=...) at ../../kdeui/dialogs/kmessagebox.cpp:979


#24 0xb3b4d05b in KMessageBox::informationList (parent=0x0, text=..., strlist=..., caption=..., dontShowAgainName=..., options=...) at ../../kdeui/dialogs/kmessagebox.cpp:976


#25 0xb3b4d0c0 in KMessageBox::information (parent=0x0, text=..., caption=..., dontShowAgainName=..., options=...) at ../../kdeui/dialogs/kmessagebox.cpp:963


#26 0xb42e8dab in meth_KMessageBox_information (sipArgs=(None, u'Unable to start web browser to open https://bugs.launchpad.net/ubuntu/+source/telepathy-mission-control-5/+filebug/13f7ab92-5cc7-11e1-aaf8-002481e7f48a?.', u'Unable to start web browser')) at sip/kdeui/sipkdeuipart4.cpp:25733


#27 0x080f7533 in PyEval_EvalFrameEx ()

#28 0x080f7aa0 in PyEval_EvalFrameEx ()

#29 0x080f7aa0 in PyEval_EvalFrameEx ()

#30 0x080f7aa0 in PyEval_EvalFrameEx ()

#31 0x080fd4c4 in PyEval_EvalCodeEx ()

#32 0x080f7b67 in PyEval_EvalFrameEx ()

#33 0x080f7aa0 in PyEval_EvalFrameEx ()

#34 0x080fd4c4 in PyEval_EvalCodeEx ()

#35 0x0808c882 in function_call ()

#36 0x0805ded1 in PyObject_Call ()

#37 0x08073aed in instancemethod_call ()

#38 0x0805ded1 in PyObject_Call ()

#39 0x080f6d7e in PyEval_CallObjectWithKeywords ()

#40 0x08077cd6 in PyInstance_New ()

#41 0x0805ded1 in PyObject_Call ()

#42 0x080f7f01 in PyEval_EvalFrameEx ()

#43 0x080fd4c4 in PyEval_EvalCodeEx ()

#44 0x080fde37 in PyEval_EvalCode ()

#45 0x0811a790 in run_mod ()

#46 0x0811b3a9 in PyRun_FileExFlags ()

#47 0x0811befc in PyRun_SimpleFileExFlags ()

#48 0x0812c226 in Py_Main ()

#49 0x0805dcab in main ()

--
kubuntu-devel mailing list
kubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-devel
 
Old 02-21-2012, 08:31 PM
"Martin K. Petersen"
 
Default

>>>>> "Mike" == Mike Snitzer <snitzer@redhat.com> writes:

>> Yeah, it worked with the patch I provided in my previous mail too.
>> But ultimately the async stuff wasn't working for me due to merging.

New writesame3 branch on kernel.org. Please give it a whirl...

--
Martin K. Petersen Oracle Linux Engineering

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 02-21-2012, 08:58 PM
"David C. Rankin"
 
Default

On 02/21/2012 03:44 PM, Daenyth wrote:


Install abs and look in /usr/share/pacman/ at the proto PKGBUILDs. You
may also want to look at "newpkg", from pkgtools.



for i in $(find /var/abs -name PKGBUILD); do if grep "git clone" $i; then echo
"found in $i"; fi; done


was the ticket!

--
David C. Rankin, J.D.,P.E.
 
Old 02-21-2012, 09:09 PM
John K Pate
 
Default

>
> for i in $(find /var/abs -name PKGBUILD); do if grep "git clone" $i; then echo
> "found in $i"; fi; done
>
> was the ticket!

grep -l "git clone" /var/abs/*/*/PKGBUILD

or if you're uncertain about the directory structure

find /var/abs/ -name PKGBUILD -exec grep -l "git clone" {} ;

are a bit more straightforward

==
John K Pate http://homepages.inf.ed.ac.uk/s0930006/


--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
 
Old 02-21-2012, 10:36 PM
Mike Snitzer
 
Default

On Tue, Feb 21 2012 at 4:31pm -0500,
Martin K. Petersen <martin.petersen@oracle.com> wrote:

> >>>>> "Mike" == Mike Snitzer <snitzer@redhat.com> writes:
>
> >> Yeah, it worked with the patch I provided in my previous mail too.
> >> But ultimately the async stuff wasn't working for me due to merging.
>
> New writesame3 branch on kernel.org. Please give it a whirl...

Looks good. And it works great (with both your improved
blkdev_issue_write_same interface and the dm_kcopyd_zero interface).

Please feel free to add my Acked-by: Mike Snitzer <snitzer@redhat.com>
to the entire set.

(and thanks for working with me on chasing down and/or explaining the
various issues I was seeing!)

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 02-22-2012, 08:07 AM
Arch Website Notification
 
Default

=== Signoff report for [community-testing] ===
https://www.archlinux.org/packages/signoffs/

There are currently:
* 0 new packages in last 24 hours
* 0 known bad packages
* 0 packages not accepting signoffs
* 0 fully signed off packages
* 18 packages missing signoffs
* 2 packages older than 14 days

(Note: the word 'package' as used here refers to packages as grouped by
pkgbase, architecture, and repository; e.g., one PKGBUILD produces one
package per architecture, even if it is a split package.)



== Incomplete signoffs for [community] (18 total) ==

* dbmail-3.0.0_rc3-1 (i686)
0/2 signoffs
* hostapd-0.7.3-7 (i686)
0/2 signoffs
* ipvsadm-1.26-3 (i686)
0/2 signoffs
* keepalived-1.2.2-3 (i686)
0/2 signoffs
* knemo-0.7.3-2 (i686)
0/2 signoffs
* libvirt-0.9.10-1 (i686)
0/2 signoffs
* netcf-0.1.7-3 (i686)
0/2 signoffs
* pigeonhole-0.3.0-1 (i686)
0/2 signoffs
* simh-3.8.1-3 (i686)
0/2 signoffs
* dbmail-3.0.0_rc3-1 (x86_64)
0/2 signoffs
* hostapd-0.7.3-7 (x86_64)
0/2 signoffs
* ipvsadm-1.26-3 (x86_64)
0/2 signoffs
* keepalived-1.2.2-3 (x86_64)
0/2 signoffs
* knemo-0.7.3-2 (x86_64)
0/2 signoffs
* libvirt-0.9.10-1 (x86_64)
0/2 signoffs
* netcf-0.1.7-3 (x86_64)
0/2 signoffs
* pigeonhole-0.3.0-1 (x86_64)
0/2 signoffs
* simh-3.8.1-3 (x86_64)
0/2 signoffs


== All packages in [community-testing] for more than 14 days (2 total) ==

* dbmail-3.0.0_rc3-1 (i686), since 2012-01-15
* dbmail-3.0.0_rc3-1 (x86_64), since 2012-01-16


== Top five in signoffs in last 24 hours ==

1. bpiotrowski - 7 signoffs
2. ibiru - 4 signoffs
3. stephane - 1 signoffs
4. dreisner - 1 signoffs
 

Thread Tools




All times are GMT. The time now is 07:44 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org