Re: [PATCH v2 2/2] scsi: core: Introduce a new list for SCSI proc directory entries

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

 



On 9/8/22 09:03, Mike Christie wrote:
On 8/30/22 4:05 PM, Bart Van Assche wrote:
  void scsi_proc_host_rm(struct Scsi_Host *shost)
  {
+	struct scsi_proc_entry *e;
  	char name[10];
- if (!shost->hostt->proc_dir)


Hey Bart, Would it better to replace those two checks with a

if (!sht->show_info)
	return;

like is done in scsi_proc_hostdir_add/scsi_proc_hostdir_rm? In those
hostdir functions if show_info is not set, you will not add an entry to
scsi_proc_list. So in the above functions if that callout is not set
you know there is no entry on &scsi_proc_list and don't need to grab the
global_host_template_mutex for those cases.

That sounds like an interesting idea to me.

I can't really test but someone did say they had 1000s of scsi_hosts for
iscsi. I'm not really sure how big a deal it is since we wouldn't be
doing a lot of work with that mutex hold, but it seems like a simple and
nice change just in case.

How about switching from a linked list to a hash table?

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux