Skip to contentSkip to conversation

New -udm?

DISCUSSION Lars Marowsky-Bree 4 participants 11 messages Apr 10, 2005 – Apr 11, 2005 Device mapper

lore
Share & tools
lore
#0 lore raw

Hi Alasdair,

I'm resync'ing against -udm and would like to pull all recent fixes if possible. Do you have anything more recent than the 2.6.11-rc3-udm2?

Sincerely,
Lars Marowsky-Brée <[email protected]>

Signature · 3 lines
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business
#1 lore raw
Quoted 9 lines · Lars Marowsky-Bree

Hi Alasdair,

I'm resync'ing against -udm and would like to pull all recent fixes if possible. Do you have anything more recent than the 2.6.11-rc3-udm2?

Sincerely,
Lars Marowsky-Brée <[email protected]>

There is this hwhandler from Dave Olien, that needs auditing, but is a must-have for StorageWorks and FSC FibreCat users.

http://christophe.varoqui.free.fr/multipath-tools/dm-scsi-start.patch

Would be good to have in an enterprise distro ...

Regards,

Signature · 1 line
christophe varoqui <[email protected]>
#2 lore raw

Sadly, that implementation uses a depcreated ioctl. I'll re-write it this week in the same manner the dm-emc.c is coded. Target to have it in the mail Friday.

Quoted 26 lines · christophe varoqui
Quoted 9 lines · Lars Marowsky-Bree

Hi Alasdair,

I'm resync'ing against -udm and would like to pull all recent fixes if possible. Do you have anything more recent than the 2.6.11-rc3-udm2?

Sincerely,
Lars Marowsky-Brée <[email protected]>

There is this hwhandler from Dave Olien, that needs auditing, but is a must-have for StorageWorks and FSC FibreCat users.

http://christophe.varoqui.free.fr/multipath-tools/dm-scsi-start.patch

Would be good to have in an enterprise distro ...

Regards,

Signature · 7 lines
christophe varoqui <[email protected]>


--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
#3 lore raw
In reply to christophe varoqui
Quoted 11 lines · christophe varoqui
Quoted 9 lines · Lars Marowsky-Bree

Hi Alasdair,

I'm resync'ing against -udm and would like to pull all recent fixes if possible. Do you have anything more recent than the 2.6.11-rc3-udm2?

Sincerely,
Lars Marowsky-Brée <[email protected]>

Quoted 8 lines

There is this hwhandler from Dave Olien, that needs auditing, but is a must-have for StorageWorks and FSC FibreCat users.

http://christophe.varoqui.free.fr/multipath-tools/dm-scsi-start.patch

Would be good to have in an enterprise distro ...

Regards,

+static void sstart_pg_init(struct hw_handler *hwh, unsigned bypassed,
+ struct path *path)
+{
+ struct block_device *bdev = path->dev->bdev;
+ struct gendisk *disk = bdev->bd_disk;
+ struct scsi_device *sdev = scsi_disk(disk)->device;
+ int result;
+
+ result = scsi_ioctl(sdev, SCSI_IOCTL_START_UNIT, NULL);

is scsi_ioctl depreciated for this use? Besides that I think it allocates memory with GFP_KERNEL which I do not think you want here, and you will want some way to gaurantee you can make forward progress.

+ dm_pg_init_complete(path, result?MP_FAIL_PATH:0);
+}
+

#4 lore raw

You're correct. I'll rewrite it on Thursday this week. I'll use the same methods Lars used in the dm-emc.c

Quoted 49 lines · Mike Christie
Quoted 19 lines · christophe varoqui
Quoted 9 lines · Lars Marowsky-Bree

Hi Alasdair,

I'm resync'ing against -udm and would like to pull all recent fixes if possible. Do you have anything more recent than the 2.6.11-rc3-udm2?

Sincerely,
Lars Marowsky-Brée <[email protected]>

There is this hwhandler from Dave Olien, that needs auditing, but is a must-have for StorageWorks and FSC FibreCat users.

http://christophe.varoqui.free.fr/multipath-tools/dm-scsi-start.patch

Would be good to have in an enterprise distro ...

Regards,

(quoted diff) +9 -0
+static void sstart_pg_init(struct hw_handler *hwh, unsigned bypassed,
+			struct path *path)
+{
+	struct block_device *bdev = path->dev->bdev;
+	struct gendisk *disk = bdev->bd_disk;
+	struct scsi_device *sdev = scsi_disk(disk)->device;
+	int result;
+
+	result = scsi_ioctl(sdev, SCSI_IOCTL_START_UNIT, NULL);

is scsi_ioctl depreciated for this use? Besides that I think it allocates memory with GFP_KERNEL which I do not think you want here, and you will want some way to gaurantee you can make forward progress.

(quoted diff) +3 -1
+	dm_pg_init_complete(path, result?MP_FAIL_PATH:0);
+}
+
 
 
--

dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel

#5 lore raw
Quoted 2 lines · Dave Olien

You're correct. I'll rewrite it on Thursday this week. I'll use the same methods Lars used in the dm-emc.c

Note that dm-emc.c also would need to pre-allocate it's requests, but doesn't right now :/

Pre-allocating the requests sucks: Either we pre-allocate for _every_ path we might potentially need to send the request down on, or fix up the request for the path we sent it down on (which would require us to use internal knowledge about the req structs we're not supposed to have).

Good solutions solicited ;-)

Sincerely,
Lars Marowsky-Brée <[email protected]>

Signature · 3 lines
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business
#6 lore raw
Quoted 7 lines · Lars Marowsky-Bree
Quoted 2 lines · Dave Olien

You're correct. I'll rewrite it on Thursday this week. I'll use the same methods Lars used in the dm-emc.c

Quoted 8 lines

Note that dm-emc.c also would need to pre-allocate it's requests, but doesn't right now :/

Pre-allocating the requests sucks: Either we pre-allocate for _every_ path we might potentially need to send the request down on, or fix up the request for the path we sent it down on (which would require us to use internal knowledge about the req structs we're not supposed to have).

what is wrong with what you have now where you utilize the queue/path's mempool by doing a blk_get_request with GFP_WAIT? Is that "fix up the request..." comment meaning that you do not like to access the request structure for that code, or was it meaning that you have one request that is shared across paths and it needs to be cleaned up for reuse.

I think the hw_handlers setting up the requests is not so fun. Maybe the block layer scsi_ioctl code could be reworked a little so that it could set some of that up for us since it is very similar. My hw handler was basically cutting and pasting of that code with some large simplifcations. I am working on a Target Port Group handler that is again cutting and pasting more code.

Quoted 7 lines

Good solutions solicited ;-)

Sincerely,
Lars Marowsky-Brée <[email protected]>

#7 lore raw
Quoted 13 lines · Mike Christie
Quoted 11 lines · Lars Marowsky-Bree
Quoted 2 lines · Dave Olien

You're correct. I'll rewrite it on Thursday this week. I'll use the same methods Lars used in the dm-emc.c

Note that dm-emc.c also would need to pre-allocate it's requests, but doesn't right now :/

Quoted 8 lines
Quoted 5 lines

Pre-allocating the requests sucks: Either we pre-allocate for _every_ path we might potentially need to send the request down on, or fix up the request for the path we sent it down on (which would require us to use internal knowledge about the req structs we're not supposed to have).

what is wrong with what you have now where you utilize the queue/path's mempool by doing a blk_get_request with GFP_WAIT?

or were you talking about the page for data backing which does not have a mempool like the bios (not per queue though) and requests.

Is that "fix up the

Quoted 18 lines

request..." comment meaning that you do not like to access the request structure for that code, or was it meaning that you have one request that is shared across paths and it needs to be cleaned up for reuse.

I think the hw_handlers setting up the requests is not so fun. Maybe the block layer scsi_ioctl code could be reworked a little so that it could set some of that up for us since it is very similar. My hw handler was basically cutting and pasting of that code with some large simplifcations. I am working on a Target Port Group handler that is again cutting and pasting more code.

Quoted 7 lines

Good solutions solicited ;-)

Sincerely,
Lars Marowsky-Brée <[email protected]>

Signature · 3 lines
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
#8 lore raw
In reply to Mike Christie
Quoted 20 lines · Mike Christie
Quoted 8 lines · Lars Marowsky-Bree
Quoted 2 lines · Dave Olien

You're correct. I'll rewrite it on Thursday this week. I'll use the same methods Lars used in the dm-emc.c

Quoted 8 lines

Note that dm-emc.c also would need to pre-allocate it's requests, but doesn't right now :/

Pre-allocating the requests sucks: Either we pre-allocate for _every_ path we might potentially need to send the request down on, or fix up the request for the path we sent it down on (which would require us to use internal knowledge about the req structs we're not supposed to have).

Quoted 3 lines

what is wrong with what you have now where you utilize the queue/path's mempool by doing a blk_get_request with GFP_WAIT? Is that "fix up the request..." comment meaning that you do not like to access the request structure for that code, or was it meaning that you have one request that is shared across paths and it needs to be cleaned up for reuse.

I think the hw_handlers setting up the requests is not so fun. Maybe the block layer scsi_ioctl code could be reworked a little so that it could set some of that up for us since it is very similar.

it is similar, but where the sgio paths allocated with GFP_KERNEL I used atomics. For the page allocation (which is way to large for the lsi command) I originally just preallocated a page but that seemed to wasteful. All I really needed to preallocate was my mode page struct and done a virt_to_page to get the page pointer to pass to bio_add_page (I wasn't sure if I could do that at the time), I guess? Since I ended up failing over at the controller level the preallocation would not even have to be per path so it would not have been that much waste.

#9 lore raw
In reply to Mike Christie
Quoted 2 lines · Mike Christie

what is wrong with what you have now where you utilize the queue/path's mempool by doing a blk_get_request with GFP_WAIT?

... what if it's trying to free memory by going to swap on multipath, and can't, because we're blocked on getting the request with GFP_WAIT...?

Your patch helps, because it means we need less memory.

But, ultimately, we ought to preallocate the requests already when the hw-handler is initialized for a map (because presumably at that time we'll have enough memory, or can just fail the table setup). From that point on, our memory useage should not grow.

Sincerely,
Lars Marowsky-Brée <[email protected]>

Signature · 3 lines
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business
#10 lore raw
Quoted 9 lines · Lars Marowsky-Bree
Quoted 1 line · Mike Christie

what is wrong with what you have now where you utilize the queue/path's mempool by doing a blk_get_request with GFP_WAIT?

... what if it's trying to free memory by going to swap on multipath, and can't, because we're blocked on getting the request with GFP_WAIT...?

GFP_WAIT does not casue IOs though. That is the difference between waiing on GFP_KERNEL and GFP_WAIT I thought. GFP_KERNEL can cause a page write out which you wait on and then there is a problem since it could be to the same disk you are trying to recover. But if you are just waiting for something to be returned to the mempool like with GFP_WAIT + blk_get_request you should be ok as long as the code below you eventually give up their resources and frees the requests you are waiting on?

Quoted 12 lines

Your patch helps, because it means we need less memory.

But, ultimately, we ought to preallocate the requests already when the hw-handler is initialized for a map (because presumably at that time we'll have enough memory, or can just fail the table setup). From that point on, our memory useage should not grow.

Sincerely,
Lars Marowsky-Brée <[email protected]>