Post subject: [patch 3/3] x86,apic: limit apic dumping, introduce show_lapic setup option
PostPosted: Wed Oct 14, 2009 3:07 am 
   
message unavailable


 
 Post subject: Re: [this_cpu_xx V6 7/7] this_cpu: slub aggressive use of this_cpu operations in the hotpaths
PostPosted: Wed Oct 14, 2009 3:07 am 
On Tue, 13 Oct 2009, Pekka Enberg wrote:

Quote:
I wonder how reliable these numbers are. We did similar testing a while back
because we thought kmalloc-96 caches had weird cache behavior but finally
figured out the anomaly was explained by the order of the tests run, not cache
size.

The tests were all run directly after booting the respective kernel.


 
 Post subject: Re: SCSI driver for VMware's virtual HBA - V5.
PostPosted: Wed Oct 14, 2009 4:28 am 
Hi Chris,

Thanks for taking a look.

On Mon, 2009-10-12 at 22:37 -0700, Chris Wright wrote:
Quote:
mostly just nits

* Alok Kataria (akataria@vmware.com) wrote:
+#include +#include +#include
shouldn't be needed

+#include
shouldn't be needed

Removed.
Quote:
+#include +#include +#include +
+#include +#include +#include +#include +
+#include "vmw_pvscsi.h"
+
+#define PVSCSI_LINUX_DRIVER_DESC "VMware PVSCSI driver"
+
+MODULE_DESCRIPTION(PVSCSI_LINUX_DRIVER_DESC);
+MODULE_AUTHOR("VMware, Inc.");
+MODULE_LICENSE("GPL");
+MODULE_VERSION(PVSCSI_DRIVER_VERSION_STRING);
+
+#define PVSCSI_DEFAULT_NUM_PAGES_PER_RING 8
+#define PVSCSI_DEFAULT_NUM_PAGES_MSG_RING 1
+#define PVSCSI_DEFAULT_QUEUE_DEPTH 64
+#define SGL_SIZE PAGE_SIZE
+
+#define pvscsi_dev(adapter) (&(adapter->dev->dev))

easy to make it static inline and get some type checking for free

Done.

Quote:
+
+static struct pvscsi_ctx *
+pvscsi_acquire_context(struct pvscsi_adapter *adapter, struct scsi_cmnd *cmd)
+{
+ struct pvscsi_ctx *ctx;
+
+ if (list_empty(&adapter->cmd_pool))
+ return NULL;
+
+ ctx = list_first_entry(&adapter->cmd_pool, struct pvscsi_ctx, list);
+ ctx->cmd = cmd;
+ list_del(&ctx->list);
+
+ return ctx;
+}
+
+static void pvscsi_release_context(struct pvscsi_adapter *adapter,
+ struct pvscsi_ctx *ctx)
+{
+ ctx->cmd = NULL;
+ list_add(&ctx->list, &adapter->cmd_pool);
+}

These list manipulations are protected by hw_lock? Looks like all cases
are covered.


Yep.

Quote:
snip
+/*
+ * Allocate scatter gather lists.
+ *
+ * These are statically allocated. Trying to be clever was not worth it.
+ *
+ * Dynamic allocation can fail, and we can't go deeep into the memory
+ * allocator, since we're a SCSI driver, and trying too hard to allocate
+ * memory might generate disk I/O. We also don't want to fail disk I/O
+ * in that case because we can't get an allocation - the I/O could be
+ * trying to swap out data to free memory. Since that is pathological,
+ * just use a statically allocated scatter list.
+ *
+ */
+static int __devinit pvscsi_allocate_sg(struct pvscsi_adapter *adapter)
+{
+ struct pvscsi_ctx *ctx;
+ int i;
+
+ ctx = adapter->cmd_map;
+ BUILD_BUG_ON(sizeof(struct pvscsi_sg_list) > SGL_SIZE);
+
+ for (i = 0; i < adapter->req_depth; ++i, ++ctx) {
+ ctx->sgl = kmalloc(SGL_SIZE, GFP_KERNEL);
+ ctx->sglPA = 0;
+ BUG_ON(!IS_ALIGNED(((unsigned long)ctx->sgl), PAGE_SIZE));

Why not simply allocate a page? Seems different allocator or debugging
options could trigger this.

Done.

Quote:
+
+static int __devinit pvscsi_probe(struct pci_dev *pdev,
+ const struct pci_device_id *id)
+{
+ struct pvscsi_adapter *adapter;
+ struct Scsi_Host *host;
+ unsigned int i;
+ int error;
+
+ error = -ENODEV;
+
+ if (pci_enable_device(pdev))
+ return error;

looks mmio only, pci_enable_device_mem()

We have a IOBAR as well though the driver doesn't use it.
Hence, I will skip this change since it is more future proof this way.
Quote:
+
+ if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) == 0 &&
+ pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)) == 0) {
+ printk(KERN_INFO "vmw_pvscsi: using 64bit dma\n");
+ } else if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) == 0 &&
+ pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)) == 0) {
+ printk(KERN_INFO "vmw_pvscsi: using 32bit dma\n");
+ } else {
+ printk(KERN_ERR "vmw_pvscsi: failed to set DMA mask\n");
+ goto out_disable_device;
+ }
+
+ pvscsi_template.can_queue =
+ min(PVSCSI_MAX_NUM_PAGES_REQ_RING, pvscsi_ring_pages) *
+ PVSCSI_MAX_NUM_REQ_ENTRIES_PER_PAGE;
+ pvscsi_template.cmd_per_lun =
+ min(pvscsi_template.can_queue, pvscsi_cmd_per_lun);

When/how are these tunables used? Are they still useful?

cmd_per_lun, is a commandline parameter.

Quote:
+ host = scsi_host_alloc(&pvscsi_template, sizeof(struct pvscsi_adapter));
+ if (!host) {
+ printk(KERN_ERR "vmw_pvscsi: failed to allocate host\n");
+ goto out_disable_device;
+ }
+
+ adapter = shost_priv(host);
+ memset(adapter, 0, sizeof(*adapter));
+ adapter->dev = pdev;
+ adapter->host = host;
+
+ spin_lock_init(&adapter->hw_lock);
+
+ host->max_channel = 0;
+ host->max_id = 16;
+ host->max_lun = 1;
+ host->max_cmd_len = 16;
+
+ adapter->rev = pdev->revision;
+
+ if (pci_request_regions(pdev, "vmw_pvscsi")) {
+ printk(KERN_ERR "vmw_pvscsi: pci memory selection failed\n");
+ goto out_free_host;
+ }
+
+ for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
+ if ((pci_resource_flags(pdev, i) & PCI_BASE_ADDRESS_SPACE_IO))
+ continue;
+
+ if (pci_resource_len(pdev, i) < PVSCSI_MEM_SPACE_SIZE)
+ continue;
+
+ break;
+ }
+
+ if (i == DEVICE_COUNT_RESOURCE) {
+ printk(KERN_ERR
+ "vmw_pvscsi: adapter has no suitable MMIO region\n");
+ goto out_release_resources;
+ }

Could simplify and just do pci_request_selected_regions.

this method is more future proof, that is if we decide to export some
more bars or anything of that sought. So, will keep it as is.
Quote:
+ adapter->mmioBase = pci_iomap(pdev, i, PVSCSI_MEM_SPACE_SIZE);
+
+ if (!adapter->mmioBase) {
+ printk(KERN_ERR
+ "vmw_pvscsi: can't iomap for BAR %d memsize %lu\n",
+ i, PVSCSI_MEM_SPACE_SIZE);
+ goto out_release_resources;
+ }
+
+ pci_set_master(pdev);
+ pci_set_drvdata(pdev, host);
+
+ ll_adapter_reset(adapter);
+
+ adapter->use_msg = pvscsi_setup_msg_workqueue(adapter);
+
+ error = pvscsi_allocate_rings(adapter);
+ if (error) {
+ printk(KERN_ERR "vmw_pvscsi: unable to allocate ring memory\n");
+ goto out_release_resources;
+ }
+
+ /*
+ * From this point on we should reset the adapter if anything goes
+ * wrong.
+ */
+ pvscsi_setup_all_rings(adapter);
+
+ adapter->cmd_map = kcalloc(adapter->req_depth,
+ sizeof(struct pvscsi_ctx), GFP_KERNEL);
+ if (!adapter->cmd_map) {
+ printk(KERN_ERR "vmw_pvscsi: failed to allocate memory.\n");
+ error = -ENOMEM;
+ goto out_reset_adapter;
+ }
+
+ INIT_LIST_HEAD(&adapter->cmd_pool);
+ for (i = 0; i < adapter->req_depth; i++) {
+ struct pvscsi_ctx *ctx = adapter->cmd_map + i;
+ list_add(&ctx->list, &adapter->cmd_pool);
+ }
+
+ error = pvscsi_allocate_sg(adapter);
+ if (error) {
+ printk(KERN_ERR "vmw_pvscsi: unable to allocate s/g table\n");
+ goto out_reset_adapter;
+ }
+
+ if (!pvscsi_disable_msix &&
+ pvscsi_setup_msix(adapter, &adapter->irq) == 0) {
+ printk(KERN_INFO "vmw_pvscsi: using MSI-X\n");
+ adapter->use_msix = 1;
+ } else if (!pvscsi_disable_msi && pci_enable_msi(pdev) == 0) {
+ printk(KERN_INFO "vmw_pvscsi: using MSI\n");
+ adapter->use_msi = 1;
+ adapter->irq = pdev->irq;
+ } else {
+ printk(KERN_INFO "vmw_pvscsi: using INTx\n");
+ adapter->irq = pdev->irq;
+ }
+
+ error = request_irq(adapter->irq, pvscsi_isr, IRQF_SHARED,
+ "vmw_pvscsi", adapter);

Typically IRQF_SHARED w/ INTx, not MSI and MSI-X.


Done.

Will send a V6 with all the changes.

Thanks,
Alok


 
 Post subject: [PATCH 1/7] mfd: pcf50633 disable unnecessary shutdown on lowsys
PostPosted: Wed Oct 14, 2009 5:12 am 
On gta02 hardware revision A5 it can actually bring the system down
during normal operating conditions so we disable it.

Signed-off-by: Paul Fertser
---
drivers/mfd/pcf50633-core.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c
index d26d774..6efe5c3 100644
--- a/drivers/mfd/pcf50633-core.c
+++ b/drivers/mfd/pcf50633-core.c
@@ -345,6 +345,9 @@ static void pcf50633_irq_worker(struct work_struct *work)
goto out;
}

+ /* defeat 8s death from lowsys on A5 */
+ pcf50633_reg_write(pcf, PCF50633_REG_OOCSHDWN, 0x04);
+
/* We immediately read the usb and adapter status. We thus make sure
* only of USBINS/USBREM IRQ handlers are called */
if (pcf_int[0] & (PCF50633_INT1_USBINS | PCF50633_INT1_USBREM)) {
--
1.6.0.6


 
 Post subject: [RFC 2/2] Use unified UUID/GUID definition in gfs2
PostPosted: Wed Oct 14, 2009 1:30 pm 
Replace u8[16] UUID definition in gfs2.

Signed-off-by: Huang Ying
---
fs/gfs2/incore.h | 3 ++-
fs/gfs2/ops_fstype.c | 2 +-
fs/gfs2/sys.c | 14 ++++----------
include/linux/gfs2_ondisk.h | 3 ++-
4 files changed, 9 insertions(+), 13 deletions(-)

--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -15,6 +15,7 @@
#include
#include
#include
+#include

#define DIO_WAIT 0x00000010
#define DIO_METADATA 0x00000020
@@ -483,7 +484,7 @@ struct gfs2_sb_host {

char sb_lockproto[GFS2_LOCKNAME_LEN];
char sb_locktable[GFS2_LOCKNAME_LEN];
- u8 sb_uuid[16];
+ uuid_be sb_uuid;
};

/*
--- a/fs/gfs2/sys.c
+++ b/fs/gfs2/sys.c
@@ -68,20 +68,14 @@ static ssize_t fsname_show(struct gfs2_s
return snprintf(buf, PAGE_SIZE, "%s\n", sdp->sd_fsname);
}

-static int gfs2_uuid_valid(const u8 *uuid)
+static int gfs2_uuid_valid(const uuid_be *uuid)
{
- int i;
-
- for (i = 0; i < 16; i++) {
- if (uuid[i])
- return 1;
- }
- return 0;
+ return uuid_be_cmp(*uuid, NULL_UUID_BE);
}

static ssize_t uuid_show(struct gfs2_sbd *sdp, char *buf)
{
- const u8 *uuid = sdp->sd_sb.sb_uuid;
+ const uuid_be *uuid = &sdp->sd_sb.sb_uuid;
buf[0] = '\0';
if (!gfs2_uuid_valid(uuid))
return 0;
@@ -563,7 +557,7 @@ static int gfs2_uevent(struct kset *kset
struct kobj_uevent_env *env)
{
struct gfs2_sbd *sdp = container_of(kobj, struct gfs2_sbd, sd_kobj);
- const u8 *uuid = sdp->sd_sb.sb_uuid;
+ const uuid_be *uuid = &sdp->sd_sb.sb_uuid;

add_uevent_var(env, "LOCKTABLE=%s", sdp->sd_table_name);
add_uevent_var(env, "LOCKPROTO=%s", sdp->sd_proto_name);
--- a/include/linux/gfs2_ondisk.h
+++ b/include/linux/gfs2_ondisk.h
@@ -11,6 +11,7 @@
#define __GFS2_ONDISK_DOT_H__

#include
+#include

#define GFS2_MAGIC 0x01161970
#define GFS2_BASIC_BLOCK 512
@@ -124,7 +125,7 @@ struct gfs2_sb {
struct gfs2_inum __pad3; /* Was quota inode in gfs1 */
struct gfs2_inum __pad4; /* Was licence inode in gfs1 */
#define GFS2_HAS_UUID 1
- __u8 sb_uuid[16]; /* The UUID, maybe 0 for backwards compat */
+ uuid_be sb_uuid; /* The UUID, maybe 0 for backwards compat */
};

/*
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -233,7 +233,7 @@ static void gfs2_sb_in(struct gfs2_sb_ho

memcpy(sb->sb_lockproto, str->sb_lockproto, GFS2_LOCKNAME_LEN);
memcpy(sb->sb_locktable, str->sb_locktable, GFS2_LOCKNAME_LEN);
- memcpy(sb->sb_uuid, str->sb_uuid, 16);
+ sb->sb_uuid = str->sb_uuid;
}

/**


 
 Post subject: What is eth"X"-Q0?
PostPosted: Wed Oct 14, 2009 5:44 pm 
Hello,

On my new system, cat /proc/interrupts:

36: 0 3055 2757 1086 1208446 25588
726447 1028280 PCI-MSI-edge eth2-Q0
37: 0 0 0 0 0 0
3 0 PCI-MSI-edge eth2
38: 0 103124 0 0 784 14511559
6936870 15972334 PCI-MSI-edge eth1-Q0
39: 0 0 0 0 2 0
0 0 PCI-MSI-edge eth1

What does the "-Q0" stand for, is this because the device was renamed?

Justin.


 
 Post subject: Re: [tip:bkl/drivers] drivers: Remove BKL from misc_open
PostPosted: Wed Oct 14, 2009 7:38 pm 
On Wed, 14 Oct 2009, Arnd Bergmann wrote:
Quote:
drivers/gpu/vga/vgaarb.c
drivers/hwmon/lis3lv02d.c
fs/cachefiles/daemon.c
fs/fuse/cuse.c
net/rfkill/core.c

Sigh, will have a look.

Quote:
drivers/staging/android/binder.c
drivers/staging/dream/qdsp5/audio_aac.c
drivers/staging/dream/qdsp5/audio_evrc.c
drivers/staging/dream/qdsp5/audio_in.c
drivers/staging/dream/qdsp5/audio_out.c
drivers/staging/dream/qdsp5/snd.c
drivers/staging/dream/smd/smd_qmi.c
drivers/staging/panel/panel.c

More sigh.

Quote:
These are new drivers that were merged after the pushdown
and should be looked at, though I don't expect that any of
them to need it because none of them use the locked ioctl
method or any other form of BKL.

Right I looked at quite a bunch of them.

Thanks,

tglx


 
 Post subject: Re: [PATCH v2] GPIO: Add gpio_lookup
PostPosted: Wed Oct 14, 2009 7:53 pm 
On Tue, Oct 13, 2009 at 03:53:58PM -0700, David Brownell wrote:
Quote:
On Tuesday 13 October 2009, Jonathan Corbet wrote:

(I'm less worried about the uniqueness side, BTW; it just means drivers
need to create meaningful names for their GPIOs.)

I don't see how they *can* though ... unless they're dynamically
allocated using a scheme like "combine with ". Consider two PCI cards with two different GPIOs
for their "camera_active" LED... "camera_active" is meaningful,
but unusable because it's not unique.

I guess the clock API style dev/dev_name based deduping would do the job
here, though that's a separate question from the general usefulness of
this sort of lookup framework.


 
 Post subject: Re: Current status of rt2800usb and staging/rt2870
PostPosted: Wed Oct 14, 2009 10:28 pm 
On Wednesday 14 October 2009 16:56:05 John W. Linville wrote:
Quote:
On Wed, Oct 14, 2009 at 04:52:40PM +0200, Bartlomiej Zolnierkiewicz wrote:
On Wednesday 14 October 2009 16:09:24 John W. Linville wrote:
On Tue, Oct 13, 2009 at 11:57:57PM +0200, Bartlomiej Zolnierkiewicz wrote:

Several months later (after all current users are happy with the improved
drivers) the old drivers will be removed from staging..

I _really_ hope this isn't the standard. By that measure, nothing
will ever leave staging as _someone_ will always have some use case
that makes the other driver better for them.

Doesn't seem to be the case with all other drivers except wireless ones
and the only real reason why wireless ones are so special is because of:

"But then there's the users, who bitch about everything and simply do
not understand what it is at stake.

And all this is becoming way too messy for us to handle.

Personally all I see around me is people bitching and complaining, and
no code being ported."

attitude which pretty much explains the problem..

Please adjust the process to fix the problem yourself or if you do not
want to do it just make the room for people who do.

Alright Bartlomiej, you've had your say. Perhaps you should go about
your business now.

John

P.S. For the record, the "But then there's the users..." quote is
from someone else...

...but you're still fine with its content, right?

I also wonder who is really taking advantage of who here (your other mail)..

You're holding users as hostages to pressure vendors to fund your projects
and try to lure outside developers with the lovely perspective of doing
the hardest parts of said projects.

I don't have a have a problem with it personally as long as people accept
the competition.. but instead of working on _their_ projects they go around
screaming at everybody who does not want to spin inside the great process
designed by them..
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html


 
 Post subject: Re: 2.6.32 regression (bisected): Video tearing/glitching with T400 laptops
PostPosted: Thu Oct 15, 2009 11:02 am 
On Wed, Oct 14, 2009 at 10:26:45PM -0400, Theodore Tso wrote:
Quote:
If I need to live with a display glitch every 5-10 minutes or so to
get better power savings, I'll take it....


While mail reading and composing responses in a tty based mail reader
(mutt/emacs -nw), I'm seeing display glitches every 3-5 minutes. Each
time it's quite minor so it's the sort of thing which is definitely
"blink at the wrong time and you'll miss it".

Being a battery lifetime freak, I'll definitely take the tradeoff, but
given that it occurs even when I'm plugged into AC mains, I could see
some users being annoyed by it, and I could see them wanting to be
able to switch off the feature when they are on AC, if we find a
complete fix.

- Ted


 





SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list
 © 0x61.com 2009 - Internet Forums and much more! - All rights reserved.