Re: [PATCH 0/5] blk-mq: allow to run queue if queue refcount is held

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

 



On Tue, 2019-04-02 at 10:55 +-0800, Ming Lei wrote:
+AD4 Also, isn't it the typical practice to release kobject related resources in
+AD4 its release handler?

A typical approach is to call kobject+AF8-del() before starting to clean up a
resource and to defer the final kfree() call to the release handler. I think
that's how it works today in the block layer core. That is easy to see in the
blk+AF8-mq+AF8-hw+AF8-sysfs+AF8-release() implementation:

static void blk+AF8-mq+AF8-hw+AF8-sysfs+AF8-release(struct kobject +ACo-kobj)
+AHs
	struct blk+AF8-mq+AF8-hw+AF8-ctx +ACo-hctx +AD0 container+AF8-of(kobj, struct blk+AF8-mq+AF8-hw+AF8-ctx,
						  kobj)+ADs
	free+AF8-cpumask+AF8-var(hctx-+AD4-cpumask)+ADs
	kfree(hctx-+AD4-ctxs)+ADs
	kfree(hctx)+ADs
+AH0

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