RE: [PATCH 1/3] sched/headers: Fix compilation error with GCC 12

2022-04-17 Thread David Laight
From: Peter Zijlstra > Sent: 14 April 2022 16:21 ... > > .. > > -#define sched_class_highest (__end_sched_classes - 1) > > +/* > > + * sched_class_highests is really __end_sched_classes - 1, but written in > > a way > > + * that makes it clear that it is within __begin_sched_classes[] and not

RE: [PATCH v2 3/4] tools headers UAPI: add cpu_relax() implementation for x86 and arm64

2021-07-22 Thread David Laight
> > Beware, Intel increased the stall for 'rep nop' in some recent > > cpu to IIRC about 200 cycles. > > > > They even document that this might have a detrimental effect. > > It is basically far too long for the sort of thing it makes > > sense to busy-wait for. > > Thanks for the info:) > I will

RE: [PATCH v2 3/4] tools headers UAPI: add cpu_relax() implementation for x86 and arm64

2021-07-21 Thread David Laight
From: Yunsheng Lin > Sent: 20 July 2021 03:22 > > As x86 and arm64 is the two available systems that I can build > and test the cpu_relax() implementation, so only add cpu_relax() > implementation for x86 and arm64, other arches can be added easily > when needed. > ... > +#if defined(__i386__)

RE: [PATCH 3/6] x86/sev-es: Use __put_user()/__get_user

2021-05-12 Thread David Laight
From: Juergen Gross > Sent: 12 May 2021 09:58 > > On 12.05.21 10:50, 'Joerg Roedel' wrote: > > On Wed, May 12, 2021 at 10:16:12AM +0200, Juergen Gross wrote: > >> You want something like xen_safe_[read|write]_ulong(). > > > > From a first glance I can't see it, what is the difference between the

RE: [PATCH 3/6] x86/sev-es: Use __put_user()/__get_user

2021-05-12 Thread David Laight
From: Joerg > Sent: 12 May 2021 08:55 > > From: Joerg Roedel > > The put_user() and get_user() functions do checks on the address which is > passed to them. They check whether the address is actually a user-space > address and whether its fine to access it. They also call might_fault() > to

RE: [RESEND PATCH v2 9/9] ath5k: Constify ioreadX() iomem argument (as in generic implementation)

2020-02-24 Thread David Laight
From: Geert Uytterhoeven > Sent: 24 February 2020 12:54 > To: Krzysztof Kozlowski ... > > > > diff --git a/drivers/net/wireless/ath/ath5k/ahb.c > > > > b/drivers/net/wireless/ath/ath5k/ahb.c > > > > index 2c9cec8b53d9..8bd01df369fb 100644 > > > > --- a/drivers/net/wireless/ath/ath5k/ahb.c > > >

RE: [RFT 00/13] iomap: Constify ioreadX() iomem argument

2020-01-08 Thread David Laight
From: Christophe Leroy > Sent: 08 January 2020 08:49 ... > And as pointed by Arnd, the volatile is really only necessary for the > dereference itself, should the arch use dereferencing. I've had trouble with some versions of gcc and reading of 'volatile unsigned char *'. It tended to follow the

RE: PROPOSAL: Extend inline asm syntax with size spec

2018-10-08 Thread David Laight
From: Michael Matz > Sent: 07 October 2018 16:53 ... > I think the examples I saw from Boris were all indirect inlines: > > static inline void foo() { asm("large-looking-but-small-asm"); } > static void bar1() { ... foo() ... } > static void bar2() { ... foo() ... } > void goo (void) {

RE: [PATCH V2 net-next 2/6] sctp: Handle sctp packets with CHECKSUM_PARTIAL

2018-08-20 Thread David Laight
From: Marcelo Ricardo Leitner > Sent: 20 August 2018 15:54 > On Wed, May 02, 2018 at 11:38:24AM -0300, Marcelo Ricardo Leitner wrote: > > On Tue, May 01, 2018 at 10:07:35PM -0400, Vladislav Yasevich wrote: > > > With SCTP checksum offload available in virtio, it is now > > > possible for virtio to

RE: [PATCH v6 3/3] x86: paravirt: make native_save_fl extern inline

2018-07-17 Thread David Laight
- Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales) Please consider the environment and don't print this e-mail unless you really need to ___ Virtualization mailing list

RE: [PATCH v6 3/3] x86: paravirt: make native_save_fl extern inline

2018-07-13 Thread David Laight
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales) Please consider the environment and don't print this e-mail unless you really need to ___ Virtualization mailing list

RE: [PATCH 0/6] Macrofying inline assembly for better compilation

2018-05-18 Thread David Laight
From: Nadav Amit > Sent: 17 May 2018 17:14 > This patch-set deals with an interesting yet stupid problem: kernel code > that does not get inlined despite its simplicity. There are several > causes for this behavior: "cold" attribute on __init, different function > optimization levels; conditional

RE: [PATCH RFC 1/2] virtio: introduce packed ring defines

2018-02-27 Thread David Laight
From: Tiwei Bie > Sent: 23 February 2018 11:18 ... > +struct vring_packed_desc_event { > + /* Descriptor Event Offset */ > + __virtio16 desc_event_off : 15, > + /* Descriptor Event Wrap Counter */ > +desc_event_wrap : 1; > + /* Descriptor Event Flags */ > +

RE: [PATCH 1/3] Fix ERROR: trailing statements should be on next line

2017-05-15 Thread David Laight
From: Alex Williamson > Sent: 15 May 2017 04:21 ... > > > /* Find end of list, sew whole thing into vi->rq.pages. */ > > > - for (end = page; end->private; end = (struct page *)end->private); > > > + for (end = page; end->private; end = (struct page *)end->private) > > > + ; > > FWIW, I

RE: [PATCH v5 9/9] Documentation: virtual: kvm: Support vcpu preempted check

2016-10-21 Thread David Laight
From: Pan Xinhui > Sent: 20 October 2016 22:28 > Commit ("x86, kvm: support vcpu preempted check") add one field "__u8 > preempted" into struct kvm_steal_time. This field tells if one vcpu is > running or not. > > It is zero if 1) some old KVM deos not support this filed. 2) the vcpu is >

RE: [PATCH RFC v4 net-next 0/5] virtio_net: enabling tx interrupts

2014-12-02 Thread David Laight
From: Jason Wang On Mon, Dec 01, 2014 at 06:17:03PM +0800, Jason Wang wrote: Hello: We used to orphan packets before transmission for virtio-net. This breaks socket accounting and can lead serveral functions won't work, e.g: - Byte Queue Limit depends on tx completion

RE: [PATCH RFC 1/4] virtio_net: pass vi around

2014-10-24 Thread David Laight
From: Michael S. Tsirkin Too many places poke at [rs]q-vq-vdev-priv just to get the the vi structure. Let's just pass the pointer around: seems cleaner, and might even be faster. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/net/virtio_net.c | 36

RE: [RFC PATCH net-next 3/6] virtio-net: small optimization on free_old_xmit_skbs()

2014-10-15 Thread David Laight
From: Michael S. Tsirkin On Wed, Oct 15, 2014 at 09:49:01AM +, David Laight wrote: From: Of Michael S. Tsirkin On Wed, Oct 15, 2014 at 03:25:27PM +0800, Jason Wang wrote: Accumulate the sent packets and sent bytes in local variables and perform a single

RE: [PATCH] virtio_net: fix use after free

2014-10-15 Thread David Laight
From: Michael S. Tsirkin commit 0b725a2ca61bedc33a2a63d0451d528b268cf975 net: Remove ndo_xmit_flush netdev operation, use signalling instead. added code that looks at skb-xmit_more after the skb has been put in TX VQ. Since some paths process the ring and free the skb immediately, this

RE: [PATCH] vhost: Add polling mode

2014-08-21 Thread David Laight
From: Razya Ladelsky Michael S. Tsirkin m...@redhat.com wrote on 20/08/2014 01:57:10 PM: Results: Netperf, 1 vm: The polling patch improved throughput by ~33% (1516 MB/sec - 2046 MB/sec). Number of exits/sec decreased 6x. The same improvement was shown when I tested with 3

RE: [PATCH 7/7] [v5] drivers/virt: introduce Freescale hypervisormanagement driver

2011-06-10 Thread David Laight
+enum fsl_hv_ioctl_cmd { + FSL_HV_IOCTL_PARTITION_RESTART = _IOWR(0, 1, struct fsl_hv_ioctl_restart), ... +}; Using a #define here is usually preferred because then you can use #ifdef in a user application to check if a given value has been assigned. It is also possible to