Re: [PATCH 10/20] target: Free session objects after associated commands have finished

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/13/2015 06:02 AM, Christoph Hellwig wrote:
On Mon, Oct 12, 2015 at 10:10:49AM -0700, Bart Van Assche wrote:
This patch avoids that the following kernel crash can occur with
synchronous TMF handling:

So this is a preparation patch?  Maybe this needs to be state more
clearly.

OK, I will mention that more clearly.

  void transport_free_session(struct se_session *se_sess)
  {
+	spin_lock_irq(&se_sess->sess_cmd_lock);
+	while (wait_event_interruptible_lock_irq(se_sess->cmd_list_wq,
+				list_empty(&se_sess->sess_cmd_list),
+				se_sess->sess_cmd_lock) < 0)
+		;
+	spin_unlock_irq(&se_sess->sess_cmd_lock);
+

Shouldn't this be a single uninterruptible wait?

Uninterruptible waits show up in the CPU load which is what I wanted to avoid. This can indeed be changed into a single uninterruptible wait. Do you perhaps prefer the latter ?

Bart.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux