public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladislav Bolkhovitin <vst@vlnb.net>
To: Andrew Vasquez <andrew.vasquez@qlogic.com>
Cc: linux-driver@qlogic.com, Gal Rosen <galr@storwize.com>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	linux-scsi@vger.kernel.org, scst-devel@lists.sourceforge.net
Subject: Re: [PATCH] qla2xxx: Fix dpc_thread race on the module unload
Date: Thu, 31 Jul 2008 21:41:46 +0400	[thread overview]
Message-ID: <4891F95A.9070409@vlnb.net> (raw)
In-Reply-To: <20080731160251.GB76172@plap4-2.local>


Andrew Vasquez wrote:
> On Thu, 31 Jul 2008, Vladislav Bolkhovitin wrote:
> 
>> Gal Rosen wrote:
>>> Andrew,
>>>
>>> Add checking of the flag online still does not answer the race that Vlad
>>> stated before,
>> Yes, that's true.
>>
>> And, since ha->flags.online set to 0 not only on shutdown, I'm afraid you 
>> could introduce a new set of subtle bugs, if not for the moment, but in the 
>> future, because with your patch it gets impossible to wake up the DPC 
>> thread if HA is offline.
> 
> You are both missing a subtle point, it's incidental if
> qla2xxx_wake_dpc() misses a 'wake-up' due the HBA being 'offline', as
> the qla2x00_timer(), woken up every second, will do the wake-up if
> necessary. The code changes offered, close the window as tightly as
> possible without introducing needlessly complex changes.  All this
> infrastructure is legacy constucts from a time long-before work-queues
> and the like.
> 
> This area is one of several where we are moving to clean-up and
> modernize in our upstream offering:
> 
> * dropping the heavy DPC thread in favor of work-queues.
> * using proper life-cycle and reference-handling of fcport objects
>   (yes, the objects will be freed after use).
> * refactoring the HA respresentations for physical and virtual ports,
>   the current memcpy() physical-HA to vport-HA and slight-mods is
>   error-prone and doesn't scale.
> * drop the illogical single physical-HA maintains all fcports across
>   N-vports.

Nice to hear that!

> The changes above are large (170k diffs so far), and at this point are
> being run-through our testing.  The hope is to get the changes
> upstream during one of the next two merge windows.
> 
> Given the infrustructure mods and our focus on that front, if there's
> something small and contained you can offer above what I've proposed
> we'll be interested in reviewing any patches you'd push forward.

Then, I believe, my patch should go in as a temporal measure. I don't 
think we should crash users for 2 more major releases. The same is true 
for my other patch "Proposed protection of fcports field of struct 
scsi_qla_host" as well, because without it there should be no big 
problems to crash the driver via sysfs.

> Regards,
> Andrew Vasquez
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2008-07-31 17:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-28 17:33 [PATCH] qla2xxx: Fix dpc_thread race on the module unload Vladislav Bolkhovitin
2008-07-28 17:41 ` Andrew Vasquez
2008-07-28 17:49   ` Vladislav Bolkhovitin
2008-07-28 17:56 ` James Bottomley
2008-07-28 18:14   ` Vladislav Bolkhovitin
2008-07-29  7:30     ` Gal Rosen
2008-07-30  7:10     ` Gal Rosen
2008-07-31  6:12     ` Gal Rosen
2008-07-31  9:11       ` Vladislav Bolkhovitin
2008-07-31 16:02         ` Andrew Vasquez
2008-07-31 17:41           ` Vladislav Bolkhovitin [this message]
2008-07-31 17:55             ` Andrew Vasquez
2008-08-01 12:28               ` Vladislav Bolkhovitin
2008-07-29  4:27   ` Christoph Hellwig
2008-07-29  9:32     ` Vladislav Bolkhovitin
2008-07-28 18:07 ` Andrew Vasquez
2008-07-29  9:32   ` Vladislav Bolkhovitin
2008-07-29 14:40     ` James Bottomley
2008-07-29 15:13       ` Vladislav Bolkhovitin
2008-07-29 15:28         ` James Bottomley
2008-07-29 15:36           ` Vladislav Bolkhovitin
2008-07-30 10:30     ` Andrew Vasquez

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=4891F95A.9070409@vlnb.net \
    --to=vst@vlnb.net \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=andrew.vasquez@qlogic.com \
    --cc=galr@storwize.com \
    --cc=linux-driver@qlogic.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=scst-devel@lists.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox